OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ppapi/tests/test_flash_drm.h" | 5 #include "ppapi/tests/test_flash_drm.h" |
6 | 6 |
7 #if defined(PPAPI_OS_WIN) | 7 #if defined(PPAPI_OS_WIN) |
8 #include <Windows.h> | 8 #include <Windows.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 using pp::FileRef; | 25 using pp::FileRef; |
26 using pp::PassRef; | 26 using pp::PassRef; |
27 using pp::Var; | 27 using pp::Var; |
28 | 28 |
29 namespace { | 29 namespace { |
30 const char kExepectedVoucherFilename[] = "plugin.vch"; | 30 const char kExepectedVoucherFilename[] = "plugin.vch"; |
31 } | 31 } |
32 | 32 |
33 TestFlashDRM::TestFlashDRM(TestingInstance* instance) | 33 TestFlashDRM::TestFlashDRM(TestingInstance* instance) |
34 : TestCase(instance), | 34 : TestCase(instance), |
35 PP_ALLOW_THIS_IN_INITIALIZER_LIST(callback_factory_(this)) { | 35 callback_factory_(this) { |
36 } | 36 } |
37 | 37 |
38 void TestFlashDRM::RunTests(const std::string& filter) { | 38 void TestFlashDRM::RunTests(const std::string& filter) { |
39 RUN_TEST(GetDeviceID, filter); | 39 RUN_TEST(GetDeviceID, filter); |
40 RUN_TEST(GetHmonitor, filter); | 40 RUN_TEST(GetHmonitor, filter); |
41 RUN_TEST(GetVoucherFile, filter); | 41 RUN_TEST(GetVoucherFile, filter); |
42 } | 42 } |
43 | 43 |
44 std::string TestFlashDRM::TestGetDeviceID() { | 44 std::string TestFlashDRM::TestGetDeviceID() { |
45 // Test the old C++ wrapper. | 45 // Test the old C++ wrapper. |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 ASSERT_TRUE(file_ref_private); | 112 ASSERT_TRUE(file_ref_private); |
113 Var path(PassRef(), file_ref_private->GetAbsolutePath(result.pp_resource())); | 113 Var path(PassRef(), file_ref_private->GetAbsolutePath(result.pp_resource())); |
114 ASSERT_TRUE(path.is_string()); | 114 ASSERT_TRUE(path.is_string()); |
115 std::string path_string = path.AsString(); | 115 std::string path_string = path.AsString(); |
116 std::string expected_filename = std::string(kExepectedVoucherFilename); | 116 std::string expected_filename = std::string(kExepectedVoucherFilename); |
117 ASSERT_EQ(expected_filename, | 117 ASSERT_EQ(expected_filename, |
118 path_string.substr(path_string.size() - expected_filename.size())); | 118 path_string.substr(path_string.size() - expected_filename.size())); |
119 | 119 |
120 PASS(); | 120 PASS(); |
121 } | 121 } |
OLD | NEW |