| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/cancelable_callback.h" | 10 #include "base/cancelable_callback.h" |
| (...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 722 // we try to close the inspected browser. | 722 // we try to close the inspected browser. |
| 723 IN_PROC_BROWSER_TEST_F(DevToolsBeforeUnloadTest, | 723 IN_PROC_BROWSER_TEST_F(DevToolsBeforeUnloadTest, |
| 724 TestDockedDevToolsInspectedBrowserClose) { | 724 TestDockedDevToolsInspectedBrowserClose) { |
| 725 RunBeforeUnloadSanityTest(true, base::Bind( | 725 RunBeforeUnloadSanityTest(true, base::Bind( |
| 726 &DevToolsBeforeUnloadTest::CloseInspectedBrowser, | 726 &DevToolsBeforeUnloadTest::CloseInspectedBrowser, |
| 727 base::Unretained(this))); | 727 base::Unretained(this))); |
| 728 } | 728 } |
| 729 | 729 |
| 730 // Tests that BeforeUnload event gets called on undocked devtools if | 730 // Tests that BeforeUnload event gets called on undocked devtools if |
| 731 // we try to close them. | 731 // we try to close them. |
| 732 IN_PROC_BROWSER_TEST_F(DevToolsBeforeUnloadTest, TestUndockedDevToolsClose) { | 732 // Flaky on Windows. http://crbug.com/702171 |
| 733 #if defined(OS_WIN) |
| 734 #define MAYBE_TestUndockedDevToolsClose DISABLED_TestUndockedDevToolsClose |
| 735 #else |
| 736 #define MAYBE_TestUndockedDevToolsClose TestUndockedDevToolsClose |
| 737 #endif |
| 738 |
| 739 IN_PROC_BROWSER_TEST_F(DevToolsBeforeUnloadTest, |
| 740 MAYBE_TestUndockedDevToolsClose) { |
| 733 RunBeforeUnloadSanityTest(false, base::Bind( | 741 RunBeforeUnloadSanityTest(false, base::Bind( |
| 734 &DevToolsBeforeUnloadTest::CloseDevToolsWindowAsync, | 742 &DevToolsBeforeUnloadTest::CloseDevToolsWindowAsync, |
| 735 base::Unretained(this)), false); | 743 base::Unretained(this)), false); |
| 736 } | 744 } |
| 737 | 745 |
| 738 // Tests that BeforeUnload event gets called on undocked devtools if | 746 // Tests that BeforeUnload event gets called on undocked devtools if |
| 739 // we try to close the inspected page. | 747 // we try to close the inspected page. |
| 740 IN_PROC_BROWSER_TEST_F(DevToolsBeforeUnloadTest, | 748 IN_PROC_BROWSER_TEST_F(DevToolsBeforeUnloadTest, |
| 741 TestUndockedDevToolsInspectedTabClose) { | 749 TestUndockedDevToolsInspectedTabClose) { |
| 742 RunBeforeUnloadSanityTest(false, base::Bind( | 750 RunBeforeUnloadSanityTest(false, base::Bind( |
| (...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1541 RunTestFunction(window, "testWindowInitializedOnNavigateBack"); | 1549 RunTestFunction(window, "testWindowInitializedOnNavigateBack"); |
| 1542 | 1550 |
| 1543 DevToolsWindowTesting::CloseDevToolsWindowSync(window); | 1551 DevToolsWindowTesting::CloseDevToolsWindowSync(window); |
| 1544 content::WebUIControllerFactory::UnregisterFactoryForTesting(&test_factory); | 1552 content::WebUIControllerFactory::UnregisterFactoryForTesting(&test_factory); |
| 1545 } | 1553 } |
| 1546 | 1554 |
| 1547 // Tests scripts panel showing. | 1555 // Tests scripts panel showing. |
| 1548 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestDevToolsSharedWorker) { | 1556 IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestDevToolsSharedWorker) { |
| 1549 RunTest("testDevToolsSharedWorker", url::kAboutBlankURL); | 1557 RunTest("testDevToolsSharedWorker", url::kAboutBlankURL); |
| 1550 } | 1558 } |
| OLD | NEW |