summaryrefslogtreecommitdiffstats
path: root/webkit/tools/test_shell/layout_test_controller.h
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/layout_test_controller.h
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/layout_test_controller.h')
-rw-r--r--webkit/tools/test_shell/layout_test_controller.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/webkit/tools/test_shell/layout_test_controller.h b/webkit/tools/test_shell/layout_test_controller.h
index 3f56bce..4522c84 100644
--- a/webkit/tools/test_shell/layout_test_controller.h
+++ b/webkit/tools/test_shell/layout_test_controller.h
@@ -110,6 +110,9 @@ class LayoutTestController : public CppBoundClass {
// don't actually want to open the mail program.
void setCustomPolicyDelegate(const CppArgumentList& args, CppVariant* result);
+ // Delays completion of the test until the policy delegate runs.
+ void waitForPolicyDelegate(const CppArgumentList& args, CppVariant* result);
+
// Converts a URL starting with file:///tmp/ to the local mapping.
void pathToLocalResource(const CppArgumentList& args, CppVariant* result);
@@ -206,6 +209,10 @@ class LayoutTestController : public CppBoundClass {
// Called by the webview delegate when the toplevel frame load is done.
void LocationChangeDone();
+ // Called by the webview delegate when the policy delegate runs if the
+ // waitForPolicyDelegate was called.
+ void PolicyDelegateDone();
+
// Reinitializes all static values. The Reset() method should be called
// before the start of each test (currently from
// TestShell::RunFileTest).