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

Unified Diff: chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc

Issue 1123783002: Add ExecuteJavaScriptForTest and make all tests use it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 5 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/api/web_navigation/web_navigation_apitest.cc
diff --git a/chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc b/chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc
index 0f58e84b04689dde5ffe465ffe8d882707b726d4..09a26804aa8fbe50f47fc2271818d480ec801138 100644
--- a/chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc
+++ b/chrome/browser/extensions/api/web_navigation/web_navigation_apitest.cc
@@ -213,7 +213,8 @@ class DelayLoadStartAndExecuteJavascript
rvh_->GetMainFrame()->ExecuteJavaScriptWithUserGestureForTests(
base::UTF8ToUTF16(script_));
} else {
- rvh_->GetMainFrame()->ExecuteJavaScript(base::UTF8ToUTF16(script_));
+ rvh_->GetMainFrame()->ExecuteJavaScriptForTests(
+ base::UTF8ToUTF16(script_));
}
script_was_executed_ = true;
}
@@ -674,7 +675,8 @@ IN_PROC_BROWSER_TEST_F(WebNavigationApiTest, CrossProcessAbort) {
// Ensure the cross-site navigation has started, then execute JavaScript
// to cause the renderer-initiated, non-user navigation.
cross_site_load.Wait();
- tab->GetMainFrame()->ExecuteJavaScript(base::UTF8ToUTF16("navigate2()"));
+ tab->GetMainFrame()->ExecuteJavaScriptForTests(
+ base::UTF8ToUTF16("navigate2()"));
// Wait for the same-site navigation to start and resume the cross-site
// one, allowing it to commit.

Powered by Google App Engine
This is Rietveld 408576698