OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/macros.h" |
6 #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h" | 7 #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h" |
7 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" | 8 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" |
8 #include "chrome/browser/chromeos/net/network_portal_notification_controller.h" | 9 #include "chrome/browser/chromeos/net/network_portal_notification_controller.h" |
9 #include "chromeos/chromeos_switches.h" | 10 #include "chromeos/chromeos_switches.h" |
10 #include "chromeos/network/network_state.h" | 11 #include "chromeos/network/network_state.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
12 #include "ui/message_center/message_center.h" | 13 #include "ui/message_center/message_center.h" |
13 #include "ui/message_center/message_center_observer.h" | 14 #include "ui/message_center/message_center_observer.h" |
14 | 15 |
15 using message_center::MessageCenter; | 16 using message_center::MessageCenter; |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 // Network was switched (by shill or by user) to wifi1. Notification | 195 // Network was switched (by shill or by user) to wifi1. Notification |
195 // should be displayed. | 196 // should be displayed. |
196 OnPortalDetectionCompleted(&wifi1, portal_state); | 197 OnPortalDetectionCompleted(&wifi1, portal_state); |
197 ASSERT_TRUE(HasNotification()); | 198 ASSERT_TRUE(HasNotification()); |
198 EXPECT_EQ(2u, observer().add_count()); | 199 EXPECT_EQ(2u, observer().add_count()); |
199 EXPECT_EQ(1u, observer().remove_count()); | 200 EXPECT_EQ(1u, observer().remove_count()); |
200 EXPECT_EQ(1u, observer().update_count()); | 201 EXPECT_EQ(1u, observer().update_count()); |
201 } | 202 } |
202 | 203 |
203 } // namespace chromeos | 204 } // namespace chromeos |
OLD | NEW |