Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Side by Side Diff: media/cdm/aes_decryptor_unittest.cc

Issue 2539363004: Make base::Value::TYPE a scoped enum. (Closed)
Patch Set: Rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/base/video_frame_unittest.cc ('k') | media/cdm/json_web_key.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/aes_decryptor.h" 5 #include "media/cdm/aes_decryptor.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 28 matching lines...) Expand all
39 using ::testing::NotNull; 39 using ::testing::NotNull;
40 using ::testing::SaveArg; 40 using ::testing::SaveArg;
41 using ::testing::StrNe; 41 using ::testing::StrNe;
42 using ::testing::Unused; 42 using ::testing::Unused;
43 43
44 MATCHER(IsEmpty, "") { return arg.empty(); } 44 MATCHER(IsEmpty, "") { return arg.empty(); }
45 MATCHER(IsNotEmpty, "") { return !arg.empty(); } 45 MATCHER(IsNotEmpty, "") { return !arg.empty(); }
46 MATCHER(IsJSONDictionary, "") { 46 MATCHER(IsJSONDictionary, "") {
47 std::string result(arg.begin(), arg.end()); 47 std::string result(arg.begin(), arg.end());
48 std::unique_ptr<base::Value> root(base::JSONReader().ReadToValue(result)); 48 std::unique_ptr<base::Value> root(base::JSONReader().ReadToValue(result));
49 return (root.get() && root->GetType() == base::Value::TYPE_DICTIONARY); 49 return (root.get() && root->GetType() == base::Value::Type::DICTIONARY);
50 } 50 }
51 51
52 namespace media { 52 namespace media {
53 53
54 const uint8_t kOriginalData[] = "Original subsample data."; 54 const uint8_t kOriginalData[] = "Original subsample data.";
55 const int kOriginalDataSize = 24; 55 const int kOriginalDataSize = 24;
56 56
57 // In the examples below, 'k'(key) has to be 16 bytes, and will always require 57 // In the examples below, 'k'(key) has to be 16 bytes, and will always require
58 // 2 bytes of padding. 'kid'(keyid) is variable length, and may require 0, 1, 58 // 2 bytes of padding. 'kid'(keyid) is variable length, and may require 0, 1,
59 // or 2 bytes of padding. 59 // or 2 bytes of padding.
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 INSTANTIATE_TEST_CASE_P(CdmAdapter, 1025 INSTANTIATE_TEST_CASE_P(CdmAdapter,
1026 AesDecryptorTest, 1026 AesDecryptorTest,
1027 testing::Values("CdmAdapter")); 1027 testing::Values("CdmAdapter"));
1028 #endif 1028 #endif
1029 1029
1030 // TODO(jrummell): Once MojoCdm/MojoCdmService/MojoDecryptor/ 1030 // TODO(jrummell): Once MojoCdm/MojoCdmService/MojoDecryptor/
1031 // MojoDecryptorService are implemented, add a third version that tests the 1031 // MojoDecryptorService are implemented, add a third version that tests the
1032 // CDM via mojo. 1032 // CDM via mojo.
1033 1033
1034 } // namespace media 1034 } // namespace media
OLDNEW
« no previous file with comments | « media/base/video_frame_unittest.cc ('k') | media/cdm/json_web_key.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698