Add 'waitUntilExternalURLLoad' method to TestRunner.
This method can be used in layout tests to produce log output and end a
test when the WebFrameClient receives a loadURLExternally() call. This
happens if the content attempts to download a resource explicitly.
Required by Blink CL: https://codereview.chromium.org/197033005/
BUG=346744
Review URL: https://codereview.chromium.org/200663002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@266377 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/content/shell/renderer/test_runner/test_runner.h b/content/shell/renderer/test_runner/test_runner.h
index 4514c949..330d6457 100644
--- a/content/shell/renderer/test_runner/test_runner.h
+++ b/content/shell/renderer/test_runner/test_runner.h
@@ -105,6 +105,7 @@
bool shouldDumpProgressFinishedCallback() const;
bool shouldDumpSpellCheckCallbacks() const;
bool shouldStayOnPageAfterHandlingBeforeUnload() const;
+ bool shouldWaitUntilExternalURLLoad() const;
const std::set<std::string>* httpHeadersToClear() const;
void setTopLoadingFrame(blink::WebFrame*, bool);
blink::WebFrame* topLoadingFrame() const;
@@ -443,6 +444,10 @@
// Sets a flag to enable the mock theme.
void SetUseMockTheme(bool use);
+ // Sets a flag that causes the test to be marked as completed when the
+ // WebFrameClient receives a loadURLExternally() call.
+ void WaitUntilExternalURLLoad();
+
///////////////////////////////////////////////////////////////////////////
// Methods interacting with the WebTestProxy
@@ -534,6 +539,10 @@
// If true, don't dump output until notifyDone is called.
bool wait_until_done_;
+ // If true, ends the test when a URL is loaded externally via
+ // WebFrameClient::loadURLExternally().
+ bool wait_until_external_url_load_;
+
// Causes navigation actions just printout the intended navigation instead
// of taking you to the page. This is used for cases like mailto, where you
// don't actually want to open the mail program.