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

Unified Diff: content/public/test/browser_test_utils.h

Issue 2478803003: Remove DOMAutomationController::automation_id_ (Closed)
Patch Set: More of: Fixing issues caught by extra |expected_response| checks in ExecuteScript function. 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.h
diff --git a/content/public/test/browser_test_utils.h b/content/public/test/browser_test_utils.h
index da139cd59f7e811f1a14b406cd613931cde99291..0a187f104160bccb767fa008b0e5bc0aad222470 100644
--- a/content/public/test/browser_test_utils.h
+++ b/content/public/test/browser_test_utils.h
@@ -219,11 +219,18 @@ bool ExecuteScriptWithoutUserGesture(const ToRenderFrameHost& adapter,
const std::string& script)
WARN_UNUSED_RESULT;
-// The following methods execute the passed |script| in the specified frame with
-// the user gesture and set |result| to the value passed to
-// "window.domAutomationController.send" by the executed script. They return
-// true on success, false if the script execution failed or did not evaluate to
-// the expected type.
+// Kicks off execution of the |script| in the specified frame and returns
+// immediately (unlike ExecuteScript above).
mmenke 2017/07/06 16:10:34 I guess ExecuteScript waits for completion? That
Łukasz Anforowicz 2017/07/06 16:46:56 Done.
+//
+// This function is useful when extra calls to domAutomationController.send
+// are undesirable.
+void ExecuteUnmodifiedScript(const ToRenderFrameHost& adapter,
mmenke 2017/07/06 16:10:34 ExecuteUnmodifiedScript? Does ExecuteScript modif
Łukasz Anforowicz 2017/07/06 16:46:56 Done.
+ const std::string& script);
+
+// The following methods execute the passed |script| in the specified frame and
+// sets |result| to the value passed to "window.domAutomationController.send" by
+// the executed script. They return true on success, false if the script
+// execution failed or did not evaluate to the expected type.
bool ExecuteScriptAndExtractDouble(const ToRenderFrameHost& adapter,
const std::string& script,
double* result) WARN_UNUSED_RESULT;
@@ -521,6 +528,7 @@ class DOMMessageQueue : public NotificationObserver,
NotificationRegistrar registrar_;
std::queue<std::string> message_queue_;
scoped_refptr<MessageLoopRunner> message_loop_runner_;
+ bool renderer_crashed_ = false;
DISALLOW_COPY_AND_ASSIGN(DOMMessageQueue);
};

Powered by Google App Engine
This is Rietveld 408576698