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 // The bulk of this file is support code; sorry about that. Here's an overview | 5 // The bulk of this file is support code; sorry about that. Here's an overview |
6 // to hopefully help readers of this code: | 6 // to hopefully help readers of this code: |
7 // - RenderingHelper is charged with interacting with X11/{EGL/GLES2,GLX/GL} or | 7 // - RenderingHelper is charged with interacting with X11/{EGL/GLES2,GLX/GL} or |
8 // Win/EGL. | 8 // Win/EGL. |
9 // - ClientState is an enum for the state of the decode client used by the test. | 9 // - ClientState is an enum for the state of the decode client used by the test. |
10 // - ClientStateNotification is a barrier abstraction that allows the test code | 10 // - ClientStateNotification is a barrier abstraction that allows the test code |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 filepath = filepath.AddExtension(FILE_PATH_LITERAL(".md5")); | 155 filepath = filepath.AddExtension(FILE_PATH_LITERAL(".md5")); |
156 std::string all_md5s; | 156 std::string all_md5s; |
157 base::ReadFileToString(filepath, &all_md5s); | 157 base::ReadFileToString(filepath, &all_md5s); |
158 base::SplitString(all_md5s, '\n', md5_strings); | 158 base::SplitString(all_md5s, '\n', md5_strings); |
159 // Check these are legitimate MD5s. | 159 // Check these are legitimate MD5s. |
160 for (std::vector<std::string>::iterator md5_string = md5_strings->begin(); | 160 for (std::vector<std::string>::iterator md5_string = md5_strings->begin(); |
161 md5_string != md5_strings->end(); ++md5_string) { | 161 md5_string != md5_strings->end(); ++md5_string) { |
162 // Ignore the empty string added by SplitString | 162 // Ignore the empty string added by SplitString |
163 if (!md5_string->length()) | 163 if (!md5_string->length()) |
164 continue; | 164 continue; |
| 165 // Ignore comments |
| 166 if (md5_string->at(0) == '#') |
| 167 continue; |
165 | 168 |
166 CHECK_EQ(static_cast<int>(md5_string->length()), | 169 CHECK_EQ(static_cast<int>(md5_string->length()), |
167 kMD5StringLength) << *md5_string; | 170 kMD5StringLength) << *md5_string; |
168 bool hex_only = std::count_if(md5_string->begin(), | 171 bool hex_only = std::count_if(md5_string->begin(), |
169 md5_string->end(), isxdigit) == | 172 md5_string->end(), isxdigit) == |
170 kMD5StringLength; | 173 kMD5StringLength; |
171 CHECK(hex_only) << *md5_string; | 174 CHECK(hex_only) << *md5_string; |
172 } | 175 } |
173 CHECK_GE(md5_strings->size(), 1U) << all_md5s; | 176 CHECK_GE(md5_strings->size(), 1U) << all_md5s; |
174 } | 177 } |
(...skipping 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1521 #if defined(OS_WIN) | 1524 #if defined(OS_WIN) |
1522 content::DXVAVideoDecodeAccelerator::PreSandboxInitialization(); | 1525 content::DXVAVideoDecodeAccelerator::PreSandboxInitialization(); |
1523 #elif defined(OS_CHROMEOS) | 1526 #elif defined(OS_CHROMEOS) |
1524 #if defined(ARCH_CPU_X86_FAMILY) | 1527 #if defined(ARCH_CPU_X86_FAMILY) |
1525 content::VaapiWrapper::PreSandboxInitialization(); | 1528 content::VaapiWrapper::PreSandboxInitialization(); |
1526 #endif // ARCH_CPU_ARMEL | 1529 #endif // ARCH_CPU_ARMEL |
1527 #endif // OS_CHROMEOS | 1530 #endif // OS_CHROMEOS |
1528 | 1531 |
1529 return RUN_ALL_TESTS(); | 1532 return RUN_ALL_TESTS(); |
1530 } | 1533 } |
OLD | NEW |