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

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: Remove 'anonymous'. 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 284498aeb9dbb4244b2c7a05153fd9b02593dc33..2869f3043f1b6610d264c6c496d0f1974df942f4 100644
--- a/content/public/test/browser_test_utils.cc
+++ b/content/public/test/browser_test_utils.cc
@@ -662,6 +662,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