| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/client/ios/bridge/client_instance.h" | 5 #include "remoting/client/ios/bridge/client_instance.h" |
| 6 | 6 |
| 7 #import "remoting/client/ios/host_preferences.h" | 7 #import "remoting/client/ios/host_preferences.h" |
| 8 #import "testing/gtest_mac.h" | 8 #import "testing/gtest_mac.h" |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 } | 180 } |
| 181 | 181 |
| 182 TEST_F(ClientInstanceTest, SecretPin) { | 182 TEST_F(ClientInstanceTest, SecretPin) { |
| 183 NSString* hostId = kHostId; | 183 NSString* hostId = kHostId; |
| 184 NSString* pairingId = kPairingId; | 184 NSString* pairingId = kPairingId; |
| 185 NSString* pairingSecret = kPairingSecret; | 185 NSString* pairingSecret = kPairingSecret; |
| 186 | 186 |
| 187 HostPreferences* newHost = [HostPreferences hostForId:hostId]; | 187 HostPreferences* newHost = [HostPreferences hostForId:hostId]; |
| 188 newHost.pairId = pairingId; | 188 newHost.pairId = pairingId; |
| 189 newHost.pairSecret = pairingSecret; | 189 newHost.pairSecret = pairingSecret; |
| 190 [newHost saveToSSOKeychain]; | 190 [newHost saveToKeychain]; |
| 191 | 191 |
| 192 // Suggesting that our pairing Id is known, but since it is not the correct | 192 // Suggesting that our pairing Id is known, but since it is not the correct |
| 193 // credentials expect the stored value to be discarded before requesting the | 193 // credentials expect the stored value to be discarded before requesting the |
| 194 // PIN. | 194 // PIN. |
| 195 instance_ = new ClientInstance(proxy_->AsWeakPtr(), "", "", "", | 195 instance_ = new ClientInstance(proxy_->AsWeakPtr(), "", "", "", |
| 196 base::SysNSStringToUTF8(kHostId), ""); | 196 base::SysNSStringToUTF8(kHostId), ""); |
| 197 | 197 |
| 198 instance_->Start(base::SysNSStringToUTF8(kPairingId), | 198 instance_->Start(base::SysNSStringToUTF8(kPairingId), |
| 199 base::SysNSStringToUTF8(kPairingSecret)); | 199 base::SysNSStringToUTF8(kPairingSecret)); |
| 200 RunCFMessageLoop(); | 200 RunCFMessageLoop(); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 instance_->OnRouteChanged("", route); | 319 instance_->OnRouteChanged("", route); |
| 320 AssertAcknowledged(false); | 320 AssertAcknowledged(false); |
| 321 } | 321 } |
| 322 | 322 |
| 323 TEST_F(ClientInstanceTest, SetCursorShape) { | 323 TEST_F(ClientInstanceTest, SetCursorShape) { |
| 324 instance_->SetCursorShape(protocol::CursorShapeInfo()); | 324 instance_->SetCursorShape(protocol::CursorShapeInfo()); |
| 325 AssertAcknowledged(true); | 325 AssertAcknowledged(true); |
| 326 } | 326 } |
| 327 | 327 |
| 328 } // namespace remoting | 328 } // namespace remoting |
| OLD | NEW |