| 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/status_area_widget.h" | 10 #include "ash/system/status_area_widget.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 namespace test { | 35 namespace test { |
| 36 | 36 |
| 37 class NetworkStateNotifierTest : public AshTestBase { | 37 class NetworkStateNotifierTest : public AshTestBase { |
| 38 public: | 38 public: |
| 39 NetworkStateNotifierTest() {} | 39 NetworkStateNotifierTest() {} |
| 40 virtual ~NetworkStateNotifierTest() {} | 40 virtual ~NetworkStateNotifierTest() {} |
| 41 | 41 |
| 42 virtual void SetUp() OVERRIDE { | 42 virtual void SetUp() OVERRIDE { |
| 43 DBusThreadManager::InitializeWithStub(); | 43 DBusThreadManager::InitializeWithStub(); |
| 44 SetupDefaultShillState(); | 44 SetupDefaultShillState(); |
| 45 NetworkHandler::Initialize(); | 45 NetworkHandler::InitializeForTest(); |
| 46 RunAllPendingInMessageLoop(); | 46 RunAllPendingInMessageLoop(); |
| 47 AshTestBase::SetUp(); | 47 AshTestBase::SetUp(); |
| 48 } | 48 } |
| 49 | 49 |
| 50 virtual void TearDown() OVERRIDE { | 50 virtual void TearDown() OVERRIDE { |
| 51 AshTestBase::TearDown(); | 51 AshTestBase::TearDown(); |
| 52 NetworkHandler::Shutdown(); | 52 NetworkHandler::Shutdown(); |
| 53 DBusThreadManager::Shutdown(); | 53 DBusThreadManager::Shutdown(); |
| 54 } | 54 } |
| 55 | 55 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 // Failure -> Idle should not spawn a notification | 101 // Failure -> Idle should not spawn a notification |
| 102 SetServiceState("wifi1", flimflam::kStateIdle); | 102 SetServiceState("wifi1", flimflam::kStateIdle); |
| 103 EXPECT_FALSE(GetSystemTray()->HasNotificationBubble()); | 103 EXPECT_FALSE(GetSystemTray()->HasNotificationBubble()); |
| 104 // Idle -> Failure should also not spawn a notification | 104 // Idle -> Failure should also not spawn a notification |
| 105 SetServiceState("wifi1", flimflam::kStateFailure); | 105 SetServiceState("wifi1", flimflam::kStateFailure); |
| 106 EXPECT_FALSE(GetSystemTray()->HasNotificationBubble()); | 106 EXPECT_FALSE(GetSystemTray()->HasNotificationBubble()); |
| 107 } | 107 } |
| 108 | 108 |
| 109 } // namespace test | 109 } // namespace test |
| 110 } // namespace ash | 110 } // namespace ash |
| OLD | NEW |