summaryrefslogtreecommitdiffstats
path: root/webkit/tools/test_shell/layout_test_controller.cc
diff options
context:
space:
mode:
authorkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-22 07:21:56 +0000
committerkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-22 07:21:56 +0000
commit96fff3826f64c18c291435158bbe42f566b5269a (patch)
tree1c136f66d866cf4346b0804e16621a632fd96f8b /webkit/tools/test_shell/layout_test_controller.cc
parentb16ca0218156d4b3a60f1d179813f946eeec2c34 (diff)
downloadchromium_src-96fff3826f64c18c291435158bbe42f566b5269a.zip
chromium_src-96fff3826f64c18c291435158bbe42f566b5269a.tar.gz
chromium_src-96fff3826f64c18c291435158bbe42f566b5269a.tar.bz2
Implement layoutTestController.setWillSendRequestReturnsNull
BUG=32305 TEST=fast/loader/onload-willSendRequest-null-for-frame.html Review URL: http://codereview.chromium.org/552009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36855 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell/layout_test_controller.cc')
-rw-r--r--webkit/tools/test_shell/layout_test_controller.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/webkit/tools/test_shell/layout_test_controller.cc b/webkit/tools/test_shell/layout_test_controller.cc
index 9e36ada..3c94a91 100644
--- a/webkit/tools/test_shell/layout_test_controller.cc
+++ b/webkit/tools/test_shell/layout_test_controller.cc
@@ -119,6 +119,7 @@ LayoutTestController::LayoutTestController(TestShell* shell) :
BindMethod("setCustomPolicyDelegate", &LayoutTestController::setCustomPolicyDelegate);
BindMethod("waitForPolicyDelegate", &LayoutTestController::waitForPolicyDelegate);
BindMethod("setWillSendRequestReturnsNullOnRedirect", &LayoutTestController::setWillSendRequestReturnsNullOnRedirect);
+ BindMethod("setWillSendRequestReturnsNull", &LayoutTestController::setWillSendRequestReturnsNull);
BindMethod("whiteListAccessFromOrigin", &LayoutTestController::whiteListAccessFromOrigin);
BindMethod("clearAllDatabases", &LayoutTestController::clearAllDatabases);
BindMethod("setPOSIXLocale", &LayoutTestController::setPOSIXLocale);
@@ -636,6 +637,14 @@ void LayoutTestController::setWillSendRequestReturnsNullOnRedirect(
result->SetNull();
}
+void LayoutTestController::setWillSendRequestReturnsNull(
+ const CppArgumentList& args, CppVariant* result) {
+ if (args.size() > 0 && args[0].isBool())
+ shell_->delegate()->set_request_return_null(args[0].value.boolValue);
+
+ result->SetNull();
+}
+
void LayoutTestController::pathToLocalResource(
const CppArgumentList& args, CppVariant* result) {
result->SetNull();
@@ -1054,4 +1063,3 @@ void LayoutTestController::evaluateInWebInspector(const CppArgumentList& args,
shell_->dev_tools_agent()->evaluateInWebInspector(args[0].ToInt32(),
args[1].ToString());
}
-