Index: content/renderer/render_view_browsertest_mac.mm |
diff --git a/content/renderer/render_view_browsertest_mac.mm b/content/renderer/render_view_browsertest_mac.mm |
index 6730da746aacfa6c84aade51397e0e32dfb65add..a973c313c4ecdc2b9096de0f0fc395bb222e96d2 100644 |
--- a/content/renderer/render_view_browsertest_mac.mm |
+++ b/content/renderer/render_view_browsertest_mac.mm |
@@ -103,7 +103,7 @@ TEST_F(RenderViewTest, MacTestCmdUp) { |
EditCommands(1, EditCommand("moveToEndOfDocument", ""))); |
SendNativeKeyEvent(NativeWebKeyboardEvent(arrowDownKeyDown)); |
ProcessPendingMessages(); |
- ExecuteJavaScript("scroll.textContent = window.pageYOffset"); |
+ ExecuteJavaScriptForTests("scroll.textContent = window.pageYOffset"); |
output = GetMainFrame()->contentAsText(kMaxOutputCharacters); |
EXPECT_EQ(kArrowDownScrollDown, base::UTF16ToASCII(output)); |
@@ -112,21 +112,21 @@ TEST_F(RenderViewTest, MacTestCmdUp) { |
EditCommands(1, EditCommand("moveToBeginningOfDocument", ""))); |
SendNativeKeyEvent(NativeWebKeyboardEvent(arrowUpKeyDown)); |
ProcessPendingMessages(); |
- ExecuteJavaScript("scroll.textContent = window.pageYOffset"); |
+ ExecuteJavaScriptForTests("scroll.textContent = window.pageYOffset"); |
output = GetMainFrame()->contentAsText(kMaxOutputCharacters); |
EXPECT_EQ(kArrowUpScrollUp, base::UTF16ToASCII(output)); |
// Now let javascript eat the key events -- no scrolling should happen. |
// Set a scroll position slightly down the page to ensure that it does not |
// move. |
- ExecuteJavaScript("allowKeyEvents = false; window.scrollTo(0, 100)"); |
+ ExecuteJavaScriptForTests("allowKeyEvents = false; window.scrollTo(0, 100)"); |
const char* kArrowDownNoScroll = "40,false,false,true,false\n100\np1"; |
view->OnSetEditCommandsForNextKeyEvent( |
EditCommands(1, EditCommand("moveToEndOfDocument", ""))); |
SendNativeKeyEvent(NativeWebKeyboardEvent(arrowDownKeyDown)); |
ProcessPendingMessages(); |
- ExecuteJavaScript("scroll.textContent = window.pageYOffset"); |
+ ExecuteJavaScriptForTests("scroll.textContent = window.pageYOffset"); |
output = GetMainFrame()->contentAsText(kMaxOutputCharacters); |
EXPECT_EQ(kArrowDownNoScroll, base::UTF16ToASCII(output)); |
@@ -135,7 +135,7 @@ TEST_F(RenderViewTest, MacTestCmdUp) { |
EditCommands(1, EditCommand("moveToBeginningOfDocument", ""))); |
SendNativeKeyEvent(NativeWebKeyboardEvent(arrowUpKeyDown)); |
ProcessPendingMessages(); |
- ExecuteJavaScript("scroll.textContent = window.pageYOffset"); |
+ ExecuteJavaScriptForTests("scroll.textContent = window.pageYOffset"); |
output = GetMainFrame()->contentAsText(kMaxOutputCharacters); |
EXPECT_EQ(kArrowUpNoScroll, base::UTF16ToASCII(output)); |
} |