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 "webcrypto_impl.h" | 5 #include "webcrypto_impl.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
11 #include "content/public/renderer/content_renderer_client.h" | 11 #include "content/public/renderer/content_renderer_client.h" |
12 #include "content/renderer/renderer_webkitplatformsupport_impl.h" | 12 #include "content/renderer/renderer_webkitplatformsupport_impl.h" |
13 #include "content/renderer/webcrypto_impl.h" | 13 #include "content/renderer/webcrypto/webcrypto_impl.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 #include "third_party/WebKit/public/platform/WebArrayBuffer.h" | 15 #include "third_party/WebKit/public/platform/WebArrayBuffer.h" |
16 #include "third_party/WebKit/public/platform/WebCryptoAlgorithm.h" | 16 #include "third_party/WebKit/public/platform/WebCryptoAlgorithm.h" |
17 #include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h" | 17 #include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h" |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 std::vector<uint8> HexStringToBytes(const std::string& hex) { | 21 std::vector<uint8> HexStringToBytes(const std::string& hex) { |
22 std::vector<uint8> bytes; | 22 std::vector<uint8> bytes; |
23 base::HexStringToBytes(hex, &bytes); | 23 base::HexStringToBytes(hex, &bytes); |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 kLongSignature, | 344 kLongSignature, |
345 sizeof(kLongSignature), | 345 sizeof(kLongSignature), |
346 message_raw.data(), | 346 message_raw.data(), |
347 message_raw.size(), | 347 message_raw.size(), |
348 &signature_match)); | 348 &signature_match)); |
349 EXPECT_FALSE(signature_match); | 349 EXPECT_FALSE(signature_match); |
350 } | 350 } |
351 } | 351 } |
352 | 352 |
353 } // namespace content | 353 } // namespace content |
OLD | NEW |