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