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

Side by Side Diff: ash/system/web_notification/web_notification_tray_unittest.cc

Issue 1645843003: Implement Non-Closable Notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unnecessary property. Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/system/web_notification/web_notification_tray.h" 5 #include "ash/system/web_notification/web_notification_tray.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/display/display_manager.h" 10 #include "ash/display/display_manager.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 }; 87 };
88 88
89 } // namespace 89 } // namespace
90 90
91 class WebNotificationTrayTest : public test::AshTestBase { 91 class WebNotificationTrayTest : public test::AshTestBase {
92 public: 92 public:
93 WebNotificationTrayTest() {} 93 WebNotificationTrayTest() {}
94 ~WebNotificationTrayTest() override {} 94 ~WebNotificationTrayTest() override {}
95 95
96 void TearDown() override { 96 void TearDown() override {
97 GetMessageCenter()->RemoveAllNotifications(false); 97 GetMessageCenter()->RemoveAllNotifications(
98 false /* by_user */, message_center::MessageCenter::RemoveType::ALL);
98 test::AshTestBase::TearDown(); 99 test::AshTestBase::TearDown();
99 } 100 }
100 101
101 protected: 102 protected:
102 void AddNotification(const std::string& id) { 103 void AddNotification(const std::string& id) {
103 scoped_ptr<message_center::Notification> notification; 104 scoped_ptr<message_center::Notification> notification;
104 notification.reset(new message_center::Notification( 105 notification.reset(new message_center::Notification(
105 message_center::NOTIFICATION_TYPE_SIMPLE, id, 106 message_center::NOTIFICATION_TYPE_SIMPLE, id,
106 base::ASCIIToUTF16("Test Web Notification"), 107 base::ASCIIToUTF16("Test Web Notification"),
107 base::ASCIIToUTF16("Notification message body."), gfx::Image(), 108 base::ASCIIToUTF16("Notification message body."), gfx::Image(),
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 ui::TouchEvent release(ui::ET_TOUCH_RELEASED, out_of_bounds, touch_id, 523 ui::TouchEvent release(ui::ET_TOUCH_RELEASED, out_of_bounds, touch_id,
523 move.time_stamp()+base::TimeDelta::FromMilliseconds(50)); 524 move.time_stamp()+base::TimeDelta::FromMilliseconds(50));
524 generator.Dispatch(&release); 525 generator.Dispatch(&release);
525 EXPECT_FALSE(tray->draw_background_as_active()); 526 EXPECT_FALSE(tray->draw_background_as_active());
526 EXPECT_FALSE(tray->IsMessageCenterBubbleVisible()); 527 EXPECT_FALSE(tray->IsMessageCenterBubbleVisible());
527 } 528 }
528 529
529 #endif // OS_CHROMEOS 530 #endif // OS_CHROMEOS
530 531
531 } // namespace ash 532 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698