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

Unified Diff: content/shell/renderer/test_runner/test_runner.cc

Issue 200663002: Add 'waitUntilExternalURLLoad' method to TestRunner. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove extra whitespace Created 6 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
« no previous file with comments | « content/shell/renderer/test_runner/test_runner.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/renderer/test_runner/test_runner.cc
diff --git a/content/shell/renderer/test_runner/test_runner.cc b/content/shell/renderer/test_runner/test_runner.cc
index 692b4d2548a1789bd69b92550a84915768955b7a..0c693f589bf19ec7d4d89cdc30a2bb004fc120ce 100644
--- a/content/shell/renderer/test_runner/test_runner.cc
+++ b/content/shell/renderer/test_runner/test_runner.cc
@@ -223,6 +223,7 @@ class TestRunnerBindings : public gin::Wrappable<TestRunnerBindings> {
void SetWillSendRequestClearHeader(const std::string& header);
void DumpResourceRequestPriorities();
void SetUseMockTheme(bool use);
+ void WaitUntilExternalURLLoad();
void ShowWebInspector(gin::Arguments* args);
void CloseWebInspector();
bool IsChooserShown();
@@ -444,6 +445,8 @@ gin::ObjectTemplateBuilder TestRunnerBindings::GetObjectTemplateBuilder(
.SetMethod("dumpResourceRequestPriorities",
&TestRunnerBindings::DumpResourceRequestPriorities)
.SetMethod("setUseMockTheme", &TestRunnerBindings::SetUseMockTheme)
+ .SetMethod("waitUntilExternalURLLoad",
+ &TestRunnerBindings::WaitUntilExternalURLLoad)
.SetMethod("showWebInspector", &TestRunnerBindings::ShowWebInspector)
.SetMethod("closeWebInspector", &TestRunnerBindings::CloseWebInspector)
.SetMethod("isChooserShown", &TestRunnerBindings::IsChooserShown)
@@ -1102,6 +1105,11 @@ void TestRunnerBindings::SetUseMockTheme(bool use) {
runner_->SetUseMockTheme(use);
}
+void TestRunnerBindings::WaitUntilExternalURLLoad() {
+ if (runner_)
+ runner_->WaitUntilExternalURLLoad();
+}
+
void TestRunnerBindings::ShowWebInspector(gin::Arguments* args) {
if (runner_) {
std::string settings;
@@ -1423,6 +1431,7 @@ void TestRunner::Reset() {
top_loading_frame_ = NULL;
wait_until_done_ = false;
+ wait_until_external_url_load_ = false;
policy_delegate_enabled_ = false;
policy_delegate_is_permissive_ = false;
policy_delegate_should_notify_done_ = false;
@@ -1643,6 +1652,10 @@ bool TestRunner::shouldStayOnPageAfterHandlingBeforeUnload() const {
return should_stay_on_page_after_handling_before_unload_;
}
+bool TestRunner::shouldWaitUntilExternalURLLoad() const {
+ return wait_until_external_url_load_;
+}
+
const std::set<std::string>* TestRunner::httpHeadersToClear() const {
return &http_headers_to_clear_;
}
@@ -2471,6 +2484,10 @@ void TestRunner::ShowWebInspector(const std::string& str,
showDevTools(str, frontend_url);
}
+void TestRunner::WaitUntilExternalURLLoad() {
+ wait_until_external_url_load_ = true;
+}
+
void TestRunner::CloseWebInspector() {
delegate_->closeDevTools();
}
« no previous file with comments | « content/shell/renderer/test_runner/test_runner.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698