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

Unified Diff: content/browser/frame_host/render_frame_host_impl.h

Issue 1123783002: Add ExecuteJavaScriptForTest and make all tests use it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: android Created 5 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/browser/frame_host/render_frame_host_impl.h
diff --git a/content/browser/frame_host/render_frame_host_impl.h b/content/browser/frame_host/render_frame_host_impl.h
index 030108250500b97a7a5f9918aae1a77049b7eb9a..2a69301d51d11fb5c96a3077961b419aea1c061b 100644
--- a/content/browser/frame_host/render_frame_host_impl.h
+++ b/content/browser/frame_host/render_frame_host_impl.h
@@ -139,6 +139,10 @@ class CONTENT_EXPORT RenderFrameHostImpl
void ExecuteJavaScript(const base::string16& javascript) override;
void ExecuteJavaScript(const base::string16& javascript,
const JavaScriptResultCallback& callback) override;
+ void ExecuteJavaScriptForTests(const base::string16& javascript) override;
+ void ExecuteJavaScriptForTests(
+ const base::string16& javascript,
+ const JavaScriptResultCallback& callback) override;
void ExecuteJavaScriptWithUserGestureForTests(
const base::string16& javascript) override;
void ExecuteJavaScriptInIsolatedWorld(
@@ -581,6 +585,9 @@ class CONTENT_EXPORT RenderFrameHostImpl
const CommonNavigationParams& common_params,
const RequestNavigationParams& request_params);
+ // Returns true if the ExecuteJavaScript() API can be used on this host.
+ bool CanExecuteJavaScript();
+
// For now, RenderFrameHosts indirectly keep RenderViewHosts alive via a
// refcount that calls Shutdown when it reaches zero. This allows each
// RenderFrameHostManager to just care about RenderFrameHosts, while ensuring

Powered by Google App Engine
This is Rietveld 408576698