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

Unified Diff: content/public/test/browser_test_utils.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 side-by-side diff with in-line comments
Download patch
Index: content/public/test/browser_test_utils.cc
diff --git a/content/public/test/browser_test_utils.cc b/content/public/test/browser_test_utils.cc
index 725456c384ee70162e673e3cfe0556da395ca275..b75e17b60ef6162c07083db662227b25fff8f615 100644
--- a/content/public/test/browser_test_utils.cc
+++ b/content/public/test/browser_test_utils.cc
@@ -137,17 +137,13 @@ bool ExecuteScriptHelper(RenderFrameHost* render_frame_host,
std::unique_ptr<base::Value>* result)
WARN_UNUSED_RESULT;
-// Executes the passed |original_script| in the frame specified by
-// |render_frame_host|. If |result| is not NULL, stores the value that the
-// evaluation of the script in |result|. Returns true on success.
+// Executes the passed |script| in the frame specified by |render_frame_host|.
+// If |result| is not NULL, stores the value that the evaluation of the script
+// in |result|. Returns true on success.
bool ExecuteScriptHelper(RenderFrameHost* render_frame_host,
- const std::string& original_script,
+ const std::string& script,
bool user_gesture,
std::unique_ptr<base::Value>* result) {
- // TODO(jcampan): we should make the domAutomationController not require an
- // automation id.
- std::string script =
- "window.domAutomationController.setAutomationId(0);" + original_script;
// TODO(lukasza): Only get messages from the specific |render_frame_host|.
DOMMessageQueue dom_message_queue(
WebContents::FromRenderFrameHost(render_frame_host));
@@ -216,12 +212,8 @@ bool ExecuteScriptInIsolatedWorldHelper(RenderFrameHost* render_frame_host,
bool ExecuteScriptInIsolatedWorldHelper(RenderFrameHost* render_frame_host,
const int world_id,
- const std::string& original_script,
+ const std::string& script,
std::unique_ptr<base::Value>* result) {
- // TODO(jcampan): we should make the domAutomationController not require an
- // automation id.
- std::string script =
- "window.domAutomationController.setAutomationId(0);" + original_script;
// TODO(lukasza): Only get messages from the specific |render_frame_host|.
DOMMessageQueue dom_message_queue(
WebContents::FromRenderFrameHost(render_frame_host));

Powered by Google App Engine
This is Rietveld 408576698