Greg Kerr | 019d59c | 2016-11-17 14:28:49 -0800 | [diff] [blame] | 1 | // Copyright 2016 The Chromium OS Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #include <stdint.h> |
| 6 | |
| 7 | #include <list> |
| 8 | #include <string> |
| 9 | |
| 10 | #include <base/files/file_path.h> |
| 11 | #include <base/files/scoped_temp_dir.h> |
| 12 | |
| 13 | namespace imageloader { |
| 14 | |
| 15 | // Test data always uses the dev key. |
| 16 | constexpr uint8_t kDevPublicKey[] = { |
| 17 | 0x30, 0x59, 0x30, 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, |
| 18 | 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, 0x03, |
| 19 | 0x42, 0x00, 0x04, 0x7a, 0xaa, 0x2b, 0xf9, 0x3d, 0x7a, 0xbe, 0x35, 0x9a, |
| 20 | 0xfc, 0x9f, 0x39, 0x2d, 0x2d, 0x37, 0x07, 0xd4, 0x19, 0x67, 0x67, 0x30, |
| 21 | 0xbb, 0x5c, 0x74, 0x22, 0xd5, 0x02, 0x07, 0xaf, 0x6b, 0x12, 0x9d, 0x12, |
| 22 | 0xf0, 0x34, 0xfd, 0x1a, 0x7f, 0x02, 0xd8, 0x46, 0x2b, 0x25, 0xca, 0xa0, |
| 23 | 0x6e, 0x2b, 0x54, 0x41, 0xee, 0x92, 0xa2, 0x0f, 0xa2, 0x2a, 0xc0, 0x30, |
| 24 | 0xa6, 0x8c, 0xd1, 0x16, 0x0a, 0x48, 0xca}; |
| 25 | // This is the name of the component used in the test data. |
| 26 | constexpr char kTestComponentName[] = "PepperFlashPlayer"; |
| 27 | // This is the version of flash player used in the test data. |
| 28 | constexpr char kTestDataVersion[] = "22.0.0.158"; |
| 29 | // This is the version of the updated flash player in the test data. |
| 30 | constexpr char kTestUpdatedVersion[] = "22.0.0.256"; |
| 31 | |
| 32 | // Get the path of the test component in the test data folder. |
| 33 | base::FilePath GetTestComponentPath(); |
| 34 | base::FilePath GetTestComponentPath(const std::string& version); |
| 35 | |
| 36 | // Enumerate all files in a directory and return them as a list of filenames. |
| 37 | void GetFilesInDir(const base::FilePath& dir, std::list<std::string>* files); |
| 38 | |
| 39 | } // namespace imageloader |