| 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/stringprintf.h" | 9 #include "base/stringprintf.h" |
| 10 #include "base/test/trace_event_analyzer.h" | 10 #include "base/test/trace_event_analyzer.h" |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 public: | 204 public: |
| 205 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { | 205 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { |
| 206 GpuFeatureTest::SetUpInProcessBrowserTestFixture(); | 206 GpuFeatureTest::SetUpInProcessBrowserTestFixture(); |
| 207 const std::string json_blacklist = | 207 const std::string json_blacklist = |
| 208 "{\n" | 208 "{\n" |
| 209 " \"name\": \"gpu blacklist\",\n" | 209 " \"name\": \"gpu blacklist\",\n" |
| 210 " \"version\": \"1.0\",\n" | 210 " \"version\": \"1.0\",\n" |
| 211 " \"entries\": [\n" | 211 " \"entries\": [\n" |
| 212 " {\n" | 212 " {\n" |
| 213 " \"id\": 1,\n" | 213 " \"id\": 1,\n" |
| 214 " \"blacklist\": [\n" | 214 " \"features\": [\n" |
| 215 " \"accelerated_compositing\"\n" | 215 " \"accelerated_compositing\"\n" |
| 216 " ]\n" | 216 " ]\n" |
| 217 " }\n" | 217 " }\n" |
| 218 " ]\n" | 218 " ]\n" |
| 219 "}"; | 219 "}"; |
| 220 SetupBlacklist(json_blacklist); | 220 SetupBlacklist(json_blacklist); |
| 221 } | 221 } |
| 222 }; | 222 }; |
| 223 | 223 |
| 224 #if (defined(OS_WIN) && defined(USE_AURA)) | 224 #if (defined(OS_WIN) && defined(USE_AURA)) |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 } | 272 } |
| 273 | 273 |
| 274 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, WebGLBlocked) { | 274 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, WebGLBlocked) { |
| 275 const std::string json_blacklist = | 275 const std::string json_blacklist = |
| 276 "{\n" | 276 "{\n" |
| 277 " \"name\": \"gpu blacklist\",\n" | 277 " \"name\": \"gpu blacklist\",\n" |
| 278 " \"version\": \"1.0\",\n" | 278 " \"version\": \"1.0\",\n" |
| 279 " \"entries\": [\n" | 279 " \"entries\": [\n" |
| 280 " {\n" | 280 " {\n" |
| 281 " \"id\": 1,\n" | 281 " \"id\": 1,\n" |
| 282 " \"blacklist\": [\n" | 282 " \"features\": [\n" |
| 283 " \"webgl\"\n" | 283 " \"webgl\"\n" |
| 284 " ]\n" | 284 " ]\n" |
| 285 " }\n" | 285 " }\n" |
| 286 " ]\n" | 286 " ]\n" |
| 287 "}"; | 287 "}"; |
| 288 SetupBlacklist(json_blacklist); | 288 SetupBlacklist(json_blacklist); |
| 289 GpuFeatureType type = | 289 GpuFeatureType type = |
| 290 GpuDataManager::GetInstance()->GetBlacklistedFeatures(); | 290 GpuDataManager::GetInstance()->GetBlacklistedFeatures(); |
| 291 type = IgnoreGpuFeatures(type); | 291 type = IgnoreGpuFeatures(type); |
| 292 EXPECT_EQ(type, content::GPU_FEATURE_TYPE_WEBGL); | 292 EXPECT_EQ(type, content::GPU_FEATURE_TYPE_WEBGL); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 if (GPUTestBotConfig::CurrentConfigMatches("MAC VMWARE")) | 339 if (GPUTestBotConfig::CurrentConfigMatches("MAC VMWARE")) |
| 340 return; | 340 return; |
| 341 | 341 |
| 342 const std::string json_blacklist = | 342 const std::string json_blacklist = |
| 343 "{\n" | 343 "{\n" |
| 344 " \"name\": \"gpu blacklist\",\n" | 344 " \"name\": \"gpu blacklist\",\n" |
| 345 " \"version\": \"1.0\",\n" | 345 " \"version\": \"1.0\",\n" |
| 346 " \"entries\": [\n" | 346 " \"entries\": [\n" |
| 347 " {\n" | 347 " {\n" |
| 348 " \"id\": 1,\n" | 348 " \"id\": 1,\n" |
| 349 " \"blacklist\": [\n" | 349 " \"features\": [\n" |
| 350 " \"multisampling\"\n" | 350 " \"multisampling\"\n" |
| 351 " ]\n" | 351 " ]\n" |
| 352 " }\n" | 352 " }\n" |
| 353 " ]\n" | 353 " ]\n" |
| 354 "}"; | 354 "}"; |
| 355 SetupBlacklist(json_blacklist); | 355 SetupBlacklist(json_blacklist); |
| 356 GpuFeatureType type = | 356 GpuFeatureType type = |
| 357 GpuDataManager::GetInstance()->GetBlacklistedFeatures(); | 357 GpuDataManager::GetInstance()->GetBlacklistedFeatures(); |
| 358 type = IgnoreGpuFeatures(type); | 358 type = IgnoreGpuFeatures(type); |
| 359 EXPECT_EQ(type, content::GPU_FEATURE_TYPE_MULTISAMPLING); | 359 EXPECT_EQ(type, content::GPU_FEATURE_TYPE_MULTISAMPLING); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 } | 393 } |
| 394 | 394 |
| 395 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, Canvas2DBlocked) { | 395 IN_PROC_BROWSER_TEST_F(GpuFeatureTest, Canvas2DBlocked) { |
| 396 const std::string json_blacklist = | 396 const std::string json_blacklist = |
| 397 "{\n" | 397 "{\n" |
| 398 " \"name\": \"gpu blacklist\",\n" | 398 " \"name\": \"gpu blacklist\",\n" |
| 399 " \"version\": \"1.0\",\n" | 399 " \"version\": \"1.0\",\n" |
| 400 " \"entries\": [\n" | 400 " \"entries\": [\n" |
| 401 " {\n" | 401 " {\n" |
| 402 " \"id\": 1,\n" | 402 " \"id\": 1,\n" |
| 403 " \"blacklist\": [\n" | 403 " \"features\": [\n" |
| 404 " \"accelerated_2d_canvas\"\n" | 404 " \"accelerated_2d_canvas\"\n" |
| 405 " ]\n" | 405 " ]\n" |
| 406 " }\n" | 406 " }\n" |
| 407 " ]\n" | 407 " ]\n" |
| 408 "}"; | 408 "}"; |
| 409 SetupBlacklist(json_blacklist); | 409 SetupBlacklist(json_blacklist); |
| 410 GpuFeatureType type = | 410 GpuFeatureType type = |
| 411 GpuDataManager::GetInstance()->GetBlacklistedFeatures(); | 411 GpuDataManager::GetInstance()->GetBlacklistedFeatures(); |
| 412 type = IgnoreGpuFeatures(type); | 412 type = IgnoreGpuFeatures(type); |
| 413 EXPECT_EQ(type, content::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS); | 413 EXPECT_EQ(type, content::GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS); |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 base::StringPrintf( | 566 base::StringPrintf( |
| 567 "%d (resize offset %d): IOSurface width %d -> %d; Creates %d " | 567 "%d (resize offset %d): IOSurface width %d -> %d; Creates %d " |
| 568 "Expected %d", offset_i, offsets[offset_i], | 568 "Expected %d", offset_i, offsets[offset_i], |
| 569 old_width, new_width, num_creates, expected_creates); | 569 old_width, new_width, num_creates, expected_creates); |
| 570 } | 570 } |
| 571 } | 571 } |
| 572 } | 572 } |
| 573 #endif | 573 #endif |
| 574 | 574 |
| 575 } // namespace anonymous | 575 } // namespace anonymous |
| OLD | NEW |