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

Unified Diff: chrome/browser/ui/blocked_content/popup_blocker_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
« no previous file with comments | « chrome/browser/task_manager/task_manager_browsertest.cc ('k') | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc
diff --git a/chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc b/chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc
index f88dc9d43b746407b0fdaa03235201f8f03fb87a..f6b7653a97647a6a5064eca461e1c366a875fbdb 100644
--- a/chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc
+++ b/chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc
@@ -491,13 +491,13 @@ IN_PROC_BROWSER_TEST_F(PopupBlockerBrowserTest, ClosableAfterNavigation) {
// Navigate it elsewhere.
content::TestNavigationObserver nav_observer(popup);
- popup->GetMainFrame()->ExecuteJavaScript(
+ popup->GetMainFrame()->ExecuteJavaScriptForTests(
base::UTF8ToUTF16("location.href = '/empty.html'"));
nav_observer.Wait();
// Have it close itself.
CloseObserver close_observer(popup);
- popup->GetMainFrame()->ExecuteJavaScript(
+ popup->GetMainFrame()->ExecuteJavaScriptForTests(
base::UTF8ToUTF16("window.close()"));
close_observer.Wait();
}
@@ -574,7 +574,7 @@ IN_PROC_BROWSER_TEST_F(PopupBlockerBrowserTest, ModalPopUnder) {
ASSERT_NE(popup_browser, browser());
// Showing an alert will raise the tab over the popup.
- tab->GetMainFrame()->ExecuteJavaScript(base::UTF8ToUTF16("alert()"));
+ tab->GetMainFrame()->ExecuteJavaScriptForTests(base::UTF8ToUTF16("alert()"));
app_modal::AppModalDialog* dialog = ui_test_utils::WaitForAppModalDialog();
// Verify that after the dialog was closed, the popup is in front again.
« no previous file with comments | « chrome/browser/task_manager/task_manager_browsertest.cc ('k') | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698