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