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

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

Issue 1804023002: Fix page zoom to be frame-centric for out-of-process frames. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 4 years, 8 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 a76aa3020e40b35af6d0e70ae9921d906ab4a7ef..9efdc54b1f187d801e7af745be4ed22f02e2d61b 100644
--- a/content/public/test/browser_test_utils.cc
+++ b/content/public/test/browser_test_utils.cc
@@ -663,6 +663,18 @@ bool ExecuteScript(const ToRenderFrameHost& adapter,
return ExecuteScriptHelper(adapter.render_frame_host(), new_script, NULL);
}
+bool ExecuteScriptAndExtractDouble(const ToRenderFrameHost& adapter,
+ const std::string& script, double* result) {
+ DCHECK(result);
+ std::unique_ptr<base::Value> value;
+ if (!ExecuteScriptHelper(adapter.render_frame_host(), script, &value) ||
+ !value.get()) {
+ return false;
+ }
+
+ return value->GetAsDouble(result);
+}
+
bool ExecuteScriptAndExtractInt(const ToRenderFrameHost& adapter,
const std::string& script, int* result) {
DCHECK(result);

Powered by Google App Engine
This is Rietveld 408576698