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

Side by Side Diff: content/browser/gpu/gpu_data_manager_impl_private_unittest.cc

Issue 452293002: Use RE string pattern matching for blacklist strings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | gpu/BUILD.gn » ('j') | gpu/config/gpu_control_list.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "content/browser/gpu/gpu_data_manager_impl_private.h" 9 #include "content/browser/gpu/gpu_data_manager_impl_private.h"
10 #include "content/public/browser/gpu_data_manager_observer.h" 10 #include "content/public/browser/gpu_data_manager_observer.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 "version": "0.1", 151 "version": "0.1",
152 "entries": [ 152 "entries": [
153 { 153 {
154 "id": 1, 154 "id": 1,
155 "features": [ 155 "features": [
156 "webgl" 156 "webgl"
157 ] 157 ]
158 }, 158 },
159 { 159 {
160 "id": 2, 160 "id": 2,
161 "gl_renderer": { 161 "gl_renderer": ".*GeForce.*",
162 "op": "contains",
163 "value": "GeForce"
164 },
165 "features": [ 162 "features": [
166 "accelerated_2d_canvas" 163 "accelerated_2d_canvas"
167 ] 164 ]
168 } 165 }
169 ] 166 ]
170 } 167 }
171 ); 168 );
172 169
173 gpu::GPUInfo gpu_info; 170 gpu::GPUInfo gpu_info;
174 gpu_info.gpu.vendor_id = 0x10de; 171 gpu_info.gpu.vendor_id = 0x10de;
(...skipping 23 matching lines...) Expand all
198 195
199 const std::string blacklist_json = LONG_STRING_CONST( 196 const std::string blacklist_json = LONG_STRING_CONST(
200 { 197 {
201 "name": "gpu blacklist", 198 "name": "gpu blacklist",
202 "version": "0.1", 199 "version": "0.1",
203 "entries": [ 200 "entries": [
204 { 201 {
205 "id": 1, 202 "id": 1,
206 "exceptions": [ 203 "exceptions": [
207 { 204 {
208 "gl_renderer": { 205 "gl_renderer": ".*GeForce.*"
209 "op": "contains",
210 "value": "GeForce"
211 }
212 } 206 }
213 ], 207 ],
214 "features": [ 208 "features": [
215 "webgl" 209 "webgl"
216 ] 210 ]
217 } 211 }
218 ] 212 ]
219 } 213 }
220 ); 214 );
221 gpu::GPUInfo gpu_info; 215 gpu::GPUInfo gpu_info;
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 EXPECT_TRUE(manager->UpdateActiveGpu(0x8086, 0x04a1)); 729 EXPECT_TRUE(manager->UpdateActiveGpu(0x8086, 0x04a1));
736 { 730 {
737 base::RunLoop run_loop; 731 base::RunLoop run_loop;
738 run_loop.RunUntilIdle(); 732 run_loop.RunUntilIdle();
739 } 733 }
740 EXPECT_TRUE(observer.gpu_info_updated()); 734 EXPECT_TRUE(observer.gpu_info_updated());
741 EXPECT_EQ(1u, manager->GetBlacklistedFeatureCount()); 735 EXPECT_EQ(1u, manager->GetBlacklistedFeatureCount());
742 } 736 }
743 737
744 } // namespace content 738 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | gpu/BUILD.gn » ('j') | gpu/config/gpu_control_list.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698