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

Side by Side Diff: chromeos/components/tether/active_host_network_state_updater_unittest.cc

Issue 2819993002: [CrOS Tether] Add the notion of a tether DeviceState. (Closed)
Patch Set: stevenjb@ comment. Created 3 years, 8 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 "chromeos/components/tether/active_host_network_state_updater.h" 5 #include "chromeos/components/tether/active_host_network_state_updater.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 29 matching lines...) Expand all
40 } // namespace 40 } // namespace
41 41
42 class ActiveHostNetworkStateUpdaterTest : public NetworkStateTest { 42 class ActiveHostNetworkStateUpdaterTest : public NetworkStateTest {
43 protected: 43 protected:
44 ActiveHostNetworkStateUpdaterTest() : NetworkStateTest() {} 44 ActiveHostNetworkStateUpdaterTest() : NetworkStateTest() {}
45 ~ActiveHostNetworkStateUpdaterTest() override {} 45 ~ActiveHostNetworkStateUpdaterTest() override {}
46 46
47 void SetUp() override { 47 void SetUp() override {
48 DBusThreadManager::Initialize(); 48 DBusThreadManager::Initialize();
49 NetworkStateTest::SetUp(); 49 NetworkStateTest::SetUp();
50 network_state_handler()->SetTetherTechnologyState(
51 NetworkStateHandler::TECHNOLOGY_ENABLED);
50 SetUpTetherNetwork(); 52 SetUpTetherNetwork();
51 SetUpWifiNetwork(); 53 SetUpWifiNetwork();
52 54
53 fake_active_host_ = base::MakeUnique<FakeActiveHost>(); 55 fake_active_host_ = base::MakeUnique<FakeActiveHost>();
54 56
55 updater_ = base::WrapUnique(new ActiveHostNetworkStateUpdater( 57 updater_ = base::WrapUnique(new ActiveHostNetworkStateUpdater(
56 fake_active_host_.get(), network_state_handler())); 58 fake_active_host_.get(), network_state_handler()));
57 } 59 }
58 60
59 void SetUpTetherNetwork() { 61 void SetUpTetherNetwork() {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 kWifiNetworkGuid); 119 kWifiNetworkGuid);
118 VerifyConnected(); 120 VerifyConnected();
119 121
120 fake_active_host_->SetActiveHostDisconnected(); 122 fake_active_host_->SetActiveHostDisconnected();
121 VerifyDisconnected(); 123 VerifyDisconnected();
122 } 124 }
123 125
124 } // namespace tether 126 } // namespace tether
125 127
126 } // namespace chromeos 128 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/components/tether/BUILD.gn ('k') | chromeos/components/tether/host_scanner_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698