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 "media/cdm/json_web_key.h" | 5 #include "media/cdm/json_web_key.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 #include <stdint.h> |
| 9 |
7 #include "base/base64.h" | 10 #include "base/base64.h" |
8 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/macros.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
10 | 14 |
11 namespace media { | 15 namespace media { |
12 | 16 |
13 class JSONWebKeyTest : public testing::Test { | 17 class JSONWebKeyTest : public testing::Test { |
14 public: | 18 public: |
15 JSONWebKeyTest() {} | 19 JSONWebKeyTest() {} |
16 | 20 |
17 protected: | 21 protected: |
18 void ExtractJWKKeysAndExpect(const std::string& jwk, | 22 void ExtractJWKKeysAndExpect(const std::string& jwk, |
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 key_ids.push_back(std::vector<uint8_t>(data3, data3 + arraysize(data3))); | 635 key_ids.push_back(std::vector<uint8_t>(data3, data3 + arraysize(data3))); |
632 std::vector<uint8_t> init_data3; | 636 std::vector<uint8_t> init_data3; |
633 CreateKeyIdsInitData(key_ids, &init_data3); | 637 CreateKeyIdsInitData(key_ids, &init_data3); |
634 std::string result3(init_data3.begin(), init_data3.end()); | 638 std::string result3(init_data3.begin(), init_data3.end()); |
635 EXPECT_EQ(result3, | 639 EXPECT_EQ(result3, |
636 "{\"kids\":[\"AQI\",\"AQIDBA\",\"AQIDBAUGBwgJCgsMDQ4PEA\"]}"); | 640 "{\"kids\":[\"AQI\",\"AQIDBA\",\"AQIDBAUGBwgJCgsMDQ4PEA\"]}"); |
637 } | 641 } |
638 | 642 |
639 } // namespace media | 643 } // namespace media |
640 | 644 |
OLD | NEW |