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

Side by Side Diff: chrome/browser/chromeos/mobile/mobile_activator_unittest.cc

Issue 477663004: Merged FakedDBusThreadManager with DBusThreadManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
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 "chrome/browser/chromeos/mobile/mobile_activator.h" 5 #include "chrome/browser/chromeos/mobile/mobile_activator.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chromeos/dbus/dbus_thread_manager.h" 9 #include "chromeos/dbus/dbus_thread_manager.h"
10 #include "chromeos/network/network_connection_handler.h" 10 #include "chromeos/network/network_connection_handler.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 MobileActivatorTest() 107 MobileActivatorTest()
108 : cellular_network_(string(kTestServicePath)), 108 : cellular_network_(string(kTestServicePath)),
109 mobile_activator_(&cellular_network_) { 109 mobile_activator_(&cellular_network_) {
110 cellular_network_.PropertyChanged(shill::kTypeProperty, 110 cellular_network_.PropertyChanged(shill::kTypeProperty,
111 base::StringValue(shill::kTypeCellular)); 111 base::StringValue(shill::kTypeCellular));
112 } 112 }
113 virtual ~MobileActivatorTest() {} 113 virtual ~MobileActivatorTest() {}
114 114
115 protected: 115 protected:
116 virtual void SetUp() { 116 virtual void SetUp() {
117 DBusThreadManager::InitializeWithStub(); 117 DBusThreadManager::Initialize();
118 NetworkHandler::Initialize(); 118 NetworkHandler::Initialize();
119 } 119 }
120 virtual void TearDown() { 120 virtual void TearDown() {
121 NetworkHandler::Shutdown(); 121 NetworkHandler::Shutdown();
122 DBusThreadManager::Shutdown(); 122 DBusThreadManager::Shutdown();
123 } 123 }
124 124
125 void set_activator_state(const MobileActivator::PlanActivationState state) { 125 void set_activator_state(const MobileActivator::PlanActivationState state) {
126 mobile_activator_.set_state_for_test(state); 126 mobile_activator_.set_state_for_test(state);
127 } 127 }
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 EXPECT_EQ(MobileActivator::PLAN_ACTIVATION_RECONNECTING, 351 EXPECT_EQ(MobileActivator::PLAN_ACTIVATION_RECONNECTING,
352 mobile_activator_.InvokePickNextState(&cellular_network_, 352 mobile_activator_.InvokePickNextState(&cellular_network_,
353 &error_description)); 353 &error_description));
354 set_activator_state(MobileActivator::PLAN_ACTIVATION_SHOWING_PAYMENT); 354 set_activator_state(MobileActivator::PLAN_ACTIVATION_SHOWING_PAYMENT);
355 EXPECT_EQ(MobileActivator::PLAN_ACTIVATION_RECONNECTING, 355 EXPECT_EQ(MobileActivator::PLAN_ACTIVATION_RECONNECTING,
356 mobile_activator_.InvokePickNextState(&cellular_network_, 356 mobile_activator_.InvokePickNextState(&cellular_network_,
357 &error_description)); 357 &error_description));
358 } 358 }
359 359
360 } // namespace chromeos 360 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698