New issue
Advanced search Search tips

Issue 678561 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Feature



Sign in to add a comment

Need fake devices for blink-level testing of getUserMedia

Project Member Reported by hta@chromium.org, Jan 5 2017

Issue description

When writing tests for device acquisition (getUserMedia), it would help a lot if we could inject fake devices with certain known properties, so that the algorithms can be exercised without depending on the hardware configuration of the test machine.

Ideally, this would be a part of the Web platform and accessible to Web Platform Tests; in practice, adding something to "internals" is probably a faster path forward.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d005cbf1f2a2d8aecd221922901e7e86fc5bea5c

commit d005cbf1f2a2d8aecd221922901e7e86fc5bea5c
Author: hta <hta@chromium.org>
Date: Wed Jan 18 16:04:56 2017

Adds an API for inserting fake devices to internals

This function is meant to be used like this in tests:

internals.addFakeDevice({kind=video}, {facingMode="user"})
.then( => getUserMedia({video: {facingMode: {exact: "user"}}})
.then(s => s.getSettings())
.then(settings => assert_equals(settings.facingMode, "user"))

STATUS: This CL version adds the API surface only.

BUG=678561

Review-Url: https://codereview.chromium.org/2612223002
Cr-Commit-Position: refs/heads/master@{#444376}

[modify] https://crrev.com/d005cbf1f2a2d8aecd221922901e7e86fc5bea5c/third_party/WebKit/Source/modules/BUILD.gn
[add] https://crrev.com/d005cbf1f2a2d8aecd221922901e7e86fc5bea5c/third_party/WebKit/Source/modules/mediastream/testing/InternalsMediaStream.cpp
[add] https://crrev.com/d005cbf1f2a2d8aecd221922901e7e86fc5bea5c/third_party/WebKit/Source/modules/mediastream/testing/InternalsMediaStream.h
[add] https://crrev.com/d005cbf1f2a2d8aecd221922901e7e86fc5bea5c/third_party/WebKit/Source/modules/mediastream/testing/InternalsMediaStream.idl
[modify] https://crrev.com/d005cbf1f2a2d8aecd221922901e7e86fc5bea5c/third_party/WebKit/Source/modules/modules_idl_files.gni

Comment 2 by hta@chromium.org, Apr 5 2017

Owner: guidou@chromium.org

Comment 3 by guidou@chromium.org, Nov 29 2017

Status: Assigned (was: Started)

Sign in to add a comment