Index: chrome/browser/ui/browser_browsertest.cc |
diff --git a/chrome/browser/ui/browser_browsertest.cc b/chrome/browser/ui/browser_browsertest.cc |
index b9df8659b6a8d0e841354f3f383964a5272d48d1..a98d5231f89b0414b3c1aefb3da7cacdb2c5aee4 100644 |
--- a/chrome/browser/ui/browser_browsertest.cc |
+++ b/chrome/browser/ui/browser_browsertest.cc |
@@ -796,13 +796,13 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, CancelBeforeUnloadResetsURL) { |
// two beforeunload dialogs shown. |
IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_SingleBeforeUnloadAfterWindowClose) { |
browser()->tab_strip_model()->GetActiveWebContents()->GetMainFrame()-> |
- ExecuteJavaScript(ASCIIToUTF16(kOpenNewBeforeUnloadPage)); |
+ ExecuteJavaScriptForTests(ASCIIToUTF16(kOpenNewBeforeUnloadPage)); |
// Close the new window with JavaScript, which should show a single |
// beforeunload dialog. Then show another alert, to make it easy to verify |
// that a second beforeunload dialog isn't shown. |
browser()->tab_strip_model()->GetWebContentsAt(0)->GetMainFrame()-> |
- ExecuteJavaScript(ASCIIToUTF16("w.close(); alert('bar');")); |
+ ExecuteJavaScriptForTests(ASCIIToUTF16("w.close(); alert('bar');")); |
AppModalDialog* alert = ui_test_utils::WaitForAppModalDialog(); |
alert->native_dialog()->AcceptAppModalDialog(); |
@@ -958,7 +958,8 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, NullOpenerRedirectForksProcess) { |
content::WindowedNotificationObserver nav_observer( |
content::NOTIFICATION_NAV_ENTRY_COMMITTED, |
content::NotificationService::AllSources()); |
- oldtab->GetMainFrame()->ExecuteJavaScript(ASCIIToUTF16(redirect_popup)); |
+ oldtab->GetMainFrame()-> |
+ ExecuteJavaScriptForTests(ASCIIToUTF16(redirect_popup)); |
// Wait for popup window to appear and finish navigating. |
popup_observer.Wait(); |
@@ -991,7 +992,8 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, NullOpenerRedirectForksProcess) { |
content::WindowedNotificationObserver nav_observer2( |
content::NOTIFICATION_NAV_ENTRY_COMMITTED, |
content::NotificationService::AllSources()); |
- oldtab->GetMainFrame()->ExecuteJavaScript(ASCIIToUTF16(refresh_popup)); |
+ oldtab->GetMainFrame()-> |
+ ExecuteJavaScriptForTests(ASCIIToUTF16(refresh_popup)); |
// Wait for popup window to appear and finish navigating. |
popup_observer2.Wait(); |
@@ -1044,7 +1046,8 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, OtherRedirectsDontForkProcess) { |
content::WindowedNotificationObserver nav_observer( |
content::NOTIFICATION_NAV_ENTRY_COMMITTED, |
content::NotificationService::AllSources()); |
- oldtab->GetMainFrame()->ExecuteJavaScript(ASCIIToUTF16(dont_fork_popup)); |
+ oldtab->GetMainFrame()-> |
+ ExecuteJavaScriptForTests(ASCIIToUTF16(dont_fork_popup)); |
// Wait for popup window to appear and finish navigating. |
popup_observer.Wait(); |
@@ -1070,7 +1073,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, OtherRedirectsDontForkProcess) { |
content::WindowedNotificationObserver nav_observer2( |
content::NOTIFICATION_NAV_ENTRY_COMMITTED, |
content::NotificationService::AllSources()); |
- oldtab->GetMainFrame()->ExecuteJavaScript(ASCIIToUTF16(navigate_str)); |
+ oldtab->GetMainFrame()->ExecuteJavaScriptForTests(ASCIIToUTF16(navigate_str)); |
nav_observer2.Wait(); |
ASSERT_TRUE(oldtab->GetController().GetLastCommittedEntry()); |
EXPECT_EQ(https_url.spec(), |