OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "ppapi/shared_impl/test_utils.h" | 5 #include "ppapi/shared_impl/test_utils.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <cmath> | 10 #include <cmath> |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 } // namespace | 206 } // namespace |
207 | 207 |
208 bool TestEqual(const PP_Var& expected, | 208 bool TestEqual(const PP_Var& expected, |
209 const PP_Var& actual, | 209 const PP_Var& actual, |
210 bool test_string_references) { | 210 bool test_string_references) { |
211 base::hash_map<int64_t, int64_t> visited_map; | 211 base::hash_map<int64_t, int64_t> visited_map; |
212 return Equals(expected, actual, test_string_references, &visited_map); | 212 return Equals(expected, actual, test_string_references, &visited_map); |
213 } | 213 } |
214 | 214 |
215 std::string StripTestPrefixes(const std::string& test_name) { | 215 std::string StripTestPrefixes(const std::string& test_name) { |
216 const char kDisabledPrefix[] = "DISABLED_"; | 216 if (test_name.find("DISABLED_") == 0) |
217 if (base::StartsWith(test_name, kDisabledPrefix, | 217 return test_name.substr(strlen("DISABLED_")); |
218 base::CompareCase::SENSITIVE)) { | |
219 return test_name.substr(sizeof(kDisabledPrefix) - 1); | |
220 } | |
221 return test_name; | 218 return test_name; |
222 } | 219 } |
223 | 220 |
224 } // namespace ppapi | 221 } // namespace ppapi |
OLD | NEW |