Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(430)

Side by Side Diff: chrome/test/gpu/gpu_feature_browsertest.cc

Issue 239083006: Change ACCELERATED_COMPOSITING blacklist to GPU_COMPOSITING. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: typo Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #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/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/test/trace_event_analyzer.h" 10 #include "base/test/trace_event_analyzer.h"
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 }; 163 };
164 164
165 class GpuFeaturePixelTest : public GpuFeatureTest { 165 class GpuFeaturePixelTest : public GpuFeatureTest {
166 protected: 166 protected:
167 virtual void SetUp() OVERRIDE { 167 virtual void SetUp() OVERRIDE {
168 EnablePixelOutput(); 168 EnablePixelOutput();
169 GpuFeatureTest::SetUp(); 169 GpuFeatureTest::SetUp();
170 } 170 }
171 }; 171 };
172 172
173 #if defined(OS_WIN) || defined(ADDRESS_SANITIZER) || defined(USE_AURA) || \ 173 class GpuCompositingBlockedTest : public GpuFeatureTest {
174 defined(OS_MACOSX)
175 // This test is flaky on Windows. http://crbug.com/177113
176 // Also fails under AddressSanitizer. http://crbug.com/185178
177 // It fundamentally doesn't test the right thing on Aura.
178 // http://crbug.com/280675
179 // This does not work with software compositing on Mac. http://crbug.com/286038
180 #define MAYBE_AcceleratedCompositingAllowed DISABLED_AcceleratedCompositingAllow ed
181 #else
182 #define MAYBE_AcceleratedCompositingAllowed AcceleratedCompositingAllowed
183 #endif
184
185 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, MAYBE_AcceleratedCompositingAllowed) {
186 EXPECT_FALSE(GpuDataManager::GetInstance()->IsFeatureBlacklisted(
187 gpu::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING));
188
189 const base::FilePath url(FILE_PATH_LITERAL("feature_compositing.html"));
190 RunEventTest(url, kSwapBuffersEvent, true);
191 }
192
193 class AcceleratedCompositingBlockedTest : public GpuFeatureTest {
194 public: 174 public:
195 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { 175 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE {
196 GpuFeatureTest::SetUpInProcessBrowserTestFixture(); 176 GpuFeatureTest::SetUpInProcessBrowserTestFixture();
197 const std::string json_blacklist = 177 const std::string json_blacklist =
198 "{\n" 178 "{\n"
199 " \"name\": \"gpu blacklist\",\n" 179 " \"name\": \"gpu blacklist\",\n"
200 " \"version\": \"1.0\",\n" 180 " \"version\": \"1.0\",\n"
201 " \"entries\": [\n" 181 " \"entries\": [\n"
202 " {\n" 182 " {\n"
203 " \"id\": 1,\n" 183 " \"id\": 1,\n"
204 " \"features\": [\n" 184 " \"features\": [\n"
205 " \"accelerated_compositing\"\n" 185 " \"gpu_compositing\"\n"
206 " ]\n" 186 " ]\n"
207 " }\n" 187 " }\n"
208 " ]\n" 188 " ]\n"
209 "}"; 189 "}";
210 SetupBlacklist(json_blacklist); 190 SetupBlacklist(json_blacklist);
211 } 191 }
212 }; 192 };
213 193
214 #if defined(USE_AURA) || defined(OS_MACOSX) 194 IN_PROC_BROWSER_TEST_F(GpuCompositingBlockedTest, GpuCompositingBlocked) {
215 // Compositing is always on for Aura and Mac.
216 #define MAYBE_AcceleratedCompositingBlocked DISABLED_AcceleratedCompositingBlock ed
217 #else
218 // TODO(jam): http://crbug.com/350550
219 #define MAYBE_AcceleratedCompositingBlocked DISABLED_AcceleratedCompositingBlock ed
220 #endif
221
222 IN_PROC_BROWSER_TEST_F(AcceleratedCompositingBlockedTest,
223 MAYBE_AcceleratedCompositingBlocked) {
224 EXPECT_TRUE(GpuDataManager::GetInstance()->IsFeatureBlacklisted( 195 EXPECT_TRUE(GpuDataManager::GetInstance()->IsFeatureBlacklisted(
225 gpu::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING)); 196 gpu::GPU_FEATURE_TYPE_GPU_COMPOSITING));
226
227 const base::FilePath url(FILE_PATH_LITERAL("feature_compositing.html"));
228 RunEventTest(url, kSwapBuffersEvent, false);
229 } 197 }
230 198
231 // Times out: http://crbug.com/166060 199 // Times out: http://crbug.com/166060
232 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, DISABLED_WebGLAllowed) { 200 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, DISABLED_WebGLAllowed) {
233 EXPECT_FALSE(GpuDataManager::GetInstance()->IsFeatureBlacklisted( 201 EXPECT_FALSE(GpuDataManager::GetInstance()->IsFeatureBlacklisted(
234 gpu::GPU_FEATURE_TYPE_WEBGL)); 202 gpu::GPU_FEATURE_TYPE_WEBGL));
235 203
236 const base::FilePath url(FILE_PATH_LITERAL("feature_webgl.html")); 204 const base::FilePath url(FILE_PATH_LITERAL("feature_webgl.html"));
237 RunEventTest(url, kWebGLCreationEvent, true); 205 RunEventTest(url, kWebGLCreationEvent, true);
238 } 206 }
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 RunTest(url, "\"SUCCESS\"", false); 365 RunTest(url, "\"SUCCESS\"", false);
398 } 366 }
399 367
400 // crbug.com/176466 368 // crbug.com/176466
401 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, 369 IN_PROC_BROWSER_TEST_F(GpuFeatureTest,
402 DISABLED_CanOpenPopupAndRenderWith2DCanvas) { 370 DISABLED_CanOpenPopupAndRenderWith2DCanvas) {
403 const base::FilePath url(FILE_PATH_LITERAL("canvas_popup.html")); 371 const base::FilePath url(FILE_PATH_LITERAL("canvas_popup.html"));
404 RunTest(url, "\"SUCCESS\"", false); 372 RunTest(url, "\"SUCCESS\"", false);
405 } 373 }
406 374
407 class ThreadedCompositorTest : public GpuFeatureTest {
408 public:
409 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
410 GpuFeatureTest::SetUpCommandLine(command_line);
411 command_line->AppendSwitch(switches::kEnableThreadedCompositing);
412 }
413 };
414
415 // http://crbug.com/157985
416 IN_PROC_BROWSER_TEST_F(ThreadedCompositorTest, DISABLED_ThreadedCompositor) {
417 const base::FilePath url(FILE_PATH_LITERAL("feature_compositing.html"));
418 RunEventTest(url, kSwapBuffersEvent, true);
419 }
420
421
422 #if defined(OS_WIN) || defined(OS_CHROMEOS) || defined(OS_MACOSX) 375 #if defined(OS_WIN) || defined(OS_CHROMEOS) || defined(OS_MACOSX)
423 // http://crbug.com/162343: flaky on Windows and Mac, failing on ChromiumOS. 376 // http://crbug.com/162343: flaky on Windows and Mac, failing on ChromiumOS.
424 #define MAYBE_RafNoDamage DISABLED_RafNoDamage 377 #define MAYBE_RafNoDamage DISABLED_RafNoDamage
425 #else 378 #else
426 #define MAYBE_RafNoDamage RafNoDamage 379 #define MAYBE_RafNoDamage RafNoDamage
427 #endif 380 #endif
428 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, MAYBE_RafNoDamage) { 381 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, MAYBE_RafNoDamage) {
429 category_patterns_ = "-test_*"; 382 category_patterns_ = "-test_*";
430 const base::FilePath url(FILE_PATH_LITERAL("feature_raf_no_damage.html")); 383 const base::FilePath url(FILE_PATH_LITERAL("feature_raf_no_damage.html"));
431 RunEventTest(url); 384 RunEventTest(url);
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 "%d (resize offset %d): IOSurface width %d -> %d; Creates %d " 489 "%d (resize offset %d): IOSurface width %d -> %d; Creates %d "
537 "Expected %d", offset_i, offsets[offset_i], 490 "Expected %d", offset_i, offsets[offset_i],
538 old_width, new_width, num_creates, expected_creates); 491 old_width, new_width, num_creates, expected_creates);
539 } 492 }
540 } 493 }
541 LOG(INFO) << "finished test"; 494 LOG(INFO) << "finished test";
542 } 495 }
543 #endif 496 #endif
544 497
545 } // namespace 498 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698