diff options
Diffstat (limited to 'webkit/tools/test_shell/layout_test_controller.cc')
-rw-r--r-- | webkit/tools/test_shell/layout_test_controller.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/webkit/tools/test_shell/layout_test_controller.cc b/webkit/tools/test_shell/layout_test_controller.cc index ba0382e..f3754ce 100644 --- a/webkit/tools/test_shell/layout_test_controller.cc +++ b/webkit/tools/test_shell/layout_test_controller.cc @@ -117,6 +117,7 @@ LayoutTestController::LayoutTestController(TestShell* shell) { BindMethod("setIconDatabaseEnabled", &LayoutTestController::setIconDatabaseEnabled); BindMethod("setCustomPolicyDelegate", &LayoutTestController::setCustomPolicyDelegate); BindMethod("waitForPolicyDelegate", &LayoutTestController::waitForPolicyDelegate); + BindMethod("setWillSendRequestReturnsNullOnRedirect", &LayoutTestController::setWillSendRequestReturnsNullOnRedirect); // The following are stubs. BindMethod("dumpAsWebArchive", &LayoutTestController::dumpAsWebArchive); @@ -587,6 +588,14 @@ void LayoutTestController::waitForPolicyDelegate( result->SetNull(); } +void LayoutTestController::setWillSendRequestReturnsNullOnRedirect( + const CppArgumentList& args, CppVariant* result) { + if (args.size() > 0 && args[0].isBool()) + shell_->delegate()->set_block_redirects(args[0].value.boolValue); + + result->SetNull(); +} + void LayoutTestController::pathToLocalResource( const CppArgumentList& args, CppVariant* result) { result->SetNull(); |