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

Side by Side Diff: components/proximity_auth/bluetooth_connection_unittest.cc

Issue 2560713002: Move RemoteDevice from //components/proximity_auth to //components/cryptauth so that it can be easi… (Closed)
Patch Set: Add cryptauth dependency. Created 4 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/proximity_auth/bluetooth_connection.h" 5 #include "components/proximity_auth/bluetooth_connection.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
11 #include "base/numerics/safe_conversions.h" 11 #include "base/numerics/safe_conversions.h"
12 #include "base/run_loop.h" 12 #include "base/run_loop.h"
13 #include "components/cryptauth/remote_device.h"
13 #include "components/proximity_auth/proximity_auth_test_util.h" 14 #include "components/proximity_auth/proximity_auth_test_util.h"
14 #include "components/proximity_auth/remote_device.h"
15 #include "components/proximity_auth/wire_message.h" 15 #include "components/proximity_auth/wire_message.h"
16 #include "device/bluetooth/bluetooth_adapter_factory.h" 16 #include "device/bluetooth/bluetooth_adapter_factory.h"
17 #include "device/bluetooth/bluetooth_uuid.h" 17 #include "device/bluetooth/bluetooth_uuid.h"
18 #include "device/bluetooth/test/mock_bluetooth_adapter.h" 18 #include "device/bluetooth/test/mock_bluetooth_adapter.h"
19 #include "device/bluetooth/test/mock_bluetooth_device.h" 19 #include "device/bluetooth/test/mock_bluetooth_device.h"
20 #include "device/bluetooth/test/mock_bluetooth_socket.h" 20 #include "device/bluetooth/test/mock_bluetooth_socket.h"
21 #include "net/base/io_buffer.h" 21 #include "net/base/io_buffer.h"
22 #include "testing/gmock/include/gmock/gmock.h" 22 #include "testing/gmock/include/gmock/gmock.h"
23 #include "testing/gtest/include/gtest/gtest.h" 23 #include "testing/gtest/include/gtest/gtest.h"
24 24
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 EXPECT_TRUE(connection.IsConnected()); 478 EXPECT_TRUE(connection.IsConnected());
479 connection.DeviceChanged(adapter_.get(), &device_); 479 connection.DeviceChanged(adapter_.get(), &device_);
480 EXPECT_TRUE(connection.IsConnected()); 480 EXPECT_TRUE(connection.IsConnected());
481 481
482 // The connection disconnects and unregisters as an observer upon destruction. 482 // The connection disconnects and unregisters as an observer upon destruction.
483 EXPECT_CALL(*socket_, Disconnect(_)); 483 EXPECT_CALL(*socket_, Disconnect(_));
484 EXPECT_CALL(*adapter_, RemoveObserver(&connection)); 484 EXPECT_CALL(*adapter_, RemoveObserver(&connection));
485 } 485 }
486 486
487 } // namespace proximity_auth 487 } // namespace proximity_auth
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698