| 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 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 } | 564 } |
| 565 | 565 |
| 566 // Tests that BeforeUnload event gets called on undocked devtools if | 566 // Tests that BeforeUnload event gets called on undocked devtools if |
| 567 // we try to exit application. | 567 // we try to exit application. |
| 568 IN_PROC_BROWSER_TEST_F(DevToolsBeforeUnloadTest, | 568 IN_PROC_BROWSER_TEST_F(DevToolsBeforeUnloadTest, |
| 569 TestUndockedDevToolsApplicationClose) { | 569 TestUndockedDevToolsApplicationClose) { |
| 570 RunBeforeUnloadSanityTest(false, base::Bind( | 570 RunBeforeUnloadSanityTest(false, base::Bind( |
| 571 &chrome::CloseAllBrowsers)); | 571 &chrome::CloseAllBrowsers)); |
| 572 } | 572 } |
| 573 | 573 |
| 574 // Times out on Win and Linux |
| 575 // @see http://crbug.com/410327 |
| 576 #if defined(OS_WIN) && defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 577 #define MAYBE_TestUndockedDevToolsUnresponsive DISABLED_TestUndockedDevToolsUnre
sponsive |
| 578 #else |
| 579 #define MAYBE_TestUndockedDevToolsUnresponsive TestUndockedDevToolsUnresponsive |
| 580 #endif |
| 581 |
| 574 // Tests that inspected tab gets closed if devtools renderer | 582 // Tests that inspected tab gets closed if devtools renderer |
| 575 // becomes unresponsive during beforeunload event interception. | 583 // becomes unresponsive during beforeunload event interception. |
| 576 // @see http://crbug.com/322380 | 584 // @see http://crbug.com/322380 |
| 577 IN_PROC_BROWSER_TEST_F(DevToolsUnresponsiveBeforeUnloadTest, | 585 IN_PROC_BROWSER_TEST_F(DevToolsUnresponsiveBeforeUnloadTest, |
| 578 TestUndockedDevToolsUnresponsive) { | 586 MAYBE_TestUndockedDevToolsUnresponsive) { |
| 579 ASSERT_TRUE(test_server()->Start()); | 587 ASSERT_TRUE(test_server()->Start()); |
| 580 LoadTestPage(kDebuggerTestPage); | 588 LoadTestPage(kDebuggerTestPage); |
| 581 DevToolsWindow* devtools_window = OpenDevToolWindowOnWebContents( | 589 DevToolsWindow* devtools_window = OpenDevToolWindowOnWebContents( |
| 582 GetInspectedTab(), false); | 590 GetInspectedTab(), false); |
| 583 | 591 |
| 584 scoped_refptr<content::MessageLoopRunner> runner = | 592 scoped_refptr<content::MessageLoopRunner> runner = |
| 585 new content::MessageLoopRunner; | 593 new content::MessageLoopRunner; |
| 586 DevToolsWindowTesting::Get(devtools_window)->SetCloseCallback( | 594 DevToolsWindowTesting::Get(devtools_window)->SetCloseCallback( |
| 587 runner->QuitClosure()); | 595 runner->QuitClosure()); |
| 588 | 596 |
| (...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 908 | 916 |
| 909 IN_PROC_BROWSER_TEST_F(RemoteDebuggingTest, RemoteDebugger) { | 917 IN_PROC_BROWSER_TEST_F(RemoteDebuggingTest, RemoteDebugger) { |
| 910 #if defined(OS_WIN) && defined(USE_ASH) | 918 #if defined(OS_WIN) && defined(USE_ASH) |
| 911 // Disable this test in Metro+Ash for now (http://crbug.com/262796). | 919 // Disable this test in Metro+Ash for now (http://crbug.com/262796). |
| 912 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) | 920 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) |
| 913 return; | 921 return; |
| 914 #endif | 922 #endif |
| 915 | 923 |
| 916 ASSERT_TRUE(RunExtensionTest("target_list")) << message_; | 924 ASSERT_TRUE(RunExtensionTest("target_list")) << message_; |
| 917 } | 925 } |
| OLD | NEW |