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

Unified Diff: chrome/browser/mouseleave_browsertest.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/mouseleave_browsertest.cc
diff --git a/chrome/browser/mouseleave_browsertest.cc b/chrome/browser/mouseleave_browsertest.cc
index c4bcbcf450b7adfa431e017cdcb9f1256c18e822..6719b9394d356debca9bf729e14055af6450ef6d 100644
--- a/chrome/browser/mouseleave_browsertest.cc
+++ b/chrome/browser/mouseleave_browsertest.cc
@@ -130,7 +130,7 @@ IN_PROC_BROWSER_TEST_F(MouseLeaveTest, MAYBE_ContextMenu) {
// Wait until the context menu is opened and closed.
menu_observer.WaitForMenuOpenAndClose();
- tab->GetMainFrame()->ExecuteJavaScript(base::ASCIIToUTF16("done()"));
+ tab->GetMainFrame()->ExecuteJavaScriptForTests(base::ASCIIToUTF16("done()"));
const base::string16 success_title = base::ASCIIToUTF16("without mouseleave");
const base::string16 failure_title = base::ASCIIToUTF16("with mouseleave");
content::TitleWatcher done_title_watcher(tab, success_title);
@@ -156,12 +156,12 @@ IN_PROC_BROWSER_TEST_F(MouseLeaveTest, MAYBE_ModalDialog) {
EXPECT_NO_FATAL_FAILURE(LoadTestPageAndWaitForMouseOver(tab));
- tab->GetMainFrame()->ExecuteJavaScript(base::UTF8ToUTF16("alert()"));
+ tab->GetMainFrame()->ExecuteJavaScriptForTests(base::UTF8ToUTF16("alert()"));
app_modal::AppModalDialog* alert = ui_test_utils::WaitForAppModalDialog();
// Cancel the dialog.
alert->CloseModalDialog();
- tab->GetMainFrame()->ExecuteJavaScript(base::ASCIIToUTF16("done()"));
+ tab->GetMainFrame()->ExecuteJavaScriptForTests(base::ASCIIToUTF16("done()"));
const base::string16 success_title = base::ASCIIToUTF16("without mouseleave");
const base::string16 failure_title = base::ASCIIToUTF16("with mouseleave");
content::TitleWatcher done_title_watcher(tab, success_title);
« no previous file with comments | « chrome/browser/geolocation/geolocation_browsertest.cc ('k') | chrome/browser/prerender/prerender_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698