diff options
author | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-17 17:38:48 +0000 |
---|---|---|
committer | danakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-17 17:38:48 +0000 |
commit | c9afe696f61593147dfb7c389a888851ed224574 (patch) | |
tree | 4835021a9f4561b8e50505d68707b6bae97f8b05 /chrome/test/gpu | |
parent | d63b097e925a9e20892d4ece658cd12e20ff1b4a (diff) | |
download | chromium_src-c9afe696f61593147dfb7c389a888851ed224574.zip chromium_src-c9afe696f61593147dfb7c389a888851ed224574.tar.gz chromium_src-c9afe696f61593147dfb7c389a888851ed224574.tar.bz2 |
Change ACCELERATED_COMPOSITING blacklist to GPU_COMPOSITING.
Remove any checks for ACCELERATED_COMPOSITING to determine if
compositing is available, since it always is. Instead rename
the blacklist entry to GPU_COMPOSITING and use it to prevent
GL-based compositing.
Depends on: https://codereview.chromium.org/238933009/
R=jbauman@chromium.org, piman@chromium.org, zmo@chromium.org
BUG=363772
Review URL: https://codereview.chromium.org/239083006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@264566 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/gpu')
-rw-r--r-- | chrome/test/gpu/gpu_feature_browsertest.cc | 97 |
1 files changed, 32 insertions, 65 deletions
diff --git a/chrome/test/gpu/gpu_feature_browsertest.cc b/chrome/test/gpu/gpu_feature_browsertest.cc index 6836ea3..8bed26b 100644 --- a/chrome/test/gpu/gpu_feature_browsertest.cc +++ b/chrome/test/gpu/gpu_feature_browsertest.cc @@ -17,6 +17,7 @@ #include "chrome/test/base/tracing.h" #include "chrome/test/base/ui_test_utils.h" #include "content/public/browser/gpu_data_manager.h" +#include "content/public/common/content_client.h" #include "content/public/common/content_switches.h" #include "content/public/test/browser_test_utils.h" #include "gpu/config/gpu_feature_type.h" @@ -41,14 +42,24 @@ using trace_analyzer::TraceEventVector; namespace { -const char kSwapBuffersEvent[] = "SwapBuffers"; const char kAcceleratedCanvasCreationEvent[] = "Canvas2DLayerBridgeCreation"; const char kWebGLCreationEvent[] = "DrawingBufferCreation"; +class FakeContentClient : public content::ContentClient { +}; + class GpuFeatureTest : public InProcessBrowserTest { public: GpuFeatureTest() : category_patterns_("test_gpu") {} + virtual void SetUp() OVERRIDE { + content::SetContentClient(&content_client_); + } + + virtual void TearDown() OVERRIDE { + content::SetContentClient(NULL); + } + virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { base::FilePath test_dir; ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); @@ -160,6 +171,7 @@ class GpuFeatureTest : public InProcessBrowserTest { scoped_ptr<TraceAnalyzer> analyzer_; std::string category_patterns_; std::string trace_events_json_; + FakeContentClient content_client_; }; class GpuFeaturePixelTest : public GpuFeatureTest { @@ -170,69 +182,39 @@ class GpuFeaturePixelTest : public GpuFeatureTest { } }; -#if defined(OS_WIN) || defined(ADDRESS_SANITIZER) || defined(USE_AURA) || \ - defined(OS_MACOSX) -// This test is flaky on Windows. http://crbug.com/177113 -// Also fails under AddressSanitizer. http://crbug.com/185178 -// It fundamentally doesn't test the right thing on Aura. -// http://crbug.com/280675 -// This does not work with software compositing on Mac. http://crbug.com/286038 -#define MAYBE_AcceleratedCompositingAllowed DISABLED_AcceleratedCompositingAllowed -#else -#define MAYBE_AcceleratedCompositingAllowed AcceleratedCompositingAllowed -#endif - -IN_PROC_BROWSER_TEST_F(GpuFeatureTest, MAYBE_AcceleratedCompositingAllowed) { - EXPECT_FALSE(GpuDataManager::GetInstance()->IsFeatureBlacklisted( - gpu::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING)); - - const base::FilePath url(FILE_PATH_LITERAL("feature_compositing.html")); - RunEventTest(url, kSwapBuffersEvent, true); -} - -class AcceleratedCompositingBlockedTest : public GpuFeatureTest { +class GpuCompositingBlockedTest : public GpuFeatureTest { public: virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { GpuFeatureTest::SetUpInProcessBrowserTestFixture(); const std::string json_blacklist = - "{\n" - " \"name\": \"gpu blacklist\",\n" - " \"version\": \"1.0\",\n" - " \"entries\": [\n" - " {\n" - " \"id\": 1,\n" - " \"features\": [\n" - " \"accelerated_compositing\"\n" - " ]\n" - " }\n" - " ]\n" - "}"; + "{\n" + " \"name\": \"gpu blacklist\",\n" + " \"version\": \"1.0\",\n" + " \"entries\": [\n" + " {\n" + " \"id\": 1,\n" + " \"features\": [\n" + " \"gpu_compositing\"\n" + " ]\n" + " }\n" + " ]\n" + "}"; SetupBlacklist(json_blacklist); } }; -#if defined(USE_AURA) || defined(OS_MACOSX) -// Compositing is always on for Aura and Mac. -#define MAYBE_AcceleratedCompositingBlocked DISABLED_AcceleratedCompositingBlocked -#else -// TODO(jam): http://crbug.com/350550 -#define MAYBE_AcceleratedCompositingBlocked DISABLED_AcceleratedCompositingBlocked -#endif - -IN_PROC_BROWSER_TEST_F(AcceleratedCompositingBlockedTest, - MAYBE_AcceleratedCompositingBlocked) { +IN_PROC_BROWSER_TEST_F(GpuCompositingBlockedTest, GpuCompositingBlocked) { EXPECT_TRUE(GpuDataManager::GetInstance()->IsFeatureBlacklisted( - gpu::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING)); - - const base::FilePath url(FILE_PATH_LITERAL("feature_compositing.html")); - RunEventTest(url, kSwapBuffersEvent, false); + gpu::GPU_FEATURE_TYPE_GPU_COMPOSITING)); } -// Times out: http://crbug.com/166060 -IN_PROC_BROWSER_TEST_F(GpuFeatureTest, DISABLED_WebGLAllowed) { +IN_PROC_BROWSER_TEST_F(GpuFeatureTest, WebGLAllowed) { EXPECT_FALSE(GpuDataManager::GetInstance()->IsFeatureBlacklisted( gpu::GPU_FEATURE_TYPE_WEBGL)); + // The below times out: http://crbug.com/166060 + return; + const base::FilePath url(FILE_PATH_LITERAL("feature_webgl.html")); RunEventTest(url, kWebGLCreationEvent, true); } @@ -404,21 +386,6 @@ IN_PROC_BROWSER_TEST_F(GpuFeatureTest, RunTest(url, "\"SUCCESS\"", false); } -class ThreadedCompositorTest : public GpuFeatureTest { - public: - virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { - GpuFeatureTest::SetUpCommandLine(command_line); - command_line->AppendSwitch(switches::kEnableThreadedCompositing); - } -}; - -// http://crbug.com/157985 -IN_PROC_BROWSER_TEST_F(ThreadedCompositorTest, DISABLED_ThreadedCompositor) { - const base::FilePath url(FILE_PATH_LITERAL("feature_compositing.html")); - RunEventTest(url, kSwapBuffersEvent, true); -} - - #if defined(OS_WIN) || defined(OS_CHROMEOS) || defined(OS_MACOSX) // http://crbug.com/162343: flaky on Windows and Mac, failing on ChromiumOS. #define MAYBE_RafNoDamage DISABLED_RafNoDamage |