summaryrefslogtreecommitdiffstats
path: root/webkit/tools/test_shell/test_shell.cc
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-02 16:25:15 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-02 16:25:15 +0000
commitf56eed44ee5f199604fdf32cfab3d4abe183182a (patch)
tree0036230729aaf09d2f9c8fc057df006c91064505 /webkit/tools/test_shell/test_shell.cc
parent789fbb7cd36822230870c3beff00fa30b532d14e (diff)
downloadchromium_src-f56eed44ee5f199604fdf32cfab3d4abe183182a.zip
chromium_src-f56eed44ee5f199604fdf32cfab3d4abe183182a.tar.gz
chromium_src-f56eed44ee5f199604fdf32cfab3d4abe183182a.tar.bz2
Fix tests that depend on setCustomPolicyDelegate and waitForPolicyDelegate.
Changes: 1- Need to support a second parameter to setCustomPolicyDelegate that controls whether subsequent loads are permitted or not. Previously, we would always deny any subsequent loads. 2- Need to change the string that we produce when writing out the URL that is impacted by a custom policy delegate. We need to write out only the filename part of the URL. (We need to do this only for file:// URLs.) 3- Add LayoutTestController::waitForPolicyDelegate and corresponding method on TestWebViewDelegate. 4- Improve the way we reset the TestWebViewDelegate. Now, instead of having support for reseting individual fields, we just reallocate the delegate. This requires adding a SetDelegate method to WebView. BUG=9582 R=dglazkov Review URL: http://codereview.chromium.org/56169 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13014 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell/test_shell.cc')
-rwxr-xr-xwebkit/tools/test_shell/test_shell.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index 42193e8..8ac1e06 100755
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -449,6 +449,15 @@ void TestShell::SizeToDefault() {
SizeTo(kTestWindowWidth, kTestWindowHeight);
}
+void TestShell::ResetTestController() {
+ layout_test_controller_->Reset();
+ event_sending_controller_->Reset();
+
+ // Reset state in the test webview delegate.
+ delegate_ = new TestWebViewDelegate(this);
+ webView()->SetDelegate(delegate_);
+}
+
void TestShell::LoadURL(const wchar_t* url) {
LoadURLForFrame(url, NULL);
}