| 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 // 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; |
| 11 const COLOR_BACKGROUND_GREEN_THRESHOLD = 1; |
| 11 | 12 |
| 12 // Number of test events to occur before the test pass. When the test pass, | 13 // Number of test events to occur before the test pass. When the test pass, |
| 13 // the function gAllEventsOccured is called. | 14 // the function gAllEventsOccured is called. |
| 14 var gNumberOfExpectedEvents = 0; | 15 var gNumberOfExpectedEvents = 0; |
| 15 | 16 |
| 16 // Number of events that currently have occurred. | 17 // Number of events that currently have occurred. |
| 17 var gNumberOfEvents = 0; | 18 var gNumberOfEvents = 0; |
| 18 | 19 |
| 19 var gAllEventsOccured = function () {}; | 20 var gAllEventsOccured = function () {}; |
| 20 | 21 |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 devices.forEach(function(device) { | 240 devices.forEach(function(device) { |
| 240 if (device.kind == 'video') | 241 if (device.kind == 'video') |
| 241 hasVideoInputDevice = true; | 242 hasVideoInputDevice = true; |
| 242 }); | 243 }); |
| 243 | 244 |
| 244 if (hasVideoInputDevice) | 245 if (hasVideoInputDevice) |
| 245 sendValueToTest('has-video-input-device'); | 246 sendValueToTest('has-video-input-device'); |
| 246 else | 247 else |
| 247 sendValueToTest('no-video-input-devices'); | 248 sendValueToTest('no-video-input-devices'); |
| 248 }); | 249 }); |
| 249 } | 250 } |
| OLD | NEW |