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 #ifndef CONTENT_TEST_GPU_GPU_TEST_EXPECTATIONS_PARSER_H_ | 5 #ifndef CONTENT_TEST_GPU_GPU_TEST_EXPECTATIONS_PARSER_H_ |
6 #define CONTENT_TEST_GPU_GPU_TEST_EXPECTATIONS_PARSER_H_ | 6 #define CONTENT_TEST_GPU_GPU_TEST_EXPECTATIONS_PARSER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 15 matching lines...) Expand all Loading... |
26 kWebGLConformanceTest, | 26 kWebGLConformanceTest, |
27 }; | 27 }; |
28 | 28 |
29 GPUTestExpectationsParser(); | 29 GPUTestExpectationsParser(); |
30 ~GPUTestExpectationsParser(); | 30 ~GPUTestExpectationsParser(); |
31 | 31 |
32 // Parse the text expectations, and if no error is encountered, | 32 // Parse the text expectations, and if no error is encountered, |
33 // save all the entries. Otherwise, generate error messages. | 33 // save all the entries. Otherwise, generate error messages. |
34 // Return true if parsing succeeds. | 34 // Return true if parsing succeeds. |
35 bool LoadTestExpectations(const std::string& data); | 35 bool LoadTestExpectations(const std::string& data); |
36 bool LoadTestExpectations(const FilePath& path); | 36 bool LoadTestExpectations(const base::FilePath& path); |
37 bool LoadTestExpectations(GPUTestProfile profile); | 37 bool LoadTestExpectations(GPUTestProfile profile); |
38 | 38 |
39 // Query error messages from the last LoadTestExpectations() call. | 39 // Query error messages from the last LoadTestExpectations() call. |
40 const std::vector<std::string>& GetErrorMessages() const; | 40 const std::vector<std::string>& GetErrorMessages() const; |
41 | 41 |
42 // Get the test expectation of a given test on a given bot. | 42 // Get the test expectation of a given test on a given bot. |
43 int32 GetTestExpectation(const std::string& test_name, | 43 int32 GetTestExpectation(const std::string& test_name, |
44 const GPUTestBotConfig& bot_config) const; | 44 const GPUTestBotConfig& bot_config) const; |
45 | 45 |
46 // Parse a list of config modifiers. If we have a valid entry with no | 46 // Parse a list of config modifiers. If we have a valid entry with no |
(...skipping 28 matching lines...) Expand all Loading... |
75 bool DetectConflictsBetweenEntries(); | 75 bool DetectConflictsBetweenEntries(); |
76 | 76 |
77 // Save an error message, which can be queried later. | 77 // Save an error message, which can be queried later. |
78 void PushErrorMessage(const std::string& message, size_t line_number); | 78 void PushErrorMessage(const std::string& message, size_t line_number); |
79 void PushErrorMessage(const std::string& message, | 79 void PushErrorMessage(const std::string& message, |
80 size_t entry1_line_number, | 80 size_t entry1_line_number, |
81 size_t entry2_line_number); | 81 size_t entry2_line_number); |
82 | 82 |
83 // Return false if an error occurs or the path does not exist. | 83 // Return false if an error occurs or the path does not exist. |
84 static bool GetExpectationsPath(GPUTestProfile profile, | 84 static bool GetExpectationsPath(GPUTestProfile profile, |
85 FilePath* path); | 85 base::FilePath* path); |
86 | 86 |
87 std::vector<GPUTestExpectationEntry> entries_; | 87 std::vector<GPUTestExpectationEntry> entries_; |
88 std::vector<std::string> error_messages_; | 88 std::vector<std::string> error_messages_; |
89 }; | 89 }; |
90 | 90 |
91 #endif // CONTENT_TEST_GPU_GPU_TEST_EXPECTATIONS_PARSER_H_ | 91 #endif // CONTENT_TEST_GPU_GPU_TEST_EXPECTATIONS_PARSER_H_ |
92 | 92 |
OLD | NEW |