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

Side by Side Diff: trunk/src/chrome/test/gpu/gpu_feature_browsertest.cc

Issue 26906004: Revert 227977 "Enable GPU control lists in tests." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 }; 209 };
210 210
211 #if defined(USE_AURA) 211 #if defined(USE_AURA)
212 // Compositing is always on for Aura. 212 // Compositing is always on for Aura.
213 #define MAYBE_AcceleratedCompositingBlocked DISABLED_AcceleratedCompositingBlock ed 213 #define MAYBE_AcceleratedCompositingBlocked DISABLED_AcceleratedCompositingBlock ed
214 #else 214 #else
215 #define MAYBE_AcceleratedCompositingBlocked AcceleratedCompositingBlocked 215 #define MAYBE_AcceleratedCompositingBlocked AcceleratedCompositingBlocked
216 #endif 216 #endif
217 217
218 IN_PROC_BROWSER_TEST_F(AcceleratedCompositingBlockedTest, 218 IN_PROC_BROWSER_TEST_F(AcceleratedCompositingBlockedTest,
219 MAYBE_AcceleratedCompositingBlocked) { 219 MAYBE_AcceleratedCompositingBlocked) {
220 EXPECT_TRUE(GpuDataManager::GetInstance()->IsFeatureBlacklisted( 220 EXPECT_TRUE(GpuDataManager::GetInstance()->IsFeatureBlacklisted(
221 gpu::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING)); 221 gpu::GPU_FEATURE_TYPE_ACCELERATED_COMPOSITING));
222 222
223 const base::FilePath url(FILE_PATH_LITERAL("feature_compositing.html")); 223 const base::FilePath url(FILE_PATH_LITERAL("feature_compositing.html"));
224 RunEventTest(url, kSwapBuffersEvent, false); 224 RunEventTest(url, kSwapBuffersEvent, false);
225 } 225 }
226 226
227 class AcceleratedCompositingTest : public GpuFeatureTest { 227 class AcceleratedCompositingTest : public GpuFeatureTest {
228 public: 228 public:
229 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { 229 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 354
355 const base::FilePath url(FILE_PATH_LITERAL("feature_multisampling.html")); 355 const base::FilePath url(FILE_PATH_LITERAL("feature_multisampling.html"));
356 RunTest(url, "\"FALSE\"", true); 356 RunTest(url, "\"FALSE\"", true);
357 } 357 }
358 358
359 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, Canvas2DAllowed) { 359 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, Canvas2DAllowed) {
360 // Accelerated canvas 2D is not supported on XP. 360 // Accelerated canvas 2D is not supported on XP.
361 if (gpu::GPUTestBotConfig::CurrentConfigMatches("XP")) 361 if (gpu::GPUTestBotConfig::CurrentConfigMatches("XP"))
362 return; 362 return;
363 363
364 bool is_blacklisted = false; 364 EXPECT_FALSE(GpuDataManager::GetInstance()->IsFeatureBlacklisted(
365 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 365 gpu::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS));
366 // Blacklist rule #24 disables accelerated_2d_canvas on Linux.
367 is_blacklisted = true;
368 #endif
369
370 EXPECT_EQ(is_blacklisted,
371 GpuDataManager::GetInstance()->IsFeatureBlacklisted(
372 gpu::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS));
373 366
374 const base::FilePath url(FILE_PATH_LITERAL("feature_canvas2d.html")); 367 const base::FilePath url(FILE_PATH_LITERAL("feature_canvas2d.html"));
375 RunEventTest(url, kAcceleratedCanvasCreationEvent, !is_blacklisted); 368 RunEventTest(url, kAcceleratedCanvasCreationEvent, true);
376 } 369 }
377 370
378 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, Canvas2DBlocked) { 371 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, Canvas2DBlocked) {
379 const std::string json_blacklist = 372 const std::string json_blacklist =
380 "{\n" 373 "{\n"
381 " \"name\": \"gpu blacklist\",\n" 374 " \"name\": \"gpu blacklist\",\n"
382 " \"version\": \"1.0\",\n" 375 " \"version\": \"1.0\",\n"
383 " \"entries\": [\n" 376 " \"entries\": [\n"
384 " {\n" 377 " {\n"
385 " \"id\": 1,\n" 378 " \"id\": 1,\n"
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 base::StringPrintf( 540 base::StringPrintf(
548 "%d (resize offset %d): IOSurface width %d -> %d; Creates %d " 541 "%d (resize offset %d): IOSurface width %d -> %d; Creates %d "
549 "Expected %d", offset_i, offsets[offset_i], 542 "Expected %d", offset_i, offsets[offset_i],
550 old_width, new_width, num_creates, expected_creates); 543 old_width, new_width, num_creates, expected_creates);
551 } 544 }
552 } 545 }
553 } 546 }
554 #endif 547 #endif
555 548
556 } // namespace 549 } // namespace
OLDNEW
« no previous file with comments | « trunk/src/chrome/test/base/test_launcher_utils.cc ('k') | trunk/src/content/browser/gpu/gpu_data_manager_impl_private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698