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

Side by Side Diff: chrome/browser/chromeos/login/bluetooth_host_pairing_browsertest.cc

Issue 2937253003: cros: Replace BrowserThread::FILE in InputServiceProxy (Closed)
Patch Set: rebase Created 3 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
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 "base/memory/ptr_util.h" 5 #include "base/memory/ptr_util.h"
6 #include "base/memory/ref_counted.h" 6 #include "base/memory/ref_counted.h"
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "chrome/browser/chromeos/login/test/oobe_base_test.h" 9 #include "chrome/browser/chromeos/login/test/oobe_base_test.h"
10 #include "chrome/browser/chromeos/login/test/oobe_screen_waiter.h" 10 #include "chrome/browser/chromeos/login/test/oobe_screen_waiter.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 public: 60 public:
61 void OnConnectSuccess() { message_loop_.QuitWhenIdle(); } 61 void OnConnectSuccess() { message_loop_.QuitWhenIdle(); }
62 void OnConnectFailed(device::BluetoothDevice::ConnectErrorCode error) { 62 void OnConnectFailed(device::BluetoothDevice::ConnectErrorCode error) {
63 message_loop_.QuitWhenIdle(); 63 message_loop_.QuitWhenIdle();
64 } 64 }
65 65
66 protected: 66 protected:
67 using InputDeviceInfo = device::InputServiceLinux::InputDeviceInfo; 67 using InputDeviceInfo = device::InputServiceLinux::InputDeviceInfo;
68 68
69 BluetoothHostPairingNoInputTest() { 69 BluetoothHostPairingNoInputTest() {
70 InputServiceProxy::SetThreadIdForTesting(content::BrowserThread::UI); 70 InputServiceProxy::SetUseUIThreadForTesting(true);
71 device::InputServiceLinux::SetForTesting( 71 device::InputServiceLinux::SetForTesting(
72 base::MakeUnique<device::FakeInputServiceLinux>()); 72 base::MakeUnique<device::FakeInputServiceLinux>());
73 73
74 // Set up the fake Bluetooth environment. 74 // Set up the fake Bluetooth environment.
75 std::unique_ptr<bluez::BluezDBusManagerSetter> bluez_dbus_setter = 75 std::unique_ptr<bluez::BluezDBusManagerSetter> bluez_dbus_setter =
76 bluez::BluezDBusManager::GetSetterForTesting(); 76 bluez::BluezDBusManager::GetSetterForTesting();
77 bluez_dbus_setter->SetBluetoothAdapterClient( 77 bluez_dbus_setter->SetBluetoothAdapterClient(
78 base::MakeUnique<bluez::FakeBluetoothAdapterClient>()); 78 base::MakeUnique<bluez::FakeBluetoothAdapterClient>());
79 bluez_dbus_setter->SetBluetoothDeviceClient( 79 bluez_dbus_setter->SetBluetoothDeviceClient(
80 base::MakeUnique<bluez::FakeBluetoothDeviceClient>()); 80 base::MakeUnique<bluez::FakeBluetoothDeviceClient>());
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 // Test that in normal user OOBE login flow for devices that have input devices, 251 // Test that in normal user OOBE login flow for devices that have input devices,
252 // the Bluetooth is disabled by default. 252 // the Bluetooth is disabled by default.
253 IN_PROC_BROWSER_TEST_F(BluetoothHostPairingWithInputTest, 253 IN_PROC_BROWSER_TEST_F(BluetoothHostPairingWithInputTest,
254 BluetoothDisableByDefault) { 254 BluetoothDisableByDefault) {
255 OobeScreenWaiter(OobeScreen::SCREEN_OOBE_NETWORK).Wait(); 255 OobeScreenWaiter(OobeScreen::SCREEN_OOBE_NETWORK).Wait();
256 EXPECT_FALSE(controller()); 256 EXPECT_FALSE(controller());
257 EXPECT_FALSE(bluetooth_adapter()); 257 EXPECT_FALSE(bluetooth_adapter());
258 } 258 }
259 259
260 } // namespace chromeos 260 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698