OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/callback.h" | 5 #include "base/callback.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "chrome/browser/browser_process.h" | 7 #include "chrome/browser/browser_process.h" |
8 #include "chrome/browser/chromeos/login/user.h" | 8 #include "chrome/browser/chromeos/login/user.h" |
9 #include "chrome/browser/chromeos/login/user_manager.h" | 9 #include "chrome/browser/chromeos/login/user_manager.h" |
10 #include "chrome/browser/extensions/extension_apitest.h" | 10 #include "chrome/browser/extensions/extension_apitest.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 // and update networking_private_apitest to use and expect valid data. | 64 // and update networking_private_apitest to use and expect valid data. |
65 // That will eliminate the need for mock implementation. | 65 // That will eliminate the need for mock implementation. |
66 class CryptoVerifyStub | 66 class CryptoVerifyStub |
67 : public extensions::NetworkingPrivateServiceClient::CryptoVerify { | 67 : public extensions::NetworkingPrivateServiceClient::CryptoVerify { |
68 virtual void VerifyDestination(scoped_ptr<base::ListValue> args, | 68 virtual void VerifyDestination(scoped_ptr<base::ListValue> args, |
69 bool* verified, | 69 bool* verified, |
70 std::string* error) OVERRIDE { | 70 std::string* error) OVERRIDE { |
71 *verified = true; | 71 *verified = true; |
72 } | 72 } |
73 | 73 |
| 74 virtual void VerifyAndEncryptCredentials(scoped_ptr<base::ListValue> args, |
| 75 std::string* network_guid, |
| 76 std::string* base64_encoded_public_key, |
| 77 std::string* base64_encoded_ciphertext, |
| 78 std::string* error) OVERRIDE { |
| 79 *base64_encoded_ciphertext = "encrypted_credentials"; |
| 80 } |
| 81 |
74 virtual void VerifyAndEncryptData(scoped_ptr<base::ListValue> args, | 82 virtual void VerifyAndEncryptData(scoped_ptr<base::ListValue> args, |
75 std::string* encoded_data, | 83 std::string* encoded_data, |
76 std::string* error) OVERRIDE { | 84 std::string* error) OVERRIDE { |
77 *encoded_data = "encrypted_data"; | 85 *encoded_data = "encrypted_data"; |
78 } | 86 } |
79 }; | 87 }; |
80 #endif // defined(OS_CHROMEOS) | 88 #endif // defined(OS_CHROMEOS) |
81 | 89 |
82 class ExtensionNetworkingPrivateApiTest : | 90 class ExtensionNetworkingPrivateApiTest : |
83 public ExtensionApiTest, | 91 public ExtensionApiTest, |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 VerifyAndEncryptData) { | 439 VerifyAndEncryptData) { |
432 EXPECT_TRUE(RunNetworkingSubtest("verifyAndEncryptData")) << message_; | 440 EXPECT_TRUE(RunNetworkingSubtest("verifyAndEncryptData")) << message_; |
433 } | 441 } |
434 | 442 |
435 INSTANTIATE_TEST_CASE_P(ExtensionNetworkingPrivateApiTestInstantiation, | 443 INSTANTIATE_TEST_CASE_P(ExtensionNetworkingPrivateApiTestInstantiation, |
436 ExtensionNetworkingPrivateApiTest, | 444 ExtensionNetworkingPrivateApiTest, |
437 testing::Bool()); | 445 testing::Bool()); |
438 | 446 |
439 } // namespace | 447 } // namespace |
440 | 448 |
OLD | NEW |