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

Unified Diff: chrome/browser/errorpage_browsertest.cc

Issue 1257603003: Revert of Add ExecuteJavaScriptForTest and make all tests use it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « chrome/browser/download/download_browsertest.cc ('k') | chrome/browser/extensions/alert_apitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/errorpage_browsertest.cc
diff --git a/chrome/browser/errorpage_browsertest.cc b/chrome/browser/errorpage_browsertest.cc
index 9f1dc791669703453b13fb82ebc14ac21b8f674d..f89164be1b2aae7daabd39a80f66a9b4c58fded0 100644
--- a/chrome/browser/errorpage_browsertest.cc
+++ b/chrome/browser/errorpage_browsertest.cc
@@ -621,7 +621,7 @@
// Can't use content::ExecuteScript because it waits for scripts to send
// notification that they've run, and scripts that trigger a navigation may
// not send that notification.
- web_contents->GetMainFrame()->ExecuteJavaScriptForTests(
+ web_contents->GetMainFrame()->ExecuteJavaScript(
base::ASCIIToUTF16("document.getElementById('search-button').click();"));
nav_observer.Wait();
EXPECT_EQ(base::ASCIIToUTF16("Title Of More Awesomeness"),
@@ -666,7 +666,7 @@
// Can't use content::ExecuteScript because it waits for scripts to send
// notification that they've run, and scripts that trigger a navigation may
// not send that notification.
- web_contents->GetMainFrame()->ExecuteJavaScriptForTests(
+ web_contents->GetMainFrame()->ExecuteJavaScript(
base::ASCIIToUTF16("document.getElementById('reload-button').click();"));
nav_observer.Wait();
ExpectDisplayingNavigationCorrections(browser(), net::ERR_NAME_NOT_RESOLVED);
@@ -699,12 +699,12 @@
"document.querySelector('a[href=\"http://mock.http/title2.html\"]')";
// The tracking request is triggered by onmousedown, so it catches middle
// mouse button clicks, as well as left clicks.
- web_contents->GetMainFrame()->ExecuteJavaScriptForTests(
+ web_contents->GetMainFrame()->ExecuteJavaScript(
base::ASCIIToUTF16(link_selector + ".onmousedown();"));
// Can't use content::ExecuteScript because it waits for scripts to send
// notification that they've run, and scripts that trigger a navigation may
// not send that notification.
- web_contents->GetMainFrame()->ExecuteJavaScriptForTests(
+ web_contents->GetMainFrame()->ExecuteJavaScript(
base::ASCIIToUTF16(link_selector + ".click();"));
EXPECT_EQ(base::ASCIIToUTF16("Title Of Awesomeness"),
title_watcher.WaitAndGetTitle());
@@ -790,7 +790,7 @@
content::WindowedNotificationObserver load_observer(
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(&wc->GetController()));
- wc->GetMainFrame()->ExecuteJavaScriptForTests(base::ASCIIToUTF16(script));
+ wc->GetMainFrame()->ExecuteJavaScript(base::ASCIIToUTF16(script));
load_observer.Wait();
// Ensure we saw the expected failure.
@@ -810,7 +810,7 @@
content::WindowedNotificationObserver load_observer(
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(&wc->GetController()));
- wc->GetMainFrame()->ExecuteJavaScriptForTests(base::ASCIIToUTF16(script));
+ wc->GetMainFrame()->ExecuteJavaScript(base::ASCIIToUTF16(script));
load_observer.Wait();
}
@@ -821,7 +821,7 @@
content::WindowedNotificationObserver load_observer(
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(&wc->GetController()));
- wc->GetMainFrame()->ExecuteJavaScriptForTests(base::ASCIIToUTF16(script));
+ wc->GetMainFrame()->ExecuteJavaScript(base::ASCIIToUTF16(script));
load_observer.Wait();
EXPECT_EQ(fail_url, fail_observer.fail_url());
@@ -1000,7 +1000,7 @@
content::WebContents* web_contents =
browser()->tab_strip_model()->GetActiveWebContents();
content::TestNavigationObserver nav_observer(web_contents, 1);
- web_contents->GetMainFrame()->ExecuteJavaScriptForTests(
+ web_contents->GetMainFrame()->ExecuteJavaScript(
base::ASCIIToUTF16("document.getElementById('reload-button').click();"));
nav_observer.Wait();
EXPECT_FALSE(IsDisplayingText(browser(), "error.page.auto.reload"));
« no previous file with comments | « chrome/browser/download/download_browsertest.cc ('k') | chrome/browser/extensions/alert_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698