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/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "base/test/trace_event_analyzer.h" | 8 #include "base/test/trace_event_analyzer.h" |
9 #include "base/version.h" | 9 #include "base/version.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 public: | 22 public: |
23 GpuFeatureTest() {} | 23 GpuFeatureTest() {} |
24 | 24 |
25 virtual void SetUpCommandLine(CommandLine* command_line) { | 25 virtual void SetUpCommandLine(CommandLine* command_line) { |
26 // This enables DOM automation for tab contents. | 26 // This enables DOM automation for tab contents. |
27 EnableDOMAutomation(); | 27 EnableDOMAutomation(); |
28 } | 28 } |
29 | 29 |
30 void SetupBlacklist(const std::string& json_blacklist) { | 30 void SetupBlacklist(const std::string& json_blacklist) { |
31 scoped_ptr<Version> os_version(Version::GetVersionFromString("1.0")); | 31 scoped_ptr<Version> os_version(Version::GetVersionFromString("1.0")); |
32 GpuBlacklist* blacklist = new GpuBlacklist("1.0 unknown"); | 32 GpuBlacklist* blacklist = new GpuBlacklist("1.0"); |
33 | 33 |
34 ASSERT_TRUE(blacklist->LoadGpuBlacklist( | 34 ASSERT_TRUE(blacklist->LoadGpuBlacklist( |
35 json_blacklist, GpuBlacklist::kAllOs)); | 35 json_blacklist, GpuBlacklist::kAllOs)); |
36 GpuDataManager::GetInstance()->SetBuiltInGpuBlacklist(blacklist); | 36 GpuDataManager::GetInstance()->SetBuiltInGpuBlacklist(blacklist); |
37 } | 37 } |
38 | 38 |
39 void RunTest(const FilePath& url, bool expect_gpu_process) { | 39 void RunTest(const FilePath& url, bool expect_gpu_process) { |
40 using namespace trace_analyzer; | 40 using namespace trace_analyzer; |
41 | 41 |
42 FilePath test_path; | 42 FilePath test_path; |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 flags.flags(), | 176 flags.flags(), |
177 static_cast<uint32>(GpuFeatureFlags::kGpuFeatureAccelerated2dCanvas)); | 177 static_cast<uint32>(GpuFeatureFlags::kGpuFeatureAccelerated2dCanvas)); |
178 | 178 |
179 const bool expect_gpu_process = false; | 179 const bool expect_gpu_process = false; |
180 const FilePath url(FILE_PATH_LITERAL("feature_canvas2d.html")); | 180 const FilePath url(FILE_PATH_LITERAL("feature_canvas2d.html")); |
181 RunTest(url, expect_gpu_process); | 181 RunTest(url, expect_gpu_process); |
182 } | 182 } |
183 | 183 |
184 } // namespace anonymous | 184 } // namespace anonymous |
185 | 185 |
OLD | NEW |