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

Unified Diff: content/shell/renderer/test_runner/WebTestProxy.cpp

Issue 200663002: Add 'waitUntilExternalURLLoad' method to TestRunner. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add OVERRIDE to overrides. Created 6 years, 9 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/shell/renderer/test_runner/WebTestProxy.cpp
diff --git a/content/shell/renderer/test_runner/WebTestProxy.cpp b/content/shell/renderer/test_runner/WebTestProxy.cpp
index 6d16fda8fba37bba3bf339c833df0644614e7e7c..70f523b7414bded32dba94eb1080aab635c05c3f 100644
--- a/content/shell/renderer/test_runner/WebTestProxy.cpp
+++ b/content/shell/renderer/test_runner/WebTestProxy.cpp
@@ -1019,6 +1019,18 @@ bool WebTestProxyBase::isChooserShown()
return 0 < m_chooserCount;
}
+void WebTestProxyBase::loadURLExternally(WebFrame* frame, const WebURLRequest& request, WebNavigationPolicy policy, const WebString& suggested_name)
+{
+ if (m_testInterfaces->testRunner()->shouldWaitUntilExternURLLoad()) {
+ if (policy == WebNavigationPolicyDownload) {
+ m_delegate->printMessage(string("Downloading URL with suggested filename \"") + suggested_name.utf8() + "\"\n");
+ } else {
+ m_delegate->printMessage(string("Loading URL externally - \"") + URLDescription(request.url()) + "\"\n");
+ }
+ m_delegate->testFinished();
+ }
+}
+
void WebTestProxyBase::didStartProvisionalLoad(WebFrame* frame)
{
if (!m_testInterfaces->testRunner()->topLoadingFrame())

Powered by Google App Engine
This is Rietveld 408576698