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

Side by Side Diff: device/bluetooth/bluetooth_adapter_win_unittest.cc

Issue 288903003: [Bluetooth] Standardize Bluetooth device address format to XX:XX:XX:XX:XX:XX. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ChromeOS tests too Created 6 years, 7 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
« no previous file with comments | « device/bluetooth/bluetooth_adapter_win.cc ('k') | device/bluetooth/bluetooth_device.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <string> 5 #include <string>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/test/test_simple_task_runner.h" 9 #include "base/test/test_simple_task_runner.h"
10 #include "device/bluetooth/bluetooth_adapter.h" 10 #include "device/bluetooth/bluetooth_adapter.h"
11 #include "device/bluetooth/bluetooth_adapter_win.h" 11 #include "device/bluetooth/bluetooth_adapter_win.h"
12 #include "device/bluetooth/bluetooth_device.h" 12 #include "device/bluetooth/bluetooth_device.h"
13 #include "device/bluetooth/bluetooth_task_manager_win.h" 13 #include "device/bluetooth/bluetooth_task_manager_win.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 15
16 namespace { 16 namespace {
17 17
18 const char kAdapterAddress[] = "Bluetooth Adapter Address"; 18 const char kAdapterAddress[] = "A1:B2:C3:D4:E5:F6";
19 const char kAdapterName[] = "Bluetooth Adapter Name"; 19 const char kAdapterName[] = "Bluetooth Adapter Name";
20 20
21 21
22 void MakeDeviceState(const std::string& name, 22 void MakeDeviceState(const std::string& name,
23 const std::string& address, 23 const std::string& address,
24 device::BluetoothTaskManagerWin::DeviceState* state) { 24 device::BluetoothTaskManagerWin::DeviceState* state) {
25 state->name = name; 25 state->name = name;
26 state->address = address; 26 state->address = address;
27 state->bluetooth_class = 0; 27 state->bluetooth_class = 0;
28 state->authenticated = false; 28 state->authenticated = false;
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 ScopedVector<BluetoothTaskManagerWin::DeviceState> devices; 500 ScopedVector<BluetoothTaskManagerWin::DeviceState> devices;
501 devices.push_back(android_phone_state); 501 devices.push_back(android_phone_state);
502 devices.push_back(laptop_state); 502 devices.push_back(laptop_state);
503 devices.push_back(iphone_state); 503 devices.push_back(iphone_state);
504 504
505 adapter_win_->DevicesDiscovered(devices); 505 adapter_win_->DevicesDiscovered(devices);
506 EXPECT_EQ(3, adapter_observer_.num_device_added()); 506 EXPECT_EQ(3, adapter_observer_.num_device_added());
507 } 507 }
508 508
509 } // namespace device 509 } // namespace device
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_adapter_win.cc ('k') | device/bluetooth/bluetooth_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698