diff options
author | johnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-14 19:33:34 +0000 |
---|---|---|
committer | johnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-14 19:33:34 +0000 |
commit | 33410c838b3d0ad411bb16b905e0188eacb40fb9 (patch) | |
tree | 52a98500792b161b07cf510159958eb5af7956cf /webkit/tools/test_shell/layout_test_controller.cc | |
parent | 79d3f1e0cd308344a0b59c28e4d305252267a409 (diff) | |
download | chromium_src-33410c838b3d0ad411bb16b905e0188eacb40fb9.zip chromium_src-33410c838b3d0ad411bb16b905e0188eacb40fb9.tar.gz chromium_src-33410c838b3d0ad411bb16b905e0188eacb40fb9.tar.bz2 |
Enable support for notifications layout tests in test shell.
BUG=none
TEST=notifications layout tests
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=44372
Reverted.
Review URL: http://codereview.chromium.org/1549039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44515 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.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/webkit/tools/test_shell/layout_test_controller.cc b/webkit/tools/test_shell/layout_test_controller.cc index 257ab41..08eb371 100644 --- a/webkit/tools/test_shell/layout_test_controller.cc +++ b/webkit/tools/test_shell/layout_test_controller.cc @@ -25,6 +25,7 @@ #include "webkit/glue/dom_operations.h" #include "webkit/glue/webkit_glue.h" #include "webkit/glue/webpreferences.h" +#include "webkit/tools/test_shell/notification_presenter.h" #include "webkit/tools/test_shell/simple_database_system.h" #include "webkit/tools/test_shell/simple_resource_loader_bridge.h" #include "webkit/tools/test_shell/test_navigation_controller.h" @@ -135,6 +136,7 @@ LayoutTestController::LayoutTestController(TestShell* shell) : BindMethod("pageNumberForElementById", &LayoutTestController::pageNumberForElementById); BindMethod("numberOfPages", &LayoutTestController::numberOfPages); BindMethod("dumpSelectionRect", &LayoutTestController::dumpSelectionRect); + BindMethod("grantDesktopNotificationPermission", &LayoutTestController::grantDesktopNotificationPermission); // The following are stubs. BindMethod("dumpAsWebArchive", &LayoutTestController::dumpAsWebArchive); @@ -825,6 +827,17 @@ void LayoutTestController::callShouldCloseOnWebView( result->Set(rv); } +void LayoutTestController::grantDesktopNotificationPermission( + const CppArgumentList& args, CppVariant* result) { + if (args.size() != 1 || !args[0].isString()) { + result->Set(false); + return; + } + std::string origin = args[0].ToString(); + shell_->notification_presenter()->grantPermission(origin); + result->Set(true); +} + // // Unimplemented stubs // |