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

Side by Side Diff: chromeos/components/tether/host_scanner_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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/host_scanner.h" 5 #include "chromeos/components/tether/host_scanner.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 class HostScannerTest : public NetworkStateTest { 132 class HostScannerTest : public NetworkStateTest {
133 protected: 133 protected:
134 HostScannerTest() 134 HostScannerTest()
135 : test_devices_(cryptauth::GenerateTestRemoteDevices(4)), 135 : test_devices_(cryptauth::GenerateTestRemoteDevices(4)),
136 test_scanned_device_infos(CreateFakeScannedDeviceInfos(test_devices_)) { 136 test_scanned_device_infos(CreateFakeScannedDeviceInfos(test_devices_)) {
137 } 137 }
138 138
139 void SetUp() override { 139 void SetUp() override {
140 DBusThreadManager::Initialize(); 140 DBusThreadManager::Initialize();
141 NetworkStateTest::SetUp(); 141 NetworkStateTest::SetUp();
142 network_state_handler()->SetTetherTechnologyState(
143 NetworkStateHandler::TECHNOLOGY_ENABLED);
142 144
143 scanned_device_infos_so_far_.clear(); 145 scanned_device_infos_so_far_.clear();
144 146
145 fake_tether_host_fetcher_ = base::MakeUnique<FakeTetherHostFetcher>( 147 fake_tether_host_fetcher_ = base::MakeUnique<FakeTetherHostFetcher>(
146 test_devices_, false /* synchronously_reply_with_results */); 148 test_devices_, false /* synchronously_reply_with_results */);
147 fake_ble_connection_manager_ = base::MakeUnique<FakeBleConnectionManager>(); 149 fake_ble_connection_manager_ = base::MakeUnique<FakeBleConnectionManager>();
148 fake_host_scan_device_prioritizer_ = 150 fake_host_scan_device_prioritizer_ =
149 base::MakeUnique<FakeHostScanDevicePrioritizer>(); 151 base::MakeUnique<FakeHostScanDevicePrioritizer>();
150 fake_notification_presenter_ = 152 fake_notification_presenter_ =
151 base::MakeUnique<FakeNotificationPresenter>(); 153 base::MakeUnique<FakeNotificationPresenter>();
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 ->SendScannedDeviceListUpdate(scanned_device_infos_so_far_, 360 ->SendScannedDeviceListUpdate(scanned_device_infos_so_far_,
359 true /* is_final_scan_result */); 361 true /* is_final_scan_result */);
360 EXPECT_EQ(scanned_device_infos_so_far_, 362 EXPECT_EQ(scanned_device_infos_so_far_,
361 host_scanner_->most_recent_scan_results()); 363 host_scanner_->most_recent_scan_results());
362 EXPECT_FALSE(host_scanner_->IsScanActive()); 364 EXPECT_FALSE(host_scanner_->IsScanActive());
363 } 365 }
364 366
365 } // namespace tether 367 } // namespace tether
366 368
367 } // namespace chromeos 369 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/components/tether/active_host_network_state_updater_unittest.cc ('k') | chromeos/components/tether/initializer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698