Index: content/shell/browser/layout_test/layout_test_message_filter.cc |
diff --git a/content/shell/browser/layout_test/layout_test_message_filter.cc b/content/shell/browser/layout_test/layout_test_message_filter.cc |
index d0c3b0d82d7400823c1352f65ed9a5a37e114f0b..2b80628b92721c8582885696565f073d88368d11 100644 |
--- a/content/shell/browser/layout_test/layout_test_message_filter.cc |
+++ b/content/shell/browser/layout_test/layout_test_message_filter.cc |
@@ -42,6 +42,8 @@ void LayoutTestMessageFilter::OverrideThreadForMessage( |
const IPC::Message& message, BrowserThread::ID* thread) { |
if (message.type() == ShellViewHostMsg_ClearAllDatabases::ID) |
*thread = BrowserThread::FILE; |
+ if (message.type() == ShellViewHostMsg_SimulateWebNotificationClick::ID) |
+ *thread = BrowserThread::UI; |
} |
bool LayoutTestMessageFilter::OnMessageReceived(const IPC::Message& message) { |
@@ -58,6 +60,8 @@ bool LayoutTestMessageFilter::OnMessageReceived(const IPC::Message& message) { |
OnGrantWebNotificationPermission) |
IPC_MESSAGE_HANDLER(ShellViewHostMsg_ClearWebNotificationPermissions, |
OnClearWebNotificationPermissions) |
+ IPC_MESSAGE_HANDLER(ShellViewHostMsg_SimulateWebNotificationClick, |
+ OnSimulateWebNotificationClick) |
IPC_MESSAGE_HANDLER(ShellViewHostMsg_AcceptAllCookies, OnAcceptAllCookies) |
IPC_MESSAGE_HANDLER(ShellViewHostMsg_DeleteAllCookies, OnDeleteAllCookies) |
IPC_MESSAGE_UNHANDLED(handled = false) |
@@ -128,6 +132,14 @@ void LayoutTestMessageFilter::OnClearWebNotificationPermissions() { |
manager->ClearPermissions(); |
} |
+void LayoutTestMessageFilter::OnSimulateWebNotificationClick( |
+ const std::string& title) { |
+ LayoutTestNotificationManager* manager = |
+ LayoutTestContentBrowserClient::Get()->GetLayoutTestNotificationManager(); |
+ if (manager) |
+ manager->SimulateClick(title); |
+} |
+ |
void LayoutTestMessageFilter::OnAcceptAllCookies(bool accept) { |
ShellNetworkDelegate::SetAcceptAllCookies(accept); |
} |