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

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

Issue 666133002: Standardize usage of virtual/override/final in components/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 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 "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/numerics/safe_conversions.h" 8 #include "base/numerics/safe_conversions.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "components/proximity_auth/remote_device.h" 10 #include "components/proximity_auth/remote_device.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 using BluetoothConnection::DeviceRemoved; 73 using BluetoothConnection::DeviceRemoved;
74 using BluetoothConnection::Disconnect; 74 using BluetoothConnection::Disconnect;
75 75
76 private: 76 private:
77 DISALLOW_COPY_AND_ASSIGN(MockBluetoothConnection); 77 DISALLOW_COPY_AND_ASSIGN(MockBluetoothConnection);
78 }; 78 };
79 79
80 class TestWireMessage : public WireMessage { 80 class TestWireMessage : public WireMessage {
81 public: 81 public:
82 TestWireMessage() : WireMessage("permit id", "payload") {} 82 TestWireMessage() : WireMessage("permit id", "payload") {}
83 virtual ~TestWireMessage() {} 83 ~TestWireMessage() override {}
84 84
85 virtual std::string Serialize() const override { return kSerializedMessage; } 85 std::string Serialize() const override { return kSerializedMessage; }
86 86
87 private: 87 private:
88 DISALLOW_COPY_AND_ASSIGN(TestWireMessage); 88 DISALLOW_COPY_AND_ASSIGN(TestWireMessage);
89 }; 89 };
90 90
91 } // namespace 91 } // namespace
92 92
93 class ProximityAuthBluetoothConnectionTest : public testing::Test { 93 class ProximityAuthBluetoothConnectionTest : public testing::Test {
94 public: 94 public:
95 ProximityAuthBluetoothConnectionTest() 95 ProximityAuthBluetoothConnectionTest()
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 442
443 ASSERT_FALSE(error_callback.is_null()); 443 ASSERT_FALSE(error_callback.is_null());
444 EXPECT_CALL(connection, OnDidSendMessage(Ref(*expected_wire_message), false)); 444 EXPECT_CALL(connection, OnDidSendMessage(Ref(*expected_wire_message), false));
445 EXPECT_CALL(connection, SetStatusProxy(Connection::DISCONNECTED)); 445 EXPECT_CALL(connection, SetStatusProxy(Connection::DISCONNECTED));
446 EXPECT_CALL(*socket_, Disconnect(_)); 446 EXPECT_CALL(*socket_, Disconnect(_));
447 EXPECT_CALL(*adapter_, RemoveObserver(&connection)); 447 EXPECT_CALL(*adapter_, RemoveObserver(&connection));
448 error_callback.Run("The most helpful of error messages"); 448 error_callback.Run("The most helpful of error messages");
449 } 449 }
450 450
451 } // namespace proximity_auth 451 } // namespace proximity_auth
OLDNEW
« no previous file with comments | « components/proximity_auth/bluetooth_connection_finder.h ('k') | components/proximity_auth/client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698