OLD | NEW |
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 "remoting/protocol/pairing_registry.h" | 5 #include "remoting/protocol/pairing_registry.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 EXPECT_FALSE(actual.HasKey(PairingRegistry::kSharedSecretKey)); | 55 EXPECT_FALSE(actual.HasKey(PairingRegistry::kSharedSecretKey)); |
56 } | 56 } |
57 | 57 |
58 } // namespace | 58 } // namespace |
59 | 59 |
60 namespace remoting { | 60 namespace remoting { |
61 namespace protocol { | 61 namespace protocol { |
62 | 62 |
63 class PairingRegistryTest : public testing::Test { | 63 class PairingRegistryTest : public testing::Test { |
64 public: | 64 public: |
65 virtual void SetUp() OVERRIDE { | 65 virtual void SetUp() override { |
66 callback_count_ = 0; | 66 callback_count_ = 0; |
67 } | 67 } |
68 | 68 |
69 void set_pairings(scoped_ptr<base::ListValue> pairings) { | 69 void set_pairings(scoped_ptr<base::ListValue> pairings) { |
70 pairings_ = pairings.Pass(); | 70 pairings_ = pairings.Pass(); |
71 } | 71 } |
72 | 72 |
73 void ExpectSecret(const std::string& expected, | 73 void ExpectSecret(const std::string& expected, |
74 PairingRegistry::Pairing actual) { | 74 PairingRegistry::Pairing actual) { |
75 EXPECT_EQ(expected, actual.shared_secret()); | 75 EXPECT_EQ(expected, actual.shared_secret()); |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 registry->GetPairing( | 250 registry->GetPairing( |
251 pairing_3.client_id(), | 251 pairing_3.client_id(), |
252 base::Bind(&MockPairingRegistryCallbacks::GetPairingCallback, | 252 base::Bind(&MockPairingRegistryCallbacks::GetPairingCallback, |
253 base::Unretained(&callbacks))); | 253 base::Unretained(&callbacks))); |
254 | 254 |
255 run_loop_.Run(); | 255 run_loop_.Run(); |
256 } | 256 } |
257 | 257 |
258 } // namespace protocol | 258 } // namespace protocol |
259 } // namespace remoting | 259 } // namespace remoting |
OLD | NEW |