Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2813)

Unified Diff: chrome/test/gpu/gpu_feature_browsertest.cc

Issue 23534006: Enable GPU blacklist in tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add early SetUp to AcceleratedCompositingBlocked and finalized_ state after GpuDataManagerImplPriva… Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/gpu/gpu_feature_browsertest.cc
diff --git a/chrome/test/gpu/gpu_feature_browsertest.cc b/chrome/test/gpu/gpu_feature_browsertest.cc
index 8a6af169af580e2cf72bbe7149b4cf9c85a21406..92467e920cc0391a2c79cc836602a5712372fa76 100644
--- a/chrome/test/gpu/gpu_feature_browsertest.cc
+++ b/chrome/test/gpu/gpu_feature_browsertest.cc
@@ -187,8 +187,8 @@ IN_PROC_BROWSER_TEST_F(GpuFeatureTest, MAYBE_AcceleratedCompositingAllowed) {
class AcceleratedCompositingBlockedTest : public GpuFeatureTest {
public:
- virtual void SetUpInProcessBrowserTestFixture() OVERRIDE {
- GpuFeatureTest::SetUpInProcessBrowserTestFixture();
+ virtual void SetUpOnMainThread() OVERRIDE {
+ GpuFeatureTest::SetUpOnMainThread();
const std::string json_blacklist =
"{\n"
" \"name\": \"gpu blacklist\",\n"
@@ -214,7 +214,7 @@ class AcceleratedCompositingBlockedTest : public GpuFeatureTest {
#endif
IN_PROC_BROWSER_TEST_F(AcceleratedCompositingBlockedTest,
- MAYBE_AcceleratedCompositingBlocked) {
+ MAYBE_AcceleratedCompositingBlocked) {
EXPECT_TRUE(GpuDataManager::GetInstance()->IsFeatureBlacklisted(
gpu::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING));
@@ -364,11 +364,18 @@ IN_PROC_BROWSER_TEST_F(GpuFeatureTest, Canvas2DAllowed) {
if (gpu::GPUTestBotConfig::CurrentConfigMatches("XP"))
return;
- EXPECT_FALSE(GpuDataManager::GetInstance()->IsFeatureBlacklisted(
- gpu::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS));
+ bool is_blacklisted = false;
+#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+ // Blacklist rule #24 disables accelerated_2d_canvas on Linux.
+ is_blacklisted = true;
+#endif
+
+ EXPECT_EQ(is_blacklisted,
+ GpuDataManager::GetInstance()->IsFeatureBlacklisted(
+ gpu::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS));
const base::FilePath url(FILE_PATH_LITERAL("feature_canvas2d.html"));
- RunEventTest(url, kAcceleratedCanvasCreationEvent, true);
+ RunEventTest(url, kAcceleratedCanvasCreationEvent, !is_blacklisted);
}
IN_PROC_BROWSER_TEST_F(GpuFeatureTest, Canvas2DBlocked) {

Powered by Google App Engine
This is Rietveld 408576698