Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1099)

Unified Diff: chrome/browser/extensions/content_script_apitest.cc

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/content_script_apitest.cc
diff --git a/chrome/browser/extensions/content_script_apitest.cc b/chrome/browser/extensions/content_script_apitest.cc
index c8d442885dff659576a6f2f6fc95385d298d0f84..126beb51e6cb024bf68142397e4e663a40688c9c 100644
--- a/chrome/browser/extensions/content_script_apitest.cc
+++ b/chrome/browser/extensions/content_script_apitest.cc
@@ -421,7 +421,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptExtensionAPIs) {
// listening for.
ui_test_utils::NavigateToURLWithDisposition(
browser(), extension->GetResourceURL("fire_event.html"),
- NEW_FOREGROUND_TAB, ui_test_utils::BROWSER_TEST_NONE);
+ WindowOpenDisposition::NEW_FOREGROUND_TAB,
+ ui_test_utils::BROWSER_TEST_NONE);
EXPECT_TRUE(catcher.GetNextResult());
}
@@ -474,10 +475,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptBlockingScript) {
// Navigate! Both extensions will try to inject.
ui_test_utils::NavigateToURLWithDisposition(
- browser(),
- embedded_test_server()->GetURL("/empty.html"),
- CURRENT_TAB,
- ui_test_utils::BROWSER_TEST_NONE);
+ browser(), embedded_test_server()->GetURL("/empty.html"),
+ WindowOpenDisposition::CURRENT_TAB, ui_test_utils::BROWSER_TEST_NONE);
run_loop.Run();
// Right now, the alert dialog is showing and blocking injection of anything
@@ -499,9 +498,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptBlockingScriptTabClosed) {
// We're going to close a tab in this test, so make a new one (to ensure
// we don't close the browser).
ui_test_utils::NavigateToURLWithDisposition(
- browser(),
- embedded_test_server()->GetURL("/empty.html"),
- NEW_FOREGROUND_TAB,
+ browser(), embedded_test_server()->GetURL("/empty.html"),
+ WindowOpenDisposition::NEW_FOREGROUND_TAB,
ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
// Set up the same as the previous test case.
@@ -529,10 +527,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest, ContentScriptBlockingScriptTabClosed) {
// Navitate!
ui_test_utils::NavigateToURLWithDisposition(
- browser(),
- embedded_test_server()->GetURL("/empty.html"),
- CURRENT_TAB,
- ui_test_utils::BROWSER_TEST_NONE);
+ browser(), embedded_test_server()->GetURL("/empty.html"),
+ WindowOpenDisposition::CURRENT_TAB, ui_test_utils::BROWSER_TEST_NONE);
// Now, instead of closing the dialog, just close the tab. Later scripts
// should never get a chance to run (and we shouldn't crash).
@@ -566,10 +562,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest,
// Navigate!
ui_test_utils::NavigateToURLWithDisposition(
- browser(),
- embedded_test_server()->GetURL("/empty.html"),
- CURRENT_TAB,
- ui_test_utils::BROWSER_TEST_NONE);
+ browser(), embedded_test_server()->GetURL("/empty.html"),
+ WindowOpenDisposition::CURRENT_TAB, ui_test_utils::BROWSER_TEST_NONE);
run_loop.Run();
@@ -612,7 +606,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionApiTest,
ui_test_utils::NavigateToURLWithDisposition(
browser(), embedded_test_server()->GetURL("/empty.html"),
- CURRENT_TAB, ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
+ WindowOpenDisposition::CURRENT_TAB,
+ ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
base::RunLoop().RunUntilIdle();
EXPECT_TRUE(listener.was_satisfied());
}
« no previous file with comments | « chrome/browser/extensions/app_process_apitest.cc ('k') | chrome/browser/extensions/crx_installer_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698