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

Unified Diff: chrome/browser/apps/custom_launcher_page_browsertest_views.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/apps/custom_launcher_page_browsertest_views.cc
diff --git a/chrome/browser/apps/custom_launcher_page_browsertest_views.cc b/chrome/browser/apps/custom_launcher_page_browsertest_views.cc
index f39ec2e52b06b5d906e2292f9c3f4b99cc18ddf6..eb8aea103b038419bd586748c047d9248ab5cd47 100644
--- a/chrome/browser/apps/custom_launcher_page_browsertest_views.cc
+++ b/chrome/browser/apps/custom_launcher_page_browsertest_views.cc
@@ -113,8 +113,8 @@ class CustomLauncherPageBrowserTest
enabled ? "launcherPageEnabled" : "launcherPageDisabled";
ExtensionTestMessageListener listener(test_message, false);
- custom_page_frame->ExecuteJavaScript(enabled ? kLauncherPageEnableScript
- : kLauncherPageDisableScript);
+ custom_page_frame->ExecuteJavaScriptForTests(
+ enabled ? kLauncherPageEnableScript : kLauncherPageDisableScript);
listener.WaitUntilSatisfied();
}
@@ -339,7 +339,7 @@ IN_PROC_BROWSER_TEST_F(CustomLauncherPageBrowserTest, LauncherPageShowAndHide) {
// if the app launcher is already showing.
{
ExtensionTestMessageListener listener("onPageProgressAt1", false);
- custom_page_frame->ExecuteJavaScript(kLauncherPageShowScript);
+ custom_page_frame->ExecuteJavaScriptForTests(kLauncherPageShowScript);
listener.WaitUntilSatisfied();
EXPECT_TRUE(contents_view->IsStateActive(
@@ -353,7 +353,7 @@ IN_PROC_BROWSER_TEST_F(CustomLauncherPageBrowserTest, LauncherPageShowAndHide) {
app_list_view->GetWidget()->Close();
ExtensionTestMessageListener listener("onPageProgressAt1", false);
- custom_page_frame->ExecuteJavaScript(kLauncherPageShowScript);
+ custom_page_frame->ExecuteJavaScriptForTests(kLauncherPageShowScript);
listener.WaitUntilSatisfied();
@@ -367,7 +367,7 @@ IN_PROC_BROWSER_TEST_F(CustomLauncherPageBrowserTest, LauncherPageShowAndHide) {
// Ensure launcherPage.hide() hides the launcher page when it's showing.
{
ExtensionTestMessageListener listener("onPageProgressAt0", false);
- custom_page_frame->ExecuteJavaScript(kLauncherPageHideScript);
+ custom_page_frame->ExecuteJavaScriptForTests(kLauncherPageHideScript);
listener.WaitUntilSatisfied();
@@ -380,7 +380,7 @@ IN_PROC_BROWSER_TEST_F(CustomLauncherPageBrowserTest, LauncherPageShowAndHide) {
contents_view->SetActiveState(app_list::AppListModel::STATE_APPS, false);
ExtensionTestMessageListener listener("launcherPageHidden", false);
- custom_page_frame->ExecuteJavaScript(kLauncherPageHideScript);
+ custom_page_frame->ExecuteJavaScriptForTests(kLauncherPageHideScript);
listener.WaitUntilSatisfied();
EXPECT_TRUE(

Powered by Google App Engine
This is Rietveld 408576698