| Index: content/renderer/render_view_browsertest.cc
|
| diff --git a/content/renderer/render_view_browsertest.cc b/content/renderer/render_view_browsertest.cc
|
| index 658fb846b92bda7537e28fd55182590423c8ef39..44fbc194b054fe1ffd3a8e4a84bd6e00a0af3a6d 100644
|
| --- a/content/renderer/render_view_browsertest.cc
|
| +++ b/content/renderer/render_view_browsertest.cc
|
| @@ -427,8 +427,7 @@
|
|
|
| // Change the value of the input. We should have gotten an update state
|
| // notification. We need to spin the message loop to catch this update.
|
| - ExecuteJavaScriptForTests(
|
| - "document.getElementById('elt_text').value = 'foo';");
|
| + ExecuteJavaScript("document.getElementById('elt_text').value = 'foo';");
|
| ProcessPendingMessages();
|
| EXPECT_TRUE(render_thread_->sink().GetUniqueMessageMatching(
|
| ViewHostMsg_UpdateState::ID));
|
| @@ -964,7 +963,7 @@
|
| for (int i = 0; i < kRepeatCount; i++) {
|
| // Move the input focus to the first <input> element, where we should
|
| // activate IMEs.
|
| - ExecuteJavaScriptForTests("document.getElementById('test1').focus();");
|
| + ExecuteJavaScript("document.getElementById('test1').focus();");
|
| ProcessPendingMessages();
|
| render_thread_->sink().ClearMessages();
|
|
|
| @@ -984,7 +983,7 @@
|
|
|
| // Move the input focus to the second <input> element, where we should
|
| // de-activate IMEs.
|
| - ExecuteJavaScriptForTests("document.getElementById('test2').focus();");
|
| + ExecuteJavaScript("document.getElementById('test2').focus();");
|
| ProcessPendingMessages();
|
| render_thread_->sink().ClearMessages();
|
|
|
| @@ -1034,7 +1033,7 @@
|
| // the window focus while composing a CJK text. To handle such complicated
|
| // cases, this test should not only call IME-related functions in the
|
| // RenderWidget class, but also call some RenderWidget members, e.g.
|
| -// ExecuteJavaScriptForTests(), RenderWidget::OnSetFocus(), etc.
|
| +// ExecuteJavaScript(), RenderWidget::OnSetFocus(), etc.
|
| TEST_F(RenderViewImplTest, ImeComposition) {
|
| enum ImeCommand {
|
| IME_INITIALIZE,
|
| @@ -1109,7 +1108,7 @@
|
| "<div id=\"test1\" contenteditable=\"true\"></div>"
|
| "</body>"
|
| "</html>");
|
| - ExecuteJavaScriptForTests("document.getElementById('test1').focus();");
|
| + ExecuteJavaScript("document.getElementById('test1').focus();");
|
| break;
|
|
|
| case IME_SETINPUTMODE:
|
| @@ -1187,18 +1186,17 @@
|
| };
|
| for (size_t i = 0; i < arraysize(kTextDirection); ++i) {
|
| // Set the text direction of the <textarea> element.
|
| - ExecuteJavaScriptForTests("document.getElementById('test').focus();");
|
| + ExecuteJavaScript("document.getElementById('test').focus();");
|
| view()->OnSetTextDirection(kTextDirection[i].direction);
|
|
|
| // Write the values of its DOM 'dir' attribute and its CSS 'direction'
|
| // property to the <div> element.
|
| - ExecuteJavaScriptForTests(
|
| - "var result = document.getElementById('result');"
|
| - "var node = document.getElementById('test');"
|
| - "var style = getComputedStyle(node, null);"
|
| - "result.innerText ="
|
| - " node.getAttribute('dir') + ',' +"
|
| - " style.getPropertyValue('direction');");
|
| + ExecuteJavaScript("var result = document.getElementById('result');"
|
| + "var node = document.getElementById('test');"
|
| + "var style = getComputedStyle(node, null);"
|
| + "result.innerText ="
|
| + " node.getAttribute('dir') + ',' +"
|
| + " style.getPropertyValue('direction');");
|
|
|
| // Copy the document content to std::wstring and compare with the
|
| // expected result.
|
| @@ -1250,7 +1248,7 @@
|
| "</div>"
|
| "</body>"
|
| "</html>");
|
| - ExecuteJavaScriptForTests("document.getElementById('test').focus();");
|
| + ExecuteJavaScript("document.getElementById('test').focus();");
|
| render_thread_->sink().ClearMessages();
|
|
|
| static const MockKeyboard::Layout kLayouts[] = {
|
| @@ -1517,7 +1515,7 @@
|
| "</div>"
|
| "</body>"
|
| "</html>");
|
| - ExecuteJavaScriptForTests("document.getElementById('test').focus();");
|
| + ExecuteJavaScript("document.getElementById('test').focus();");
|
| render_thread_->sink().ClearMessages();
|
|
|
| // For each key code, we send three keyboard events.
|
| @@ -1743,7 +1741,7 @@
|
| #endif
|
|
|
| LoadHTML("<textarea id=\"test\"></textarea>");
|
| - ExecuteJavaScriptForTests("document.getElementById('test').focus();");
|
| + ExecuteJavaScript("document.getElementById('test').focus();");
|
|
|
| const base::string16 empty_string;
|
| const std::vector<blink::WebCompositionUnderline> empty_underline;
|
| @@ -1845,7 +1843,7 @@
|
| "<input id=\"test1\" value=\"some test text hello\"></input>"
|
| "</body>"
|
| "</html>");
|
| - ExecuteJavaScriptForTests("document.getElementById('test1').focus();");
|
| + ExecuteJavaScript("document.getElementById('test1').focus();");
|
| frame()->SetEditableSelectionOffsets(4, 8);
|
| const std::vector<blink::WebCompositionUnderline> empty_underline;
|
| frame()->SetCompositionFromExistingText(7, 10, empty_underline);
|
| @@ -1870,7 +1868,7 @@
|
| "<input id=\"test1\" value=\"abcdefghijklmnopqrstuvwxyz\"></input>"
|
| "</body>"
|
| "</html>");
|
| - ExecuteJavaScriptForTests("document.getElementById('test1').focus();");
|
| + ExecuteJavaScript("document.getElementById('test1').focus();");
|
| frame()->SetEditableSelectionOffsets(10, 10);
|
| frame()->ExtendSelectionAndDelete(3, 4);
|
| blink::WebTextInputInfo info = view()->webview()->textInputInfo();
|
| @@ -1943,7 +1941,7 @@
|
| LoadHTML("<textarea id=\"test\"></textarea>");
|
|
|
| view()->handling_input_event_ = true;
|
| - ExecuteJavaScriptForTests("document.getElementById('test').focus();");
|
| + ExecuteJavaScript("document.getElementById('test').focus();");
|
|
|
| bool is_input_type_called = false;
|
| bool is_selection_called = false;
|
| @@ -2131,7 +2129,7 @@
|
| LoadHTML("<input id='test1' value='hello1'></input>"
|
| "<input id='test2' value='hello2'></input>");
|
|
|
| - ExecuteJavaScriptForTests("document.getElementById('test1').focus();");
|
| + ExecuteJavaScript("document.getElementById('test1').focus();");
|
| const IPC::Message* msg1 = render_thread_->sink().GetFirstMessageMatching(
|
| ViewHostMsg_FocusedNodeChanged::ID);
|
| EXPECT_TRUE(msg1);
|
| @@ -2141,7 +2139,7 @@
|
| EXPECT_TRUE(base::get<0>(params));
|
| render_thread_->sink().ClearMessages();
|
|
|
| - ExecuteJavaScriptForTests("document.getElementById('test2').focus();");
|
| + ExecuteJavaScript("document.getElementById('test2').focus();");
|
| const IPC::Message* msg2 = render_thread_->sink().GetFirstMessageMatching(
|
| ViewHostMsg_FocusedNodeChanged::ID);
|
| EXPECT_TRUE(msg2);
|
| @@ -2356,7 +2354,7 @@
|
| base::ThreadTaskRunnerHandle::Get()->PostTask(
|
| FROM_HERE,
|
| base::Bind(&DevToolsAgentTest::CloseWhilePaused, base::Unretained(this)));
|
| - ExecuteJavaScriptForTests("debugger;");
|
| + ExecuteJavaScript("debugger;");
|
|
|
| // CloseWhilePaused should resume execution and continue here.
|
| EXPECT_FALSE(IsPaused());
|
|
|