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

Unified Diff: chrome/browser/extensions/requirements_checker_browsertest.cc

Issue 2756793003: Move GPU blacklist and driver bug workaround list from json to data struct. (Closed)
Patch Set: pure rebase Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/extension_service_unittest.cc ('k') | content/browser/gpu/compositor_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « chrome/browser/extensions/extension_service_unittest.cc ('k') | content/browser/gpu/compositor_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698