OLD | NEW |
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 "content/child/webcrypto/test/test_helpers.h" | 5 #include "content/child/webcrypto/test/test_helpers.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
11 #include "base/json/json_writer.h" | 11 #include "base/json/json_writer.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/path_service.h" | 13 #include "base/path_service.h" |
14 #include "base/stl_util.h" | 14 #include "base/stl_util.h" |
15 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
16 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
17 #include "base/values.h" | 17 #include "base/values.h" |
18 #include "content/child/webcrypto/algorithm_dispatch.h" | 18 #include "content/child/webcrypto/algorithm_dispatch.h" |
19 #include "content/child/webcrypto/crypto_data.h" | 19 #include "content/child/webcrypto/crypto_data.h" |
| 20 #include "content/child/webcrypto/jwk.h" |
20 #include "content/child/webcrypto/status.h" | 21 #include "content/child/webcrypto/status.h" |
21 #include "content/child/webcrypto/webcrypto_util.h" | 22 #include "content/child/webcrypto/webcrypto_util.h" |
22 #include "content/public/common/content_paths.h" | 23 #include "content/public/common/content_paths.h" |
23 #include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h" | 24 #include "third_party/WebKit/public/platform/WebCryptoAlgorithmParams.h" |
24 #include "third_party/WebKit/public/platform/WebCryptoKeyAlgorithm.h" | 25 #include "third_party/WebKit/public/platform/WebCryptoKeyAlgorithm.h" |
25 #include "third_party/re2/re2/re2.h" | 26 #include "third_party/re2/re2/re2.h" |
26 | 27 |
27 #if !defined(USE_OPENSSL) | 28 #if !defined(USE_OPENSSL) |
28 #include <nss.h> | 29 #include <nss.h> |
29 #include <pk11pub.h> | 30 #include <pk11pub.h> |
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
575 // Export the key in raw format and compare to the original. | 576 // Export the key in raw format and compare to the original. |
576 std::vector<uint8_t> key_raw_out; | 577 std::vector<uint8_t> key_raw_out; |
577 ASSERT_EQ(Status::Success(), | 578 ASSERT_EQ(Status::Success(), |
578 ExportKey(blink::WebCryptoKeyFormatRaw, key, &key_raw_out)); | 579 ExportKey(blink::WebCryptoKeyFormatRaw, key, &key_raw_out)); |
579 EXPECT_BYTES_EQ_HEX(key_hex, key_raw_out); | 580 EXPECT_BYTES_EQ_HEX(key_hex, key_raw_out); |
580 } | 581 } |
581 | 582 |
582 } // namespace webcrypto | 583 } // namespace webcrypto |
583 | 584 |
584 } // namesapce content | 585 } // namesapce content |
OLD | NEW |