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 #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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 command_line->AppendSwitch(switches::kDisableExperimentalWebGL); | 288 command_line->AppendSwitch(switches::kDisableExperimentalWebGL); |
289 #endif | 289 #endif |
290 } | 290 } |
291 }; | 291 }; |
292 | 292 |
293 IN_PROC_BROWSER_TEST_F(WebGLTest, WebGLDisabled) { | 293 IN_PROC_BROWSER_TEST_F(WebGLTest, WebGLDisabled) { |
294 const base::FilePath url(FILE_PATH_LITERAL("feature_webgl.html")); | 294 const base::FilePath url(FILE_PATH_LITERAL("feature_webgl.html")); |
295 RunEventTest(url, kWebGLCreationEvent, false); | 295 RunEventTest(url, kWebGLCreationEvent, false); |
296 } | 296 } |
297 | 297 |
| 298 #if (defined(GOOGLE_CHROME_BUILD) && defined(OS_MACOSX)) || defined(OS_WIN) |
| 299 // http://crbug.com/314745 and http://crbug.com/332341 |
| 300 #define MultisamplingAllowed DISABLED_MultisamplingAllowed |
| 301 #endif |
298 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, MultisamplingAllowed) { | 302 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, MultisamplingAllowed) { |
299 bool expect_blacklisted = false; | 303 bool expect_blacklisted = false; |
300 if (gpu::GPUTestBotConfig::GpuBlacklistedOnBot()) | 304 if (gpu::GPUTestBotConfig::GpuBlacklistedOnBot()) |
301 expect_blacklisted = true; | 305 expect_blacklisted = true; |
302 | 306 |
303 EXPECT_EQ(expect_blacklisted, | 307 EXPECT_EQ(expect_blacklisted, |
304 GpuDataManager::GetInstance()->IsFeatureBlacklisted( | 308 GpuDataManager::GetInstance()->IsFeatureBlacklisted( |
305 gpu::GPU_FEATURE_TYPE_MULTISAMPLING)); | 309 gpu::GPU_FEATURE_TYPE_MULTISAMPLING)); |
306 | 310 |
307 // Multisampling is not supported if running on top of osmesa. | 311 // Multisampling is not supported if running on top of osmesa. |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 | 360 |
357 IN_PROC_BROWSER_TEST_F(WebGLMultisamplingTest, MultisamplingDisabled) { | 361 IN_PROC_BROWSER_TEST_F(WebGLMultisamplingTest, MultisamplingDisabled) { |
358 // Multisampling fails on virtualized mac os. | 362 // Multisampling fails on virtualized mac os. |
359 if (gpu::GPUTestBotConfig::CurrentConfigMatches("MAC VMWARE")) | 363 if (gpu::GPUTestBotConfig::CurrentConfigMatches("MAC VMWARE")) |
360 return; | 364 return; |
361 | 365 |
362 const base::FilePath url(FILE_PATH_LITERAL("feature_multisampling.html")); | 366 const base::FilePath url(FILE_PATH_LITERAL("feature_multisampling.html")); |
363 RunTest(url, "\"FALSE\"", true); | 367 RunTest(url, "\"FALSE\"", true); |
364 } | 368 } |
365 | 369 |
366 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, Canvas2DAllowed) { | 370 // http://crbug.com/332341 |
| 371 #if defined(OS_WIN) |
| 372 #define MAYBE_Canvas2DAllowed DISABLED_Canvas2DAllowed |
| 373 #else |
| 374 #define MAYBE_Canvas2DAllowed Canvas2DAllowed |
| 375 #endif |
| 376 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, MAYBE_Canvas2DAllowed) { |
367 // Accelerated canvas 2D is not supported on XP. | 377 // Accelerated canvas 2D is not supported on XP. |
368 if (gpu::GPUTestBotConfig::CurrentConfigMatches("XP")) | 378 if (gpu::GPUTestBotConfig::CurrentConfigMatches("XP")) |
369 return; | 379 return; |
370 | 380 |
371 enum Canvas2DState { | 381 enum Canvas2DState { |
372 ENABLED, | 382 ENABLED, |
373 BLACKLISTED, // Disabled via the blacklist. | 383 BLACKLISTED, // Disabled via the blacklist. |
374 DISABLED, // Not disabled via the blacklist, but expected to be disabled | 384 DISABLED, // Not disabled via the blacklist, but expected to be disabled |
375 // by configuration. | 385 // by configuration. |
376 } expected_state = ENABLED; | 386 } expected_state = ENABLED; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
431 GpuFeatureTest::SetUpCommandLine(command_line); | 441 GpuFeatureTest::SetUpCommandLine(command_line); |
432 command_line->AppendSwitch(switches::kDisableAccelerated2dCanvas); | 442 command_line->AppendSwitch(switches::kDisableAccelerated2dCanvas); |
433 } | 443 } |
434 }; | 444 }; |
435 | 445 |
436 IN_PROC_BROWSER_TEST_F(Canvas2DDisabledTest, Canvas2DDisabled) { | 446 IN_PROC_BROWSER_TEST_F(Canvas2DDisabledTest, Canvas2DDisabled) { |
437 const base::FilePath url(FILE_PATH_LITERAL("feature_canvas2d.html")); | 447 const base::FilePath url(FILE_PATH_LITERAL("feature_canvas2d.html")); |
438 RunEventTest(url, kAcceleratedCanvasCreationEvent, false); | 448 RunEventTest(url, kAcceleratedCanvasCreationEvent, false); |
439 } | 449 } |
440 | 450 |
| 451 // Fails on XP and Vista bots. http://crbug.com/332341 |
| 452 #if defined(OS_WIN) |
| 453 #define MAYBE_CanOpenPopupAndRenderWithWebGLCanvas \ |
| 454 DISABLED_CanOpenPopupAndRenderWithWebGLCanvas |
| 455 #else |
| 456 #define MAYBE_CanOpenPopupAndRenderWithWebGLCanvas \ |
| 457 CanOpenPopupAndRenderWithWebGLCanvas |
| 458 #endif |
441 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, | 459 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, |
442 CanOpenPopupAndRenderWithWebGLCanvas) { | 460 MAYBE_CanOpenPopupAndRenderWithWebGLCanvas) { |
443 if (gpu::GPUTestBotConfig::GpuBlacklistedOnBot()) | 461 if (gpu::GPUTestBotConfig::GpuBlacklistedOnBot()) |
444 return; | 462 return; |
445 | 463 |
446 const base::FilePath url(FILE_PATH_LITERAL("webgl_popup.html")); | 464 const base::FilePath url(FILE_PATH_LITERAL("webgl_popup.html")); |
447 RunTest(url, "\"SUCCESS\"", false); | 465 RunTest(url, "\"SUCCESS\"", false); |
448 } | 466 } |
449 | 467 |
450 // crbug.com/176466 | 468 // crbug.com/176466 |
451 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, | 469 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, |
452 DISABLED_CanOpenPopupAndRenderWith2DCanvas) { | 470 DISABLED_CanOpenPopupAndRenderWith2DCanvas) { |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 "%d (resize offset %d): IOSurface width %d -> %d; Creates %d " | 604 "%d (resize offset %d): IOSurface width %d -> %d; Creates %d " |
587 "Expected %d", offset_i, offsets[offset_i], | 605 "Expected %d", offset_i, offsets[offset_i], |
588 old_width, new_width, num_creates, expected_creates); | 606 old_width, new_width, num_creates, expected_creates); |
589 } | 607 } |
590 } | 608 } |
591 LOG(INFO) << "finished test"; | 609 LOG(INFO) << "finished test"; |
592 } | 610 } |
593 #endif | 611 #endif |
594 | 612 |
595 } // namespace | 613 } // namespace |
OLD | NEW |