Index: chrome/browser/notifications/desktop_notifications_unittest.cc |
=================================================================== |
--- chrome/browser/notifications/desktop_notifications_unittest.cc (revision 109661) |
+++ chrome/browser/notifications/desktop_notifications_unittest.cc (working copy) |
@@ -9,7 +9,7 @@ |
#include "chrome/browser/prefs/browser_prefs.h" |
#include "chrome/common/pref_names.h" |
#include "chrome/test/base/testing_pref_service.h" |
-#include "content/common/desktop_notification_messages.h" |
+#include "content/public/common/show_desktop_notification_params.h" |
using content::BrowserThread; |
@@ -99,9 +99,9 @@ |
profile_.reset(NULL); |
} |
-DesktopNotificationHostMsg_Show_Params |
+content::ShowDesktopNotificationHostMsgParams |
DesktopNotificationsTest::StandardTestNotification() { |
- DesktopNotificationHostMsg_Show_Params params; |
+ content::ShowDesktopNotificationHostMsgParams params; |
params.notification_id = 0; |
params.origin = GURL("http://www.google.com"); |
params.is_html = false; |
@@ -113,7 +113,8 @@ |
} |
TEST_F(DesktopNotificationsTest, TestShow) { |
- DesktopNotificationHostMsg_Show_Params params = StandardTestNotification(); |
+ content::ShowDesktopNotificationHostMsgParams params = |
+ StandardTestNotification(); |
params.notification_id = 1; |
EXPECT_TRUE(service_->ShowDesktopNotification( |
@@ -121,7 +122,7 @@ |
MessageLoopForUI::current()->RunAllPending(); |
EXPECT_EQ(1, balloon_collection_->count()); |
- DesktopNotificationHostMsg_Show_Params params2; |
+ content::ShowDesktopNotificationHostMsgParams params2; |
params2.origin = GURL("http://www.google.com"); |
params2.is_html = true; |
params2.contents_url = GURL("http://www.google.com/notification.html"); |
@@ -138,7 +139,8 @@ |
} |
TEST_F(DesktopNotificationsTest, TestClose) { |
- DesktopNotificationHostMsg_Show_Params params = StandardTestNotification(); |
+ content::ShowDesktopNotificationHostMsgParams params = |
+ StandardTestNotification(); |
params.notification_id = 1; |
// Request a notification; should open a balloon. |
@@ -162,7 +164,8 @@ |
int route_id = 0; |
int notification_id = 1; |
- DesktopNotificationHostMsg_Show_Params params = StandardTestNotification(); |
+ content::ShowDesktopNotificationHostMsgParams params = |
+ StandardTestNotification(); |
params.notification_id = notification_id; |
// Request a notification; should open a balloon. |
@@ -187,7 +190,8 @@ |
#if defined(OS_WIN) || defined(TOOLKIT_VIEWS) |
TEST_F(DesktopNotificationsTest, TestPositioning) { |
- DesktopNotificationHostMsg_Show_Params params = StandardTestNotification(); |
+ content::ShowDesktopNotificationHostMsgParams params = |
+ StandardTestNotification(); |
std::string expected_log; |
// Create some toasts. After each but the first, make sure there |
// is a minimum separation between the toasts. |
@@ -207,7 +211,7 @@ |
} |
TEST_F(DesktopNotificationsTest, TestVariableSize) { |
- DesktopNotificationHostMsg_Show_Params params; |
+ content::ShowDesktopNotificationHostMsgParams params; |
params.origin = GURL("http://long.google.com"); |
params.is_html = false; |
params.icon_url = GURL("/icon.png"); |
@@ -254,7 +258,8 @@ |
int route_id = 0; |
// Request lots of identical notifications. |
- DesktopNotificationHostMsg_Show_Params params = StandardTestNotification(); |
+ content::ShowDesktopNotificationHostMsgParams params = |
+ StandardTestNotification(); |
const int kLotsOfToasts = 20; |
for (int id = 1; id <= kLotsOfToasts; ++id) { |
params.notification_id = id; |
@@ -308,7 +313,8 @@ |
TEST_F(DesktopNotificationsTest, TestEarlyDestruction) { |
// Create some toasts and then prematurely delete the notification service, |
// just to make sure nothing crashes/leaks. |
- DesktopNotificationHostMsg_Show_Params params = StandardTestNotification(); |
+ content::ShowDesktopNotificationHostMsgParams params = |
+ StandardTestNotification(); |
for (int id = 0; id <= 3; ++id) { |
params.notification_id = id; |
EXPECT_TRUE(service_->ShowDesktopNotification( |
@@ -320,7 +326,8 @@ |
TEST_F(DesktopNotificationsTest, TestUserInputEscaping) { |
// Create a test script with some HTML; assert that it doesn't get into the |
// data:// URL that's produced for the balloon. |
- DesktopNotificationHostMsg_Show_Params params = StandardTestNotification(); |
+ content::ShowDesktopNotificationHostMsgParams params = |
+ StandardTestNotification(); |
params.title = ASCIIToUTF16("<script>window.alert('uh oh');</script>"); |
params.body = ASCIIToUTF16("<i>this text is in italics</i>"); |
params.notification_id = 1; |
@@ -340,7 +347,8 @@ |
TEST_F(DesktopNotificationsTest, TestBoundingBox) { |
// Create some notifications. |
- DesktopNotificationHostMsg_Show_Params params = StandardTestNotification(); |
+ content::ShowDesktopNotificationHostMsgParams params = |
+ StandardTestNotification(); |
for (int id = 0; id <= 3; ++id) { |
params.notification_id = id; |
EXPECT_TRUE(service_->ShowDesktopNotification( |
@@ -377,7 +385,8 @@ |
BalloonCollection::LOWER_RIGHT); |
// Create some notifications. |
- DesktopNotificationHostMsg_Show_Params params = StandardTestNotification(); |
+ content::ShowDesktopNotificationHostMsgParams params = |
+ StandardTestNotification(); |
for (int id = 0; id <= 3; ++id) { |
params.notification_id = id; |
EXPECT_TRUE(service_->ShowDesktopNotification( |