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

Side by Side Diff: content/test/data/media/webrtc_test_utilities.js

Issue 2334223012: Fix failures on content_browser tests on Windows 7. (Closed)
Patch Set: don't use the webrtc sendToTest method, and compare to 'video-input' (and not 'video') Created 4 years, 3 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
« no previous file with comments | « content/public/test/browser_test_utils.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // These must match with how the video and canvas tags are declared in html. 5 // These must match with how the video and canvas tags are declared in html.
6 const VIDEO_TAG_WIDTH = 320; 6 const VIDEO_TAG_WIDTH = 320;
7 const VIDEO_TAG_HEIGHT = 240; 7 const VIDEO_TAG_HEIGHT = 240;
8 8
9 // Fake video capture background green is of value 135. 9 // Fake video capture background green is of value 135.
10 const COLOR_BACKGROUND_GREEN = 135; 10 const COLOR_BACKGROUND_GREEN = 135;
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 failTest("expected '" + expected + "', got '" + actual + "'."); 256 failTest("expected '" + expected + "', got '" + actual + "'.");
257 } 257 }
258 } 258 }
259 259
260 function assertTrue(booleanExpression, description) { 260 function assertTrue(booleanExpression, description) {
261 if (!booleanExpression) { 261 if (!booleanExpression) {
262 failTest(description); 262 failTest(description);
263 } 263 }
264 } 264 }
265 265
266 // Returns has-video-input-device to the test if there's a webcam available on
267 // the system.
268 function hasVideoInputDeviceOnSystem() {
269 MediaStreamTrack.getSources(function(devices) {
270 var hasVideoInputDevice = false;
271 devices.forEach(function(device) {
272 if (device.kind == 'video')
273 hasVideoInputDevice = true;
274 });
275
276 if (hasVideoInputDevice)
277 sendValueToTest('has-video-input-device');
278 else
279 sendValueToTest('no-video-input-devices');
280 });
281 }
OLDNEW
« no previous file with comments | « content/public/test/browser_test_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698