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

Side by Side Diff: content/shell/renderer/test_runner/mock_web_user_media_client.cc

Issue 654403002: Convert ARRAYSIZE_UNSAFE -> arraysize in content/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/shell/renderer/test_runner/mock_web_user_media_client.h" 5 #include "content/shell/renderer/test_runner/mock_web_user_media_client.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "content/shell/renderer/test_runner/mock_constraints.h" 9 #include "content/shell/renderer/test_runner/mock_constraints.h"
10 #include "content/shell/renderer/test_runner/web_test_delegate.h" 10 #include "content/shell/renderer/test_runner/web_test_delegate.h"
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 "group1", 217 "group1",
218 }, 218 },
219 { 219 {
220 "device3", 220 "device3",
221 WebMediaDeviceInfo::MediaDeviceKindVideoInput, 221 WebMediaDeviceInfo::MediaDeviceKindVideoInput,
222 "Build-in webcam", 222 "Build-in webcam",
223 "group2", 223 "group2",
224 }, 224 },
225 }; 225 };
226 226
227 WebVector<WebMediaDeviceInfo> devices(ARRAYSIZE_UNSAFE(test_devices)); 227 WebVector<WebMediaDeviceInfo> devices(arraysize(test_devices));
228 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_devices); ++i) { 228 for (size_t i = 0; i < arraysize(test_devices); ++i) {
229 devices[i].initialize(WebString::fromUTF8(test_devices[i].device_id), 229 devices[i].initialize(WebString::fromUTF8(test_devices[i].device_id),
230 test_devices[i].kind, 230 test_devices[i].kind,
231 WebString::fromUTF8(test_devices[i].label), 231 WebString::fromUTF8(test_devices[i].label),
232 WebString::fromUTF8(test_devices[i].group_id)); 232 WebString::fromUTF8(test_devices[i].group_id));
233 } 233 }
234 234
235 delegate_->PostTask(new MediaDevicesRequestTask(this, request, devices)); 235 delegate_->PostTask(new MediaDevicesRequestTask(this, request, devices));
236 } 236 }
237 237
238 void MockWebUserMediaClient::cancelMediaDevicesRequest( 238 void MockWebUserMediaClient::cancelMediaDevicesRequest(
(...skipping 15 matching lines...) Expand all
254 WebSourceInfo::VideoFacingModeNone, 254 WebSourceInfo::VideoFacingModeNone,
255 }, 255 },
256 { 256 {
257 "device2", 257 "device2",
258 WebSourceInfo::SourceKindVideo, 258 WebSourceInfo::SourceKindVideo,
259 "Build-in webcam", 259 "Build-in webcam",
260 WebSourceInfo::VideoFacingModeEnvironment, 260 WebSourceInfo::VideoFacingModeEnvironment,
261 }, 261 },
262 }; 262 };
263 263
264 WebVector<WebSourceInfo> sources(ARRAYSIZE_UNSAFE(test_sources)); 264 WebVector<WebSourceInfo> sources(arraysize(test_sources));
265 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_sources); ++i) { 265 for (size_t i = 0; i < arraysize(test_sources); ++i) {
266 sources[i].initialize(WebString::fromUTF8(test_sources[i].id), 266 sources[i].initialize(WebString::fromUTF8(test_sources[i].id),
267 test_sources[i].kind, 267 test_sources[i].kind,
268 WebString::fromUTF8(test_sources[i].label), 268 WebString::fromUTF8(test_sources[i].label),
269 test_sources[i].facing); 269 test_sources[i].facing);
270 } 270 }
271 271
272 delegate_->PostTask(new SourcesRequestTask(this, request, sources)); 272 delegate_->PostTask(new SourcesRequestTask(this, request, sources));
273 } 273 }
274 274
275 } // namespace content 275 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/renderer/test_runner/mock_grammar_check.cc ('k') | content/test/mock_keyboard_driver_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698