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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "content/public/browser/web_contents.h" | 9 #include "content/public/browser/web_contents.h" |
10 #include "content/public/common/content_paths.h" | 10 #include "content/public/common/content_paths.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 | 49 |
50 ASSERT_TRUE(bot_config_.LoadCurrentConfig(NULL)) | 50 ASSERT_TRUE(bot_config_.LoadCurrentConfig(NULL)) |
51 << "Fail to load bot configuration"; | 51 << "Fail to load bot configuration"; |
52 ASSERT_TRUE(bot_config_.IsValid()) | 52 ASSERT_TRUE(bot_config_.IsValid()) |
53 << "Invalid bot configuration"; | 53 << "Invalid bot configuration"; |
54 | 54 |
55 base::FilePath path; | 55 base::FilePath path; |
56 ASSERT_TRUE(PathService::Get(DIR_TEST_DATA, &path)); | 56 ASSERT_TRUE(PathService::Get(DIR_TEST_DATA, &path)); |
57 path = path.Append(FILE_PATH_LITERAL("gpu")) | 57 path = path.Append(FILE_PATH_LITERAL("gpu")) |
58 .Append(FILE_PATH_LITERAL("webgl_conformance_test_expectations.txt")); | 58 .Append(FILE_PATH_LITERAL("webgl_conformance_test_expectations.txt")); |
59 ASSERT_TRUE(file_util::PathExists(path)); | 59 ASSERT_TRUE(base::PathExists(path)); |
60 ASSERT_TRUE(test_expectations_.LoadTestExpectations(path)); | 60 ASSERT_TRUE(test_expectations_.LoadTestExpectations(path)); |
61 } | 61 } |
62 | 62 |
63 void RunTest(std::string url, std::string test_name) { | 63 void RunTest(std::string url, std::string test_name) { |
64 int32 expectation = | 64 int32 expectation = |
65 test_expectations_.GetTestExpectation(test_name, bot_config_); | 65 test_expectations_.GetTestExpectation(test_name, bot_config_); |
66 if (expectation != gpu::GPUTestExpectationsParser::kGpuTestPass) { | 66 if (expectation != gpu::GPUTestExpectationsParser::kGpuTestPass) { |
67 LOG(WARNING) << "Test " << test_name << " is bypassed"; | 67 LOG(WARNING) << "Test " << test_name << " is bypassed"; |
68 return; | 68 return; |
69 } | 69 } |
(...skipping 18 matching lines...) Expand all Loading... |
88 IN_PROC_BROWSER_TEST_F(WebGLConformanceTest, MANUAL_##name) { \ | 88 IN_PROC_BROWSER_TEST_F(WebGLConformanceTest, MANUAL_##name) { \ |
89 RunTest(url, #name); \ | 89 RunTest(url, #name); \ |
90 } | 90 } |
91 | 91 |
92 // The test declarations are located in webgl_conformance_test_list_autogen.h, | 92 // The test declarations are located in webgl_conformance_test_list_autogen.h, |
93 // because the list is automatically generated by a script. | 93 // because the list is automatically generated by a script. |
94 // See: generate_webgl_conformance_test_list.py | 94 // See: generate_webgl_conformance_test_list.py |
95 #include "webgl_conformance_test_list_autogen.h" | 95 #include "webgl_conformance_test_list_autogen.h" |
96 | 96 |
97 } // namespace content | 97 } // namespace content |
OLD | NEW |