| Index: chrome/browser/extensions/requirements_checker_browsertest.cc
|
| diff --git a/chrome/browser/extensions/requirements_checker_browsertest.cc b/chrome/browser/extensions/requirements_checker_browsertest.cc
|
| index e7665ba37bc56e7b6da530e7d3814e89465309d2..d8d40e4a4392b79ab4d7c044077132e535b053be 100644
|
| --- a/chrome/browser/extensions/requirements_checker_browsertest.cc
|
| +++ b/chrome/browser/extensions/requirements_checker_browsertest.cc
|
| @@ -20,7 +20,6 @@
|
| #include "content/public/test/test_utils.h"
|
| #include "extensions/common/extension.h"
|
| #include "extensions/common/file_util.h"
|
| -#include "gpu/config/gpu_info.h"
|
| #include "ui/base/l10n/l10n_util.h"
|
|
|
| namespace extensions {
|
| @@ -49,32 +48,6 @@ class RequirementsCheckerBrowserTest : public ExtensionBrowserTest {
|
| ASSERT_EQ(expected_errors, actual_errors);
|
| }
|
|
|
| - // This should only be called once per test instance. Calling more than once
|
| - // will result in stale information in the GPUDataManager which will throw off
|
| - // the RequirementsChecker.
|
| - void BlackListGPUFeatures(const std::vector<std::string>& features) {
|
| -#if !defined(NDEBUG)
|
| - static bool called = false;
|
| - DCHECK(!called);
|
| - called = true;
|
| -#endif
|
| -
|
| - static const std::string json_blacklist =
|
| - "{\n"
|
| - " \"name\": \"gpu blacklist\",\n"
|
| - " \"version\": \"1.0\",\n"
|
| - " \"entries\": [\n"
|
| - " {\n"
|
| - " \"id\": 1,\n"
|
| - " \"features\": [\"" + base::JoinString(features, "\", \"") + "\"]\n"
|
| - " }\n"
|
| - " ]\n"
|
| - "}";
|
| - gpu::GPUInfo gpu_info;
|
| - content::GpuDataManager::GetInstance()->InitializeForTesting(
|
| - json_blacklist, gpu_info);
|
| - }
|
| -
|
| protected:
|
| std::unique_ptr<RequirementsChecker> checker_;
|
| };
|
| @@ -129,10 +102,7 @@ IN_PROC_BROWSER_TEST_F(RequirementsCheckerBrowserTest, DisallowWebGL) {
|
| LoadExtensionFromDirName("require_3d"));
|
| ASSERT_TRUE(extension.get());
|
|
|
| - // Backlist webgl
|
| - std::vector<std::string> blacklisted_features;
|
| - blacklisted_features.push_back("accelerated_webgl");
|
| - BlackListGPUFeatures(blacklisted_features);
|
| + content::GpuDataManager::GetInstance()->BlacklistWebGLForTesting();
|
| content::RunAllBlockingPoolTasksUntilIdle();
|
|
|
| std::vector<std::string> expected_errors;
|
|
|