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

Unified Diff: headless/test/headless_browser_test.h

Issue 2024973002: headless: Allow protocol handler customization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments Created 4 years, 7 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: headless/test/headless_browser_test.h
diff --git a/headless/test/headless_browser_test.h b/headless/test/headless_browser_test.h
index 0249cee7198eb0ed57271e7f5430bb30122e3fc3..ca000dcdbf3f8d40ca7644f66294fb440a59a989 100644
--- a/headless/test/headless_browser_test.h
+++ b/headless/test/headless_browser_test.h
@@ -14,6 +14,9 @@ class RunLoop;
}
namespace headless {
+namespace runtime {
+class EvaluateResult;
+}
class HeadlessWebContents;
// Base class for tests which require a full instance of the headless browser.
@@ -44,6 +47,11 @@ class HeadlessBrowserTest : public content::BrowserTestBase {
// Synchronously waits for a tab to finish loading.
bool WaitForLoad(HeadlessWebContents* web_contents);
+ // Synchronously evaluates a script and returns the result.
+ std::unique_ptr<runtime::EvaluateResult> EvaluateScript(
+ HeadlessWebContents* web_contents,
+ const std::string& script);
+
protected:
// Returns the browser for the test.
HeadlessBrowser* browser() const;

Powered by Google App Engine
This is Rietveld 408576698