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/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/test/trace_event_analyzer.h" | 9 #include "base/test/trace_event_analyzer.h" |
10 #include "base/version.h" | 10 #include "base/version.h" |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 SetupBlacklist(json_blacklist); | 150 SetupBlacklist(json_blacklist); |
151 GpuFeatureFlags flags = GpuDataManager::GetInstance()->GetGpuFeatureFlags(); | 151 GpuFeatureFlags flags = GpuDataManager::GetInstance()->GetGpuFeatureFlags(); |
152 EXPECT_EQ( | 152 EXPECT_EQ( |
153 flags.flags(), | 153 flags.flags(), |
154 static_cast<uint32>(GpuFeatureFlags::kGpuFeatureWebgl)); | 154 static_cast<uint32>(GpuFeatureFlags::kGpuFeatureWebgl)); |
155 | 155 |
156 const FilePath url(FILE_PATH_LITERAL("feature_webgl.html")); | 156 const FilePath url(FILE_PATH_LITERAL("feature_webgl.html")); |
157 RunTest(url, EXPECT_NO_GPU_PROCESS); | 157 RunTest(url, EXPECT_NO_GPU_PROCESS); |
158 } | 158 } |
159 | 159 |
| 160 #if defined(OS_LINUX) |
| 161 // http://crbug.com/104142 |
| 162 #define Canvas2DAllowed DISABLED_Canvas2DAllowed |
| 163 #endif |
160 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, Canvas2DAllowed) { | 164 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, Canvas2DAllowed) { |
161 GpuFeatureFlags flags = GpuDataManager::GetInstance()->GetGpuFeatureFlags(); | 165 GpuFeatureFlags flags = GpuDataManager::GetInstance()->GetGpuFeatureFlags(); |
162 EXPECT_EQ(flags.flags(), 0u); | 166 EXPECT_EQ(flags.flags(), 0u); |
163 | 167 |
164 const FilePath url(FILE_PATH_LITERAL("feature_canvas2d.html")); | 168 const FilePath url(FILE_PATH_LITERAL("feature_canvas2d.html")); |
165 RunTest(url, EXPECT_GPU_SWAP_BUFFERS); | 169 RunTest(url, EXPECT_GPU_SWAP_BUFFERS); |
166 } | 170 } |
167 | 171 |
168 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, Canvas2DBlocked) { | 172 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, Canvas2DBlocked) { |
169 const std::string json_blacklist = | 173 const std::string json_blacklist = |
(...skipping 14 matching lines...) Expand all Loading... |
184 EXPECT_EQ( | 188 EXPECT_EQ( |
185 flags.flags(), | 189 flags.flags(), |
186 static_cast<uint32>(GpuFeatureFlags::kGpuFeatureAccelerated2dCanvas)); | 190 static_cast<uint32>(GpuFeatureFlags::kGpuFeatureAccelerated2dCanvas)); |
187 | 191 |
188 const FilePath url(FILE_PATH_LITERAL("feature_canvas2d.html")); | 192 const FilePath url(FILE_PATH_LITERAL("feature_canvas2d.html")); |
189 RunTest(url, EXPECT_NO_GPU_PROCESS); | 193 RunTest(url, EXPECT_NO_GPU_PROCESS); |
190 } | 194 } |
191 | 195 |
192 } // namespace anonymous | 196 } // namespace anonymous |
193 | 197 |
OLD | NEW |