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/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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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("webgl"); |
| 135 blacklisted_features.push_back("swiftshader"); |
135 BlackListGPUFeatures(blacklisted_features); | 136 BlackListGPUFeatures(blacklisted_features); |
136 content::RunAllBlockingPoolTasksUntilIdle(); | 137 content::RunAllBlockingPoolTasksUntilIdle(); |
137 | 138 |
138 std::vector<std::string> expected_errors; | 139 std::vector<std::string> expected_errors; |
139 expected_errors.push_back(l10n_util::GetStringUTF8( | 140 expected_errors.push_back(l10n_util::GetStringUTF8( |
140 IDS_EXTENSION_WEBGL_NOT_SUPPORTED)); | 141 IDS_EXTENSION_WEBGL_NOT_SUPPORTED)); |
141 | 142 |
142 checker_->Check(extension, base::Bind( | 143 checker_->Check(extension, base::Bind( |
143 &RequirementsCheckerBrowserTest::ValidateRequirementErrors, | 144 &RequirementsCheckerBrowserTest::ValidateRequirementErrors, |
144 base::Unretained(this), expected_errors)); | 145 base::Unretained(this), expected_errors)); |
(...skipping 12 matching lines...) Expand all Loading... |
157 IDS_EXTENSION_WEBGL_NOT_SUPPORTED)); | 158 IDS_EXTENSION_WEBGL_NOT_SUPPORTED)); |
158 } | 159 } |
159 | 160 |
160 checker_->Check(extension, base::Bind( | 161 checker_->Check(extension, base::Bind( |
161 &RequirementsCheckerBrowserTest::ValidateRequirementErrors, | 162 &RequirementsCheckerBrowserTest::ValidateRequirementErrors, |
162 base::Unretained(this), expected_errors)); | 163 base::Unretained(this), expected_errors)); |
163 content::RunAllBlockingPoolTasksUntilIdle(); | 164 content::RunAllBlockingPoolTasksUntilIdle(); |
164 } | 165 } |
165 | 166 |
166 } // namespace extensions | 167 } // namespace extensions |
OLD | NEW |