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

Side by Side Diff: chrome/browser/renderer_host/site_per_process_text_input_browsertest.cc

Issue 2503453003: Remove all calls to domAutomationController.setAutomationId.
Patch Set: Fix nacl_browsertest_util.cc Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <vector> 5 #include <vector>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/chrome_content_browser_client.h" 10 #include "chrome/browser/chrome_content_browser_client.h"
(...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1119 embedded_test_server()->GetURL("b.com", "/page_with_input_field.html")); 1119 embedded_test_server()->GetURL("b.com", "/page_with_input_field.html"));
1120 EXPECT_TRUE(NavigateIframeToURL(web_contents, "child0", frame_url)); 1120 EXPECT_TRUE(NavigateIframeToURL(web_contents, "child0", frame_url));
1121 1121
1122 // Focus the subframe and then its input field. The return value 1122 // Focus the subframe and then its input field. The return value
1123 // "input-focus" will be sent once the input field's focus event fires. 1123 // "input-focus" will be sent once the input field's focus event fires.
1124 content::RenderFrameHost* child = 1124 content::RenderFrameHost* child =
1125 ChildFrameAt(web_contents->GetMainFrame(), 0); 1125 ChildFrameAt(web_contents->GetMainFrame(), 0);
1126 std::string result; 1126 std::string result;
1127 std::string script = 1127 std::string script =
1128 "function onInput(e) {" 1128 "function onInput(e) {"
1129 " domAutomationController.setAutomationId(0);"
1130 " domAutomationController.send(getInputFieldText());" 1129 " domAutomationController.send(getInputFieldText());"
1131 "}" 1130 "}"
1132 "inputField = document.getElementById('text-field');" 1131 "inputField = document.getElementById('text-field');"
1133 "inputField.addEventListener('input', onInput, false);"; 1132 "inputField.addEventListener('input', onInput, false);";
1134 EXPECT_TRUE(ExecuteScript(child, script)); 1133 EXPECT_TRUE(ExecuteScript(child, script));
1135 EXPECT_TRUE(ExecuteScriptAndExtractString( 1134 EXPECT_TRUE(ExecuteScriptAndExtractString(
1136 child, "window.focus(); focusInputField();", &result)); 1135 child, "window.focus(); focusInputField();", &result));
1137 EXPECT_EQ("input-focus", result); 1136 EXPECT_EQ("input-focus", result);
1138 EXPECT_EQ(child, web_contents->GetFocusedFrame()); 1137 EXPECT_EQ(child, web_contents->GetFocusedFrame());
1139 1138
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after
1508 1507
1509 // Request for the dictionary lookup and intercept the word on its way back. 1508 // Request for the dictionary lookup and intercept the word on its way back.
1510 // The request is always on the tab's view which is a RenderWidgetHostViewMac. 1509 // The request is always on the tab's view which is a RenderWidgetHostViewMac.
1511 content::AskForLookUpDictionaryForRange(page_rwhv, gfx::Range(0, 4)); 1510 content::AskForLookUpDictionaryForRange(page_rwhv, gfx::Range(0, 4));
1512 1511
1513 test_complete_waiter.Run(); 1512 test_complete_waiter.Run();
1514 } 1513 }
1515 #endif // defined(MAC_OSX) 1514 #endif // defined(MAC_OSX)
1516 1515
1517 #endif // !defined(OS_ANDROID) 1516 #endif // !defined(OS_ANDROID)
OLDNEW
« no previous file with comments | « chrome/browser/geolocation/geolocation_browsertest.cc ('k') | chrome/browser/resources/chromeos/merge_session_load.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698