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/file_util.h" | 7 #include "base/file_util.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/stringprintf.h" | 9 #include "base/stringprintf.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 | 460 |
461 // Tests getWebGLStatus function when WebGL is blacklisted. | 461 // Tests getWebGLStatus function when WebGL is blacklisted. |
462 IN_PROC_BROWSER_TEST_F(ExtensionWebstoreGetWebGLStatusTest, Blocked) { | 462 IN_PROC_BROWSER_TEST_F(ExtensionWebstoreGetWebGLStatusTest, Blocked) { |
463 static const std::string json_blacklist = | 463 static const std::string json_blacklist = |
464 "{\n" | 464 "{\n" |
465 " \"name\": \"gpu blacklist\",\n" | 465 " \"name\": \"gpu blacklist\",\n" |
466 " \"version\": \"1.0\",\n" | 466 " \"version\": \"1.0\",\n" |
467 " \"entries\": [\n" | 467 " \"entries\": [\n" |
468 " {\n" | 468 " {\n" |
469 " \"id\": 1,\n" | 469 " \"id\": 1,\n" |
470 " \"blacklist\": [\n" | 470 " \"features\": [\n" |
471 " \"webgl\"\n" | 471 " \"webgl\"\n" |
472 " ]\n" | 472 " ]\n" |
473 " }\n" | 473 " }\n" |
474 " ]\n" | 474 " ]\n" |
475 "}"; | 475 "}"; |
476 content::GPUInfo gpu_info; | 476 content::GPUInfo gpu_info; |
477 content::GpuDataManager::GetInstance()->InitializeForTesting( | 477 content::GpuDataManager::GetInstance()->InitializeForTesting( |
478 json_blacklist, gpu_info); | 478 json_blacklist, gpu_info); |
479 GpuFeatureType type = | 479 GpuFeatureType type = |
480 content::GpuDataManager::GetInstance()->GetBlacklistedFeatures(); | 480 content::GpuDataManager::GetInstance()->GetBlacklistedFeatures(); |
481 EXPECT_EQ((type & content::GPU_FEATURE_TYPE_WEBGL), | 481 EXPECT_EQ((type & content::GPU_FEATURE_TYPE_WEBGL), |
482 content::GPU_FEATURE_TYPE_WEBGL); | 482 content::GPU_FEATURE_TYPE_WEBGL); |
483 | 483 |
484 bool webgl_allowed = false; | 484 bool webgl_allowed = false; |
485 RunTest(webgl_allowed); | 485 RunTest(webgl_allowed); |
486 } | 486 } |
487 | 487 |
488 } // namespace extensions | 488 } // namespace extensions |
OLD | NEW |