OLD | NEW |
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/chromeos/network/network_state_notifier.h" | 5 #include "ash/system/chromeos/network/network_state_notifier.h" |
6 | 6 |
7 #include "ash/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
8 #include "ash/shelf/shelf_widget.h" | 8 #include "ash/shelf/shelf_widget.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/system/chromeos/network/network_connect.h" | 10 #include "ash/system/chromeos/network/network_connect.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 base::StringValue("failure")); | 86 base::StringValue("failure")); |
87 RunAllPendingInMessageLoop(); | 87 RunAllPendingInMessageLoop(); |
88 } | 88 } |
89 | 89 |
90 private: | 90 private: |
91 DISALLOW_COPY_AND_ASSIGN(NetworkStateNotifierTest); | 91 DISALLOW_COPY_AND_ASSIGN(NetworkStateNotifierTest); |
92 }; | 92 }; |
93 | 93 |
94 TEST_F(NetworkStateNotifierTest, ConnectionFailure) { | 94 TEST_F(NetworkStateNotifierTest, ConnectionFailure) { |
95 EXPECT_FALSE(GetSystemTray()->HasNotificationBubble()); | 95 EXPECT_FALSE(GetSystemTray()->HasNotificationBubble()); |
96 ash::network_connect::ConnectToNetwork("wifi1", NULL /* owning_window */); | 96 ash::network_connect::ConnectToNetwork("wifi1"); |
97 RunAllPendingInMessageLoop(); | 97 RunAllPendingInMessageLoop(); |
98 // Failure should spawn a notification. | 98 // Failure should spawn a notification. |
99 message_center::MessageCenter* message_center = | 99 message_center::MessageCenter* message_center = |
100 message_center::MessageCenter::Get(); | 100 message_center::MessageCenter::Get(); |
101 EXPECT_TRUE(message_center->FindVisibleNotificationById( | 101 EXPECT_TRUE(message_center->FindVisibleNotificationById( |
102 network_connect::kNetworkConnectNotificationId)); | 102 network_connect::kNetworkConnectNotificationId)); |
103 } | 103 } |
104 | 104 |
105 } // namespace test | 105 } // namespace test |
106 } // namespace ash | 106 } // namespace ash |
OLD | NEW |