| 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 // Tests getWebGLStatus function when WebGL is blacklisted. | 415 // Tests getWebGLStatus function when WebGL is blacklisted. |
| 416 IN_PROC_BROWSER_TEST_F(ExtensionWebstoreGetWebGLStatusTest, Blocked) { | 416 IN_PROC_BROWSER_TEST_F(ExtensionWebstoreGetWebGLStatusTest, Blocked) { |
| 417 static const std::string json_blacklist = | 417 static const std::string json_blacklist = |
| 418 "{\n" | 418 "{\n" |
| 419 " \"name\": \"gpu blacklist\",\n" | 419 " \"name\": \"gpu blacklist\",\n" |
| 420 " \"version\": \"1.0\",\n" | 420 " \"version\": \"1.0\",\n" |
| 421 " \"entries\": [\n" | 421 " \"entries\": [\n" |
| 422 " {\n" | 422 " {\n" |
| 423 " \"id\": 1,\n" | 423 " \"id\": 1,\n" |
| 424 " \"features\": [\n" | 424 " \"features\": [\n" |
| 425 " \"webgl\"\n" | 425 " \"webgl\",\n" |
| 426 " \"swiftshader\"\n" |
| 426 " ]\n" | 427 " ]\n" |
| 427 " }\n" | 428 " }\n" |
| 428 " ]\n" | 429 " ]\n" |
| 429 "}"; | 430 "}"; |
| 430 gpu::GPUInfo gpu_info; | 431 gpu::GPUInfo gpu_info; |
| 431 content::GpuDataManager::GetInstance()->InitializeForTesting( | 432 content::GpuDataManager::GetInstance()->InitializeForTesting( |
| 432 json_blacklist, gpu_info); | 433 json_blacklist, gpu_info); |
| 433 EXPECT_TRUE(content::GpuDataManager::GetInstance()->IsFeatureBlacklisted( | 434 EXPECT_TRUE(content::GpuDataManager::GetInstance()->IsFeatureBlacklisted( |
| 434 gpu::GPU_FEATURE_TYPE_WEBGL)); | 435 gpu::GPU_FEATURE_TYPE_WEBGL)); |
| 435 | 436 |
| 436 bool webgl_allowed = false; | 437 bool webgl_allowed = false; |
| 437 RunTest(webgl_allowed); | 438 RunTest(webgl_allowed); |
| 438 } | 439 } |
| 439 | 440 |
| 440 } // namespace extensions | 441 } // namespace extensions |
| OLD | NEW |