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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 } | 189 } |
190 | 190 |
191 #if defined(OS_LINUX) | 191 #if defined(OS_LINUX) |
192 // http://crbug.com/104142 | 192 // http://crbug.com/104142 |
193 #define Canvas2DAllowed FLAKY_Canvas2DAllowed | 193 #define Canvas2DAllowed FLAKY_Canvas2DAllowed |
194 #endif | 194 #endif |
195 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, Canvas2DAllowed) { | 195 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, Canvas2DAllowed) { |
196 GpuFeatureFlags flags = GpuDataManager::GetInstance()->GetGpuFeatureFlags(); | 196 GpuFeatureFlags flags = GpuDataManager::GetInstance()->GetGpuFeatureFlags(); |
197 EXPECT_EQ(flags.flags(), 0u); | 197 EXPECT_EQ(flags.flags(), 0u); |
198 | 198 |
199 #if defined(OS_MACOSX) | |
200 // TODO(zmo): enabling Mac when skia backend is enabled. | |
201 const GpuResultFlags expectations = EXPECT_NO_GPU_PROCESS; | |
202 #else | |
203 num_contexts_ = 2; | 199 num_contexts_ = 2; |
204 const GpuResultFlags expectations = EXPECT_GPU_PROCESS | | 200 const GpuResultFlags expectations = EXPECT_GPU_PROCESS | |
205 EXPECT_GPU_SWAP_BUFFERS | | 201 EXPECT_GPU_SWAP_BUFFERS | |
206 EXPECT_GPU_CONTEXTS; | 202 EXPECT_GPU_CONTEXTS; |
207 #endif | |
208 const FilePath url(FILE_PATH_LITERAL("feature_canvas2d.html")); | 203 const FilePath url(FILE_PATH_LITERAL("feature_canvas2d.html")); |
209 RunTest(url, expectations); | 204 RunTest(url, expectations); |
210 } | 205 } |
211 | 206 |
212 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, Canvas2DBlocked) { | 207 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, Canvas2DBlocked) { |
213 const std::string json_blacklist = | 208 const std::string json_blacklist = |
214 "{\n" | 209 "{\n" |
215 " \"name\": \"gpu blacklist\",\n" | 210 " \"name\": \"gpu blacklist\",\n" |
216 " \"version\": \"1.0\",\n" | 211 " \"version\": \"1.0\",\n" |
217 " \"entries\": [\n" | 212 " \"entries\": [\n" |
(...skipping 10 matching lines...) Expand all Loading... |
228 EXPECT_EQ( | 223 EXPECT_EQ( |
229 flags.flags(), | 224 flags.flags(), |
230 static_cast<uint32>(GpuFeatureFlags::kGpuFeatureAccelerated2dCanvas)); | 225 static_cast<uint32>(GpuFeatureFlags::kGpuFeatureAccelerated2dCanvas)); |
231 | 226 |
232 const FilePath url(FILE_PATH_LITERAL("feature_canvas2d.html")); | 227 const FilePath url(FILE_PATH_LITERAL("feature_canvas2d.html")); |
233 RunTest(url, EXPECT_NO_GPU_PROCESS); | 228 RunTest(url, EXPECT_NO_GPU_PROCESS); |
234 } | 229 } |
235 | 230 |
236 } // namespace anonymous | 231 } // namespace anonymous |
237 | 232 |
OLD | NEW |