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

Side by Side Diff: chrome/browser/extensions/requirements_checker_browsertest.cc

Issue 2737983002: WebGL feature will only enabled when accelerated (Closed)
Patch Set: Formatting fix 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 unified diff | Download patch
OLDNEW
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/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 content::RunAllBlockingPoolTasksUntilIdle(); 124 content::RunAllBlockingPoolTasksUntilIdle();
125 } 125 }
126 126
127 IN_PROC_BROWSER_TEST_F(RequirementsCheckerBrowserTest, DisallowWebGL) { 127 IN_PROC_BROWSER_TEST_F(RequirementsCheckerBrowserTest, DisallowWebGL) {
128 scoped_refptr<const Extension> extension( 128 scoped_refptr<const Extension> extension(
129 LoadExtensionFromDirName("require_3d")); 129 LoadExtensionFromDirName("require_3d"));
130 ASSERT_TRUE(extension.get()); 130 ASSERT_TRUE(extension.get());
131 131
132 // Backlist webgl 132 // Backlist webgl
133 std::vector<std::string> blacklisted_features; 133 std::vector<std::string> blacklisted_features;
134 blacklisted_features.push_back("webgl"); 134 blacklisted_features.push_back("accelerated_webgl");
135 BlackListGPUFeatures(blacklisted_features); 135 BlackListGPUFeatures(blacklisted_features);
136 content::RunAllBlockingPoolTasksUntilIdle(); 136 content::RunAllBlockingPoolTasksUntilIdle();
137 137
138 std::vector<std::string> expected_errors; 138 std::vector<std::string> expected_errors;
139 expected_errors.push_back(l10n_util::GetStringUTF8( 139 expected_errors.push_back(l10n_util::GetStringUTF8(
140 IDS_EXTENSION_WEBGL_NOT_SUPPORTED)); 140 IDS_EXTENSION_WEBGL_NOT_SUPPORTED));
141 141
142 checker_->Check(extension, base::Bind( 142 checker_->Check(extension, base::Bind(
143 &RequirementsCheckerBrowserTest::ValidateRequirementErrors, 143 &RequirementsCheckerBrowserTest::ValidateRequirementErrors,
144 base::Unretained(this), expected_errors)); 144 base::Unretained(this), expected_errors));
(...skipping 12 matching lines...) Expand all
157 IDS_EXTENSION_WEBGL_NOT_SUPPORTED)); 157 IDS_EXTENSION_WEBGL_NOT_SUPPORTED));
158 } 158 }
159 159
160 checker_->Check(extension, base::Bind( 160 checker_->Check(extension, base::Bind(
161 &RequirementsCheckerBrowserTest::ValidateRequirementErrors, 161 &RequirementsCheckerBrowserTest::ValidateRequirementErrors,
162 base::Unretained(this), expected_errors)); 162 base::Unretained(this), expected_errors));
163 content::RunAllBlockingPoolTasksUntilIdle(); 163 content::RunAllBlockingPoolTasksUntilIdle();
164 } 164 }
165 165
166 } // namespace extensions 166 } // namespace extensions
OLDNEW
« 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