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

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

Issue 580243004: Remove unnecessary image downloading handler of notifications. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: build fix of desktop linux/win Created 6 years, 2 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(std::string id) : id_(id) {}
50 virtual void Display() override {} 50 virtual void Display() override {}
51 virtual void Error() override {} 51 virtual void Error() override {}
52 virtual void Close(bool by_user) override {} 52 virtual void Close(bool by_user) override {}
53 virtual void Click() override {} 53 virtual void Click() override {}
54 virtual std::string id() const override { return id_; } 54 virtual std::string id() const override { return id_; }
55 virtual content::WebContents* GetWebContents() const override {
56 return NULL;
57 }
58 55
59 private: 56 private:
60 virtual ~TestNotificationDelegate() {} 57 virtual ~TestNotificationDelegate() {}
61 58
62 std::string id_; 59 std::string id_;
63 }; 60 };
64 61
65 void AddNotification(const std::string& delegate_id, 62 void AddNotification(const std::string& delegate_id,
66 const std::string& replace_id) { 63 const std::string& replace_id) {
67 ::Notification notification( 64 ::Notification notification(
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 base::RunLoop().RunUntilIdle(); 253 base::RunLoop().RunUntilIdle();
257 EXPECT_TRUE(tray->status_icon_ == NULL); 254 EXPECT_TRUE(tray->status_icon_ == NULL);
258 AddNotification("test_id", "replace_id"); 255 AddNotification("test_id", "replace_id");
259 base::RunLoop().RunUntilIdle(); 256 base::RunLoop().RunUntilIdle();
260 EXPECT_TRUE(tray->status_icon_ != NULL); 257 EXPECT_TRUE(tray->status_icon_ != NULL);
261 RemoveNotification("test_id"); 258 RemoveNotification("test_id");
262 base::RunLoop().RunUntilIdle(); 259 base::RunLoop().RunUntilIdle();
263 EXPECT_TRUE(tray->status_icon_ == NULL); 260 EXPECT_TRUE(tray->status_icon_ == NULL);
264 } 261 }
265 } // namespace message_center 262 } // namespace message_center
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/apps/quit_with_apps_controller_mac.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698