OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/cancelable_callback.h" | 6 #include "base/cancelable_callback.h" |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 | 521 |
522 #if defined(OS_MACOSX) || defined(OS_LINUX) | 522 #if defined(OS_MACOSX) || defined(OS_LINUX) |
523 // http://crbug.com/103539 | 523 // http://crbug.com/103539 |
524 #define TestReattachAfterCrash DISABLED_TestReattachAfterCrash | 524 #define TestReattachAfterCrash DISABLED_TestReattachAfterCrash |
525 #endif | 525 #endif |
526 // Tests that inspector will reattach to inspected page when it is reloaded | 526 // Tests that inspector will reattach to inspected page when it is reloaded |
527 // after a crash. See http://crbug.com/101952 | 527 // after a crash. See http://crbug.com/101952 |
528 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestReattachAfterCrash) { | 528 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestReattachAfterCrash) { |
529 OpenDevToolsWindow(kDebuggerTestPage); | 529 OpenDevToolsWindow(kDebuggerTestPage); |
530 | 530 |
531 ui_test_utils::CrashTab(GetInspectedTab()); | 531 content::CrashTab(GetInspectedTab()); |
532 content::WindowedNotificationObserver observer( | 532 content::WindowedNotificationObserver observer( |
533 content::NOTIFICATION_LOAD_STOP, | 533 content::NOTIFICATION_LOAD_STOP, |
534 content::Source<NavigationController>( | 534 content::Source<NavigationController>( |
535 &chrome::GetActiveWebContents(browser())->GetController())); | 535 &chrome::GetActiveWebContents(browser())->GetController())); |
536 chrome::Reload(browser(), CURRENT_TAB); | 536 chrome::Reload(browser(), CURRENT_TAB); |
537 observer.Wait(); | 537 observer.Wait(); |
538 | 538 |
539 RunTestFunction(window_, "testReattachAfterCrash"); | 539 RunTestFunction(window_, "testReattachAfterCrash"); |
540 CloseDevToolsWindow(); | 540 CloseDevToolsWindow(); |
541 } | 541 } |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
603 content::CONSOLE_MESSAGE_LEVEL_LOG, | 603 content::CONSOLE_MESSAGE_LEVEL_LOG, |
604 "log"); | 604 "log"); |
605 devtools_manager->AddMessageToConsole(agent_host, | 605 devtools_manager->AddMessageToConsole(agent_host, |
606 content::CONSOLE_MESSAGE_LEVEL_ERROR, | 606 content::CONSOLE_MESSAGE_LEVEL_ERROR, |
607 "error"); | 607 "error"); |
608 RunTestFunction(window_, "checkLogAndErrorMessages"); | 608 RunTestFunction(window_, "checkLogAndErrorMessages"); |
609 CloseDevToolsWindow(); | 609 CloseDevToolsWindow(); |
610 } | 610 } |
611 | 611 |
612 } // namespace | 612 } // namespace |
OLD | NEW |