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

Side by Side Diff: ash/system/chromeos/network/network_state_notifier_unittest.cc

Issue 607613002: Elim parent_window parameter from network_connect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Elim includes 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 (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
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
OLDNEW
« no previous file with comments | « ash/system/chromeos/network/network_state_list_detailed_view.cc ('k') | ash/system/tray/default_system_tray_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698