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

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

Issue 289383004: Merge FavoriteState into NetworkState (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 6 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_handler.h" 10 #include "chromeos/network/network_handler.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 DBusThreadManager::Shutdown(); 94 DBusThreadManager::Shutdown();
95 } 95 }
96 96
97 void set_activator_state(const MobileActivator::PlanActivationState state) { 97 void set_activator_state(const MobileActivator::PlanActivationState state) {
98 mobile_activator_.state_ = state; 98 mobile_activator_.state_ = state;
99 } 99 }
100 void set_network_activation_state(const std::string& activation_state) { 100 void set_network_activation_state(const std::string& activation_state) {
101 cellular_network_.activation_state_ = activation_state; 101 cellular_network_.activation_state_ = activation_state;
102 } 102 }
103 void set_connection_state(const std::string& state) { 103 void set_connection_state(const std::string& state) {
104 cellular_network_.visible_ = true;
104 cellular_network_.connection_state_ = state; 105 cellular_network_.connection_state_ = state;
105 } 106 }
106 107
107 base::MessageLoop message_loop_; 108 base::MessageLoop message_loop_;
108 NetworkState cellular_network_; 109 NetworkState cellular_network_;
109 TestMobileActivator mobile_activator_; 110 TestMobileActivator mobile_activator_;
110 private: 111 private:
111 DISALLOW_COPY_AND_ASSIGN(MobileActivatorTest); 112 DISALLOW_COPY_AND_ASSIGN(MobileActivatorTest);
112 }; 113 };
113 114
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 TEST_F(MobileActivatorTest, StartAtStart) { 266 TEST_F(MobileActivatorTest, StartAtStart) {
266 EXPECT_CALL(mobile_activator_, HasRecentCellularPlanPayment()) 267 EXPECT_CALL(mobile_activator_, HasRecentCellularPlanPayment())
267 .WillOnce(Return(false)); 268 .WillOnce(Return(false));
268 EXPECT_CALL(mobile_activator_, 269 EXPECT_CALL(mobile_activator_,
269 EvaluateCellularNetwork(Eq(&cellular_network_))); 270 EvaluateCellularNetwork(Eq(&cellular_network_)));
270 mobile_activator_.StartActivation(); 271 mobile_activator_.StartActivation();
271 EXPECT_EQ(mobile_activator_.state(), MobileActivator::PLAN_ACTIVATION_START); 272 EXPECT_EQ(mobile_activator_.state(), MobileActivator::PLAN_ACTIVATION_START);
272 } 273 }
273 274
274 } // namespace chromeos 275 } // namespace chromeos
OLDNEW
« no previous file with comments | « ash/system/chromeos/network/network_state_list_detailed_view.cc ('k') | chrome/browser/chromeos/net/onc_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698