New issue
Advanced search Search tips

Issue 610333 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: May 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug
m53



Sign in to add a comment

Blink test runner: support mocking ImageCapture browser mojo interface

Project Member Reported by mcasas@chromium.org, May 9 2016

Issue description

BlinkTestRunner uses a MockVideoCapturerSource to
fill in the content/ side of the appropriate 
MediaStream Video Track and Source [1]. 

Consider extending that functionality, and mocking
the ImageCapture mojo interface (usually implemented
in renderer_host in [2]) in a similar fashion to
USB [3], for LayoutTests.



[1] https://code.google.com/p/chromium/codesearch#chromium/src/content/public/renderer/media_stream_utils.cc&sq=package:chromium&type=cs&l=27&rcl=1462792609
[2] https://code.google.com/p/chromium/codesearch#chromium/src/content/browser/media/capture/image_capture_impl.h&sq=package:chromium&type=cs&l=15&q=imagecaptureimpl
[3] https://code.google.com/p/chromium/codesearch#chromium/src/third_party/WebKit/LayoutTests/usb/resources/usb-helpers.js&sq=package:chromium&type=cs&l=35&q=usb%20mojo%20js
 
Components: Blink>ImageCapture
Project Member

Comment 2 by bugdroid1@chromium.org, May 12 2016

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

commit b1ac16005aa53c3ceecd666a892371834074d83b
Author: mcasas <mcasas@chromium.org>
Date: Thu May 12 17:36:08 2016

ImageCapture: takePhoto() mock LayoutTest

ImageCapture takePhoto() implementation needs a
meaningful MediaStream implementation in Browser
side, but LayoutTests doesn't have it. Following the
example of USB, 'battery-status' and 'payments'
Layout Tests, this CL:
- creates a LayoutTest entry for image capture
- defines a MockImageCapture js class, that simply
resolves successfully the takePhoto() Promise
- adds a JS test that instantiates said Mock and
exercises it.

The previous LayoutTest/fast/imagecapture/...takePhoto
is removed.

BUG= 610333 

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

[delete] https://crrev.com/b9592f971b67c5e0bc80c9298a46ad6c06fa478a/third_party/WebKit/LayoutTests/fast/imagecapture/ImageCapture-takePhoto.html
[add] https://crrev.com/b1ac16005aa53c3ceecd666a892371834074d83b/third_party/WebKit/LayoutTests/imagecapture/resources/mock-imagecapture.js
[add] https://crrev.com/b1ac16005aa53c3ceecd666a892371834074d83b/third_party/WebKit/LayoutTests/imagecapture/takephoto.html

Comment 3 by mcasas@chromium.org, May 12 2016

Owner: mcasas@chromium.org
Status: Fixed (was: Untriaged)

Comment 4 by sshru...@google.com, May 23 2016

Components: -Blink>ImageCapture Blink>MediaStream>ImageCapture
Renaming Blink>ImageCapture to Blink>MediaStream>ImageCapture. Moving these bugs to the new component.

Comment 5 by sshru...@google.com, Nov 23 2016

Components: -Blink>MediaStream>ImageCapture Blink>ImageCapture

Sign in to add a comment