Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2800)

Unified Diff: ash/system/web_notification/web_notification_tray_unittest.cc

Issue 2583393002: Send notification to users upon receiving sms messages (Closed)
Patch Set: update return type Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shelf/shelf_layout_manager_unittest.cc ('k') | ash/test/test_system_tray_item.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/web_notification/web_notification_tray_unittest.cc
diff --git a/ash/system/web_notification/web_notification_tray_unittest.cc b/ash/system/web_notification/web_notification_tray_unittest.cc
index 262a17f86409a6255b70bd532644517ab1295c9f..3dd13f6517a4067c9a65ea9180b02a9751e826c8 100644
--- a/ash/system/web_notification/web_notification_tray_unittest.cc
+++ b/ash/system/web_notification/web_notification_tray_unittest.cc
@@ -80,10 +80,6 @@ class TestItem : public SystemTrayItem {
return default_view;
}
- views::View* CreateNotificationView(LoginStatus status) override {
- return new views::View;
- }
-
private:
DISALLOW_COPY_AND_ASSIGN(TestItem);
};
@@ -311,26 +307,6 @@ TEST_P(WebNotificationTrayTest, PopupAndSystemTray) {
EXPECT_TRUE(GetTray()->IsPopupVisible());
int bottom_with_tray = GetPopupWorkAreaBottom();
EXPECT_GT(bottom, bottom_with_tray);
-
- // System tray notification is also created, the popup's work area is narrowed
- // even more, but still visible.
- GetSystemTray()->ShowNotificationView(test_item);
- EXPECT_TRUE(GetTray()->IsPopupVisible());
- int bottom_with_tray_notification = GetPopupWorkAreaBottom();
- EXPECT_GT(bottom, bottom_with_tray_notification);
- EXPECT_GT(bottom_with_tray, bottom_with_tray_notification);
-
- // Close system tray, only system tray notifications.
- GetSystemTray()->ClickedOutsideBubble();
- EXPECT_TRUE(GetTray()->IsPopupVisible());
- int bottom_with_notification = GetPopupWorkAreaBottom();
- EXPECT_GT(bottom, bottom_with_notification);
- EXPECT_LT(bottom_with_tray_notification, bottom_with_notification);
-
- // Close the system tray notifications.
- GetSystemTray()->HideNotificationView(test_item);
- EXPECT_TRUE(GetTray()->IsPopupVisible());
- EXPECT_EQ(bottom, GetPopupWorkAreaBottom());
}
TEST_P(WebNotificationTrayTest, PopupAndAutoHideShelf) {
@@ -364,30 +340,6 @@ TEST_P(WebNotificationTrayTest, PopupAndAutoHideShelf) {
EXPECT_TRUE(GetTray()->IsPopupVisible());
int bottom_with_tray = GetPopupWorkAreaBottom();
EXPECT_GT(bottom_auto_shown, bottom_with_tray);
-
- // Create tray notification.
- GetSystemTray()->ShowNotificationView(test_item);
- EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->GetAutoHideState());
- int bottom_with_tray_notification = GetPopupWorkAreaBottom();
- EXPECT_GT(bottom_with_tray, bottom_with_tray_notification);
-
- // Close the system tray.
- GetSystemTray()->ClickedOutsideBubble();
- shelf->UpdateAutoHideState();
- RunAllPendingInMessageLoop();
- EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->GetAutoHideState());
- int bottom_hidden_with_tray_notification = GetPopupWorkAreaBottom();
- EXPECT_LT(bottom_with_tray_notification,
- bottom_hidden_with_tray_notification);
- EXPECT_GT(bottom_auto_hidden, bottom_hidden_with_tray_notification);
-
- // Close the window again, which shows the shelf.
- widget.reset();
- EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->GetAutoHideState());
- int bottom_shown_with_tray_notification = GetPopupWorkAreaBottom();
- EXPECT_GT(bottom_hidden_with_tray_notification,
- bottom_shown_with_tray_notification);
- EXPECT_GT(bottom_auto_shown, bottom_shown_with_tray_notification);
}
TEST_P(WebNotificationTrayTest, PopupAndFullscreen) {
« no previous file with comments | « ash/shelf/shelf_layout_manager_unittest.cc ('k') | ash/test/test_system_tray_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698