Chromium Code Reviews| Index: chrome/browser/extensions/content_verifier_browsertest.cc |
| diff --git a/chrome/browser/extensions/content_verifier_browsertest.cc b/chrome/browser/extensions/content_verifier_browsertest.cc |
| index 4a83527a8d571668a89afb10774e1e0790f602d6..0e00919254f2756fcfb3aa9cc8b133009035a393 100644 |
| --- a/chrome/browser/extensions/content_verifier_browsertest.cc |
| +++ b/chrome/browser/extensions/content_verifier_browsertest.cc |
| @@ -22,6 +22,7 @@ |
| #include "chrome/browser/extensions/extension_service.h" |
| #include "chrome/browser/extensions/policy_extension_reinstaller.h" |
| #include "chrome/common/chrome_switches.h" |
| +#include "chrome/test/base/ui_test_utils.h" |
| #include "components/policy/core/browser/browser_policy_connector.h" |
| #include "components/policy/core/common/mock_configuration_policy_provider.h" |
| #include "content/public/common/browser_side_navigation_policy.h" |
| @@ -40,10 +41,6 @@ |
| #include "extensions/browser/updater/manifest_fetch_data.h" |
| #include "extensions/common/extension_urls.h" |
| -#if defined(OS_WIN) |
| -#include "base/win/windows_version.h" |
| -#endif |
| - |
| namespace extensions { |
| namespace { |
| @@ -492,13 +489,9 @@ class ContentVerifierTest : public ExtensionBrowserTest { |
| ASSERT_TRUE(extension); |
| ASSERT_EQ(id, extension->id()); |
| page_url_ = extension->GetResourceURL("page.html"); |
| - |
| - // This call passes false for |check_navigation_success|, because checking |
| - // for navigation success needs the WebContents to still exist after the |
| - // navigation, whereas this navigation triggers an unload which destroys |
| - // the WebContents. |
| - AddTabAtIndexToBrowser(browser(), 1, page_url_, ui::PAGE_TRANSITION_LINK, |
| - false); |
| + ui_test_utils::NavigateToURLWithDispositionBlockUntilNavigationsComplete( |
| + browser(), page_url_, 0, WindowOpenDisposition::NEW_FOREGROUND_TAB, |
|
Devlin
2017/05/23 16:13:05
Can you add a comment explaining why the '0' here
jam
2017/05/23 16:18:33
Done.
|
| + ui_test_utils::BROWSER_TEST_NONE); |
| EXPECT_TRUE(unload_observer.WaitForUnload(id)); |
| ExtensionPrefs* prefs = ExtensionPrefs::Get(profile()); |
| @@ -560,13 +553,6 @@ class ContentVerifierTest : public ExtensionBrowserTest { |
| }; |
| IN_PROC_BROWSER_TEST_F(ContentVerifierTest, FailOnRead) { |
| -#if defined(OS_WIN) |
| - if (content::IsBrowserSideNavigationEnabled() && |
| - base::win::GetVersion() >= base::win::VERSION_WIN10) { |
| - // http://crbug.com/699437 |
| - return; |
| - } |
| -#endif |
| EXPECT_EQ(0, delegate_.bytes_read_failed()); |
| delegate_.fail_next_read(); |
| OpenPageAndWaitForUnload(); |
| @@ -574,13 +560,6 @@ IN_PROC_BROWSER_TEST_F(ContentVerifierTest, FailOnRead) { |
| } |
| IN_PROC_BROWSER_TEST_F(ContentVerifierTest, FailOnDone) { |
| -#if defined(OS_WIN) |
| - if (content::IsBrowserSideNavigationEnabled() && |
| - base::win::GetVersion() >= base::win::VERSION_WIN10) { |
| - // http://crbug.com/699437 |
| - return; |
| - } |
| -#endif |
| EXPECT_EQ(0, delegate_.done_reading_failed()); |
| delegate_.fail_next_done(); |
| OpenPageAndWaitForUnload(); |