diff options
author | gab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-15 21:45:40 +0000 |
---|---|---|
committer | gab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-15 21:45:40 +0000 |
commit | abdaabe0d254140456ec869afd753228579f97ae (patch) | |
tree | 1c72cfc8b09df6d3260aacd5ffde053111536e36 /chrome/test/gpu | |
parent | 0ef25efb6f417a78cb34f498a4a6088d84a332d7 (diff) | |
download | chromium_src-abdaabe0d254140456ec869afd753228579f97ae.zip chromium_src-abdaabe0d254140456ec869afd753228579f97ae.tar.gz chromium_src-abdaabe0d254140456ec869afd753228579f97ae.tar.bz2 |
Fix GpuFeatureTest.Canvas2DAllowed in software compositing mode.
BUG=306790
Review URL: https://codereview.chromium.org/26220005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228773 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/gpu')
-rw-r--r-- | chrome/test/gpu/gpu_feature_browsertest.cc | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/chrome/test/gpu/gpu_feature_browsertest.cc b/chrome/test/gpu/gpu_feature_browsertest.cc index 0cbe428..e3eecb5 100644 --- a/chrome/test/gpu/gpu_feature_browsertest.cc +++ b/chrome/test/gpu/gpu_feature_browsertest.cc @@ -357,33 +357,41 @@ IN_PROC_BROWSER_TEST_F(WebGLMultisamplingTest, MultisamplingDisabled) { } IN_PROC_BROWSER_TEST_F(GpuFeatureTest, Canvas2DAllowed) { -#if defined(USE_AURA) - // TODO(gpu): Fix this test in software compositing mode: - // http://crbug.com/306790. - if (!content::GpuDataManager::GetInstance()->CanUseGpuBrowserCompositor()) - return; -#endif // Accelerated canvas 2D is not supported on XP. if (gpu::GPUTestBotConfig::CurrentConfigMatches("XP")) return; - bool is_blacklisted = false; + enum Canvas2DState { + ENABLED, + BLACKLISTED, // Disabled via the blacklist. + DISABLED, // Not disabled via the blacklist, but expected to be disabled + // by configuration. + } expected_state = ENABLED; #if defined(OS_LINUX) && !defined(OS_CHROMEOS) // Blacklist rule #24 disables accelerated_2d_canvas on Linux. // TODO(gab): Enable GPU control lists on Linux. - // is_blacklisted = true; + // expected_state = BLACKLISTED; #elif defined(OS_WIN) // Blacklist rule #67 disables accelerated_2d_canvas on XP. if (base::win::GetVersion() < base::win::VERSION_VISTA) - is_blacklisted = true; + expected_state = BLACKLISTED; +#endif + +#if defined(USE_AURA) + // Canvas 2D is always disabled in software compositing mode, make sure it is + // marked as such if it wasn't blacklisted already. + if (expected_state == ENABLED && + !content::GpuDataManager::GetInstance()->CanUseGpuBrowserCompositor()) { + expected_state = DISABLED; + } #endif - EXPECT_EQ(is_blacklisted, + EXPECT_EQ(expected_state == BLACKLISTED, GpuDataManager::GetInstance()->IsFeatureBlacklisted( gpu::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS)); const base::FilePath url(FILE_PATH_LITERAL("feature_canvas2d.html")); - RunEventTest(url, kAcceleratedCanvasCreationEvent, !is_blacklisted); + RunEventTest(url, kAcceleratedCanvasCreationEvent, expected_state == ENABLED); } IN_PROC_BROWSER_TEST_F(GpuFeatureTest, Canvas2DBlocked) { |