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

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: rebase 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 8035992f329c48e9be608dc927e3eedd2b64efe7..b4e9442483c52c351978c307e92f55761676f0c6 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(
@@ -584,6 +588,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