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

Side by Side Diff: chrome/browser/notifications/message_center_notifications_unittest_win.cc

Issue 19027005: Hide notifications popups when entering fullscreen mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix remaining testing issues Created 7 years, 4 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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "base/prefs/testing_pref_service.h" 6 #include "base/prefs/testing_pref_service.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "base/test/test_timeouts.h" 8 #include "base/test/test_timeouts.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/notifications/message_center_notification_manager.h" 10 #include "chrome/browser/notifications/message_center_notification_manager.h"
(...skipping 23 matching lines...) Expand all
34 displayed_first_run_balloon_ = true; 34 displayed_first_run_balloon_ = true;
35 base::MessageLoop::current()->PostTask(FROM_HERE, quit_closure_); 35 base::MessageLoop::current()->PostTask(FROM_HERE, quit_closure_);
36 } 36 }
37 37
38 virtual void OnMessageCenterTrayChanged() OVERRIDE {} 38 virtual void OnMessageCenterTrayChanged() OVERRIDE {}
39 virtual bool ShowPopups() OVERRIDE { return true; } 39 virtual bool ShowPopups() OVERRIDE { return true; }
40 virtual void HidePopups() OVERRIDE {} 40 virtual void HidePopups() OVERRIDE {}
41 virtual bool ShowMessageCenter() OVERRIDE { return true; } 41 virtual bool ShowMessageCenter() OVERRIDE { return true; }
42 virtual bool ShowNotifierSettings() OVERRIDE { return true; } 42 virtual bool ShowNotifierSettings() OVERRIDE { return true; }
43 virtual void HideMessageCenter() OVERRIDE {} 43 virtual void HideMessageCenter() OVERRIDE {}
44 virtual MessageCenterTray* GetMessageCenterTray() OVERRIDE {
45 return &tray_;
46 }
44 47
45 bool displayed_first_run_balloon() const { 48 bool displayed_first_run_balloon() const {
46 return displayed_first_run_balloon_; 49 return displayed_first_run_balloon_;
47 } 50 }
48 private: 51 private:
49 MessageCenterTray tray_; 52 MessageCenterTray tray_;
50 base::Closure quit_closure_; 53 base::Closure quit_closure_;
51 bool displayed_first_run_balloon_; 54 bool displayed_first_run_balloon_;
52 }; 55 };
53 56
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 TEST_F(MessageCenterNotificationManagerTest, 152 TEST_F(MessageCenterNotificationManagerTest,
150 FirstRunNotShownWithMessageCenter) { 153 FirstRunNotShownWithMessageCenter) {
151 TestingProfile profile; 154 TestingProfile profile;
152 notification_manager()->Add(GetANotification("test"), &profile); 155 notification_manager()->Add(GetANotification("test"), &profile);
153 message_center()->SetMessageCenterVisible(true); 156 message_center()->SetMessageCenterVisible(true);
154 run_loop()->RunUntilIdle(); 157 run_loop()->RunUntilIdle();
155 EXPECT_FALSE(notification_manager()->FirstRunTimerIsActive()); 158 EXPECT_FALSE(notification_manager()->FirstRunTimerIsActive());
156 EXPECT_FALSE(DidFirstRunPref()); 159 EXPECT_FALSE(DidFirstRunPref());
157 } 160 }
158 } // namespace message_center 161 } // namespace message_center
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698