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

Side by Side Diff: chrome/browser/ui/views/message_center/web_notification_tray_browsertest.cc

Issue 1349783006: Cleanup: Pass std::string as const reference if possible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert third_party changes Created 5 years, 3 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/ui/views/message_center/web_notification_tray.h" 5 #include "chrome/browser/ui/views/message_center/web_notification_tray.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "ash/root_window_controller.h" 9 #include "ash/root_window_controller.h"
10 #include "ash/system/status_area_widget.h" 10 #include "ash/system/status_area_widget.h"
(...skipping 28 matching lines...) Expand all
39 WebNotificationTrayTest() {} 39 WebNotificationTrayTest() {}
40 ~WebNotificationTrayTest() override {} 40 ~WebNotificationTrayTest() override {}
41 41
42 void TearDownOnMainThread() override { 42 void TearDownOnMainThread() override {
43 message_center::MessageCenter::Get()->RemoveAllNotifications(false); 43 message_center::MessageCenter::Get()->RemoveAllNotifications(false);
44 } 44 }
45 45
46 protected: 46 protected:
47 class TestNotificationDelegate : public ::NotificationDelegate { 47 class TestNotificationDelegate : public ::NotificationDelegate {
48 public: 48 public:
49 explicit TestNotificationDelegate(std::string id) : id_(id) {} 49 explicit TestNotificationDelegate(const std::string& id) : id_(id) {}
50 std::string id() const override { return id_; } 50 std::string id() const override { return id_; }
51 51
52 private: 52 private:
53 ~TestNotificationDelegate() override {} 53 ~TestNotificationDelegate() override {}
54 54
55 std::string id_; 55 std::string id_;
56 }; 56 };
57 57
58 void AddNotification(const std::string& delegate_id, 58 void AddNotification(const std::string& delegate_id,
59 const std::string& replace_id) { 59 const std::string& replace_id) {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 tray->message_center_tray_->HidePopupBubble(); 184 tray->message_center_tray_->HidePopupBubble();
185 tray->message_center_tray_->ShowPopupBubble(); 185 tray->message_center_tray_->ShowPopupBubble();
186 EXPECT_TRUE(tray->message_center_tray_->popups_visible()); 186 EXPECT_TRUE(tray->message_center_tray_->popups_visible());
187 EXPECT_EQ(notifications_to_add, message_center->NotificationCount()); 187 EXPECT_EQ(notifications_to_add, message_center->NotificationCount());
188 NotificationList::PopupNotifications popups = 188 NotificationList::PopupNotifications popups =
189 message_center->GetPopupNotifications(); 189 message_center->GetPopupNotifications();
190 EXPECT_EQ(kMaxVisiblePopupNotifications, popups.size()); 190 EXPECT_EQ(kMaxVisiblePopupNotifications, popups.size());
191 } 191 }
192 192
193 } // namespace message_center 193 } // namespace message_center
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698