OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/message_loop.h" | 6 #include "base/message_loop.h" |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chromeos/chromeos_switches.h" | 8 #include "chromeos/chromeos_switches.h" |
9 #include "chromeos/dbus/fake_bluetooth_adapter_client.h" | 9 #include "chromeos/dbus/fake_bluetooth_adapter_client.h" |
10 #include "chromeos/dbus/fake_bluetooth_device_client.h" | 10 #include "chromeos/dbus/fake_bluetooth_device_client.h" |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 | 331 |
332 TEST_F(BluetoothExperimentalChromeOSTest, AlreadyPresent) { | 332 TEST_F(BluetoothExperimentalChromeOSTest, AlreadyPresent) { |
333 GetAdapter(); | 333 GetAdapter(); |
334 | 334 |
335 // This verifies that the class gets the list of adapters when created; | 335 // This verifies that the class gets the list of adapters when created; |
336 // and initializes with an existing adapter if there is one. | 336 // and initializes with an existing adapter if there is one. |
337 EXPECT_TRUE(adapter_->IsPresent()); | 337 EXPECT_TRUE(adapter_->IsPresent()); |
338 EXPECT_FALSE(adapter_->IsPowered()); | 338 EXPECT_FALSE(adapter_->IsPowered()); |
339 EXPECT_EQ(FakeBluetoothAdapterClient::kAdapterAddress, | 339 EXPECT_EQ(FakeBluetoothAdapterClient::kAdapterAddress, |
340 adapter_->GetAddress()); | 340 adapter_->GetAddress()); |
341 EXPECT_EQ(FakeBluetoothAdapterClient::kAdapterName, adapter_->GetName()); | |
342 EXPECT_FALSE(adapter_->IsDiscovering()); | 341 EXPECT_FALSE(adapter_->IsDiscovering()); |
343 | 342 |
344 // There should be a device | 343 // There should be a device |
345 BluetoothAdapter::DeviceList devices = adapter_->GetDevices(); | 344 BluetoothAdapter::DeviceList devices = adapter_->GetDevices(); |
346 EXPECT_EQ(1U, devices.size()); | 345 EXPECT_EQ(1U, devices.size()); |
347 EXPECT_EQ(FakeBluetoothDeviceClient::kPairedDeviceAddress, | 346 EXPECT_EQ(FakeBluetoothDeviceClient::kPairedDeviceAddress, |
348 devices[0]->GetAddress()); | 347 devices[0]->GetAddress()); |
349 } | 348 } |
350 | 349 |
351 TEST_F(BluetoothExperimentalChromeOSTest, BecomePresent) { | 350 TEST_F(BluetoothExperimentalChromeOSTest, BecomePresent) { |
(...skipping 1632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1984 EXPECT_FALSE(device->IsConnected()); | 1983 EXPECT_FALSE(device->IsConnected()); |
1985 EXPECT_FALSE(device->IsConnecting()); | 1984 EXPECT_FALSE(device->IsConnecting()); |
1986 EXPECT_FALSE(device->IsPaired()); | 1985 EXPECT_FALSE(device->IsPaired()); |
1987 | 1986 |
1988 // Pairing dialog should be dismissed | 1987 // Pairing dialog should be dismissed |
1989 EXPECT_EQ(1, pairing_delegate.call_count_); | 1988 EXPECT_EQ(1, pairing_delegate.call_count_); |
1990 EXPECT_EQ(1, pairing_delegate.dismiss_count_); | 1989 EXPECT_EQ(1, pairing_delegate.dismiss_count_); |
1991 } | 1990 } |
1992 | 1991 |
1993 } // namespace chromeos | 1992 } // namespace chromeos |
OLD | NEW |