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 #if !defined(OS_WIN) | 5 #if !defined(OS_WIN) |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "content/test/content_browser_test.h" | 21 #include "content/test/content_browser_test.h" |
22 #endif | 22 #endif |
23 | 23 |
24 namespace content { | 24 namespace content { |
25 | 25 |
26 class WebGLConformanceTest : public ContentBrowserTest { | 26 class WebGLConformanceTest : public ContentBrowserTest { |
27 public: | 27 public: |
28 WebGLConformanceTest() {} | 28 WebGLConformanceTest() {} |
29 | 29 |
30 #if !defined(OS_WIN) | 30 #if !defined(OS_WIN) |
31 virtual void SetUpCommandLine(CommandLine* command_line) { | 31 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
32 // Allow privileged WebGL extensions. | 32 // Allow privileged WebGL extensions. |
33 command_line->AppendSwitch(switches::kEnablePrivilegedWebGLExtensions); | 33 command_line->AppendSwitch(switches::kEnablePrivilegedWebGLExtensions); |
34 } | 34 } |
35 | 35 |
36 virtual void SetUpInProcessBrowserTestFixture() { | 36 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { |
37 base::FilePath webgl_conformance_path; | 37 base::FilePath webgl_conformance_path; |
38 PathService::Get(base::DIR_SOURCE_ROOT, &webgl_conformance_path); | 38 PathService::Get(base::DIR_SOURCE_ROOT, &webgl_conformance_path); |
39 webgl_conformance_path = webgl_conformance_path.Append( | 39 webgl_conformance_path = webgl_conformance_path.Append( |
40 FILE_PATH_LITERAL("third_party")); | 40 FILE_PATH_LITERAL("third_party")); |
41 webgl_conformance_path = webgl_conformance_path.Append( | 41 webgl_conformance_path = webgl_conformance_path.Append( |
42 FILE_PATH_LITERAL("webgl_conformance")); | 42 FILE_PATH_LITERAL("webgl_conformance")); |
43 ASSERT_TRUE(file_util::DirectoryExists(webgl_conformance_path)) | 43 ASSERT_TRUE(file_util::DirectoryExists(webgl_conformance_path)) |
44 << "Missing conformance tests: " << webgl_conformance_path.value(); | 44 << "Missing conformance tests: " << webgl_conformance_path.value(); |
45 | 45 |
46 PathService::Get(DIR_TEST_DATA, &test_path_); | 46 PathService::Get(DIR_TEST_DATA, &test_path_); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 IN_PROC_BROWSER_TEST_F(WebGLConformanceTest, MANUAL_##name) { \ | 89 IN_PROC_BROWSER_TEST_F(WebGLConformanceTest, MANUAL_##name) { \ |
90 RunTest(url, #name); \ | 90 RunTest(url, #name); \ |
91 } | 91 } |
92 | 92 |
93 // The test declarations are located in webgl_conformance_test_list_autogen.h, | 93 // The test declarations are located in webgl_conformance_test_list_autogen.h, |
94 // because the list is automatically generated by a script. | 94 // because the list is automatically generated by a script. |
95 // See: generate_webgl_conformance_test_list.py | 95 // See: generate_webgl_conformance_test_list.py |
96 #include "webgl_conformance_test_list_autogen.h" | 96 #include "webgl_conformance_test_list_autogen.h" |
97 | 97 |
98 } // namespace content | 98 } // namespace content |
OLD | NEW |