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 "gpu/config/gpu_test_expectations_parser.h" | 5 #include "gpu/config/gpu_test_expectations_parser.h" |
6 | 6 |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
10 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 | 184 |
185 return rt; | 185 return rt; |
186 } | 186 } |
187 | 187 |
188 bool GPUTestExpectationsParser::LoadTestExpectations( | 188 bool GPUTestExpectationsParser::LoadTestExpectations( |
189 const base::FilePath& path) { | 189 const base::FilePath& path) { |
190 entries_.clear(); | 190 entries_.clear(); |
191 error_messages_.clear(); | 191 error_messages_.clear(); |
192 | 192 |
193 std::string data; | 193 std::string data; |
194 if (!file_util::ReadFileToString(path, &data)) { | 194 if (!base::ReadFileToString(path, &data)) { |
195 error_messages_.push_back(kErrorMessage[kErrorFileIO]); | 195 error_messages_.push_back(kErrorMessage[kErrorFileIO]); |
196 return false; | 196 return false; |
197 } | 197 } |
198 return LoadTestExpectations(data); | 198 return LoadTestExpectations(data); |
199 } | 199 } |
200 | 200 |
201 int32 GPUTestExpectationsParser::GetTestExpectation( | 201 int32 GPUTestExpectationsParser::GetTestExpectation( |
202 const std::string& test_name, | 202 const std::string& test_name, |
203 const GPUTestBotConfig& bot_config) const { | 203 const GPUTestBotConfig& bot_config) const { |
204 for (size_t i = 0; i < entries_.size(); ++i) { | 204 for (size_t i = 0; i < entries_.size(); ++i) { |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 message.c_str())); | 494 message.c_str())); |
495 } | 495 } |
496 | 496 |
497 GPUTestExpectationsParser:: GPUTestExpectationEntry::GPUTestExpectationEntry() | 497 GPUTestExpectationsParser:: GPUTestExpectationEntry::GPUTestExpectationEntry() |
498 : test_expectation(0), | 498 : test_expectation(0), |
499 line_number(0) { | 499 line_number(0) { |
500 } | 500 } |
501 | 501 |
502 } // namespace gpu | 502 } // namespace gpu |
503 | 503 |
OLD | NEW |