OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/file_util.h" | 5 #include "base/file_util.h" |
6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
7 #include "base/test/test_timeouts.h" | 7 #include "base/test/test_timeouts.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/common/chrome_paths.h" | 9 #include "chrome/common/chrome_paths.h" |
10 #include "chrome/test/automation/tab_proxy.h" | 10 #include "chrome/test/automation/tab_proxy.h" |
11 #include "chrome/test/ui/javascript_test_util.h" | 11 #include "chrome/test/ui/javascript_test_util.h" |
12 #include "chrome/test/ui/ui_test.h" | 12 #include "chrome/test/ui/ui_test.h" |
13 #include "content/public/common/content_switches.h" | 13 #include "content/public/common/content_switches.h" |
14 #include "net/base/net_util.h" | 14 #include "net/base/net_util.h" |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 class WebGLConformanceTests : public UITest { | 18 class WebGLConformanceTests : public UITest { |
19 public: | 19 public: |
20 WebGLConformanceTests() { | 20 WebGLConformanceTests() { |
21 show_window_ = true; | 21 show_window_ = true; |
22 dom_automation_enabled_ = true; | 22 dom_automation_enabled_ = true; |
23 } | 23 } |
24 | 24 |
25 void SetUp() { | 25 void SetUp() { |
26 // Force the use of GPU hardware. | |
27 force_use_osmesa_ = false; | |
28 | |
29 // Ensure that a GPU bot is never blacklisted. | 26 // Ensure that a GPU bot is never blacklisted. |
30 launch_arguments_.AppendSwitch(switches::kIgnoreGpuBlacklist); | 27 launch_arguments_.AppendSwitch(switches::kIgnoreGpuBlacklist); |
31 UITest::SetUp(); | 28 UITest::SetUp(); |
32 } | 29 } |
33 | 30 |
34 void RunTest(const std::string& url) { | 31 void RunTest(const std::string& url) { |
35 FilePath webgl_conformance_path; | 32 FilePath webgl_conformance_path; |
36 PathService::Get(base::DIR_SOURCE_ROOT, &webgl_conformance_path); | 33 PathService::Get(base::DIR_SOURCE_ROOT, &webgl_conformance_path); |
37 webgl_conformance_path = webgl_conformance_path.Append( | 34 webgl_conformance_path = webgl_conformance_path.Append( |
38 FILE_PATH_LITERAL("third_party")); | 35 FILE_PATH_LITERAL("third_party")); |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 TEST_F(WebGLConformanceTests, name) { \ | 76 TEST_F(WebGLConformanceTests, name) { \ |
80 RunTest(url); \ | 77 RunTest(url); \ |
81 } | 78 } |
82 | 79 |
83 // The test declarations are located in webgl_conformance_test_list_autogen.h, | 80 // The test declarations are located in webgl_conformance_test_list_autogen.h, |
84 // because the list is automatically generated by a script. | 81 // because the list is automatically generated by a script. |
85 // See: generate_webgl_conformance_test_list.py | 82 // See: generate_webgl_conformance_test_list.py |
86 #include "webgl_conformance_test_list_autogen.h" | 83 #include "webgl_conformance_test_list_autogen.h" |
87 | 84 |
88 } // namespace | 85 } // namespace |
OLD | NEW |