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 651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 devtools_window->SetDockSideForTest(DEVTOOLS_DOCK_SIDE_UNDOCKED); | 662 devtools_window->SetDockSideForTest(DEVTOOLS_DOCK_SIDE_UNDOCKED); |
663 content::WindowedNotificationObserver devtools_close_observer( | 663 content::WindowedNotificationObserver devtools_close_observer( |
664 content::NOTIFICATION_WEB_CONTENTS_DESTROYED, | 664 content::NOTIFICATION_WEB_CONTENTS_DESTROYED, |
665 content::Source<content::WebContents>( | 665 content::Source<content::WebContents>( |
666 devtools_window->web_contents())); | 666 devtools_window->web_contents())); |
667 | 667 |
668 OpenDevToolsPopupWindow(devtools_window); | 668 OpenDevToolsPopupWindow(devtools_window); |
669 CloseDevToolsPopupWindow(devtools_window); | 669 CloseDevToolsPopupWindow(devtools_window); |
670 } | 670 } |
671 | 671 |
| 672 // FLaky on Windows bots: see crbug.com/323847 |
| 673 #if defined(OS_WIN) |
| 674 #define MAYBE_TestDevToolsOnDevTools DISABLED_TestDevToolsOnDevTools |
| 675 #else |
| 676 #define MAYBE_TestDevToolsOnDevTools TestDevToolsOnDevTools |
| 677 #endif |
672 // Tests that BeforeUnload event gets called on devtools that are opened | 678 // Tests that BeforeUnload event gets called on devtools that are opened |
673 // on another devtools. | 679 // on another devtools. |
674 IN_PROC_BROWSER_TEST_F(DevToolsBeforeUnloadTest, | 680 IN_PROC_BROWSER_TEST_F(DevToolsBeforeUnloadTest, |
675 TestDevToolsOnDevTools) { | 681 MAYBE_TestDevToolsOnDevTools) { |
676 ASSERT_TRUE(test_server()->Start()); | 682 ASSERT_TRUE(test_server()->Start()); |
677 LoadTestPage(kDebuggerTestPage); | 683 LoadTestPage(kDebuggerTestPage); |
678 | 684 |
679 std::vector<DevToolsWindow*> windows; | 685 std::vector<DevToolsWindow*> windows; |
680 std::vector<content::WindowedNotificationObserver*> close_observers; | 686 std::vector<content::WindowedNotificationObserver*> close_observers; |
681 content::WebContents* inspected_web_contents = GetInspectedTab(); | 687 content::WebContents* inspected_web_contents = GetInspectedTab(); |
682 for (int i = 0; i < 3; ++i) { | 688 for (int i = 0; i < 3; ++i) { |
683 DevToolsWindow* devtools_window = OpenDevToolWindowOnWebContents( | 689 DevToolsWindow* devtools_window = OpenDevToolWindowOnWebContents( |
684 inspected_web_contents); | 690 inspected_web_contents); |
685 windows.push_back(devtools_window); | 691 windows.push_back(devtools_window); |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
988 #if defined(OS_WIN) && defined(USE_ASH) | 994 #if defined(OS_WIN) && defined(USE_ASH) |
989 // Disable this test in Metro+Ash for now (http://crbug.com/262796). | 995 // Disable this test in Metro+Ash for now (http://crbug.com/262796). |
990 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) | 996 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAshBrowserTests)) |
991 return; | 997 return; |
992 #endif | 998 #endif |
993 | 999 |
994 ASSERT_TRUE(RunExtensionTest("target_list")) << message_; | 1000 ASSERT_TRUE(RunExtensionTest("target_list")) << message_; |
995 } | 1001 } |
996 | 1002 |
997 } // namespace | 1003 } // namespace |
OLD | NEW |