|
|
DescriptionCapture from DOM elements: WPT idl tests
I just found the power-of-idlharness-tests; this CL
uses them for mediacapture-fromelement (now that WebKit
has landed capture from canvas, it's even more widespread).
(Inspired by https://crrev.com/2752383002/ WebUSB idlharness tests)
BUG=702862
Review-Url: https://codereview.chromium.org/2755293002
Cr-Commit-Position: refs/heads/master@{#458172}
Committed: https://chromium.googlesource.com/chromium/src/+/25d0f43b0bfbf2aaac0b333c739a4827a2d22240
Patch Set 1 #
Total comments: 4
Patch Set 2 : reillyg@ comments: corrected object creation #
Total comments: 2
Messages
Total messages: 25 (12 generated)
The CQ bit was checked by mcasas@chromium.org to run a CQ dry run
mcasas@chromium.org changed reviewers: + emircan@chromium.org
emircan@ PTAL/RS plz
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
ping emircan@
mcasas@chromium.org changed reviewers: + reillyg@chromium.org
reillyg@ RS plz
lgtm
The CQ bit was checked by mcasas@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2755293002/diff/1/third_party/WebKit/LayoutTe... File third_party/WebKit/LayoutTests/external/wpt/mediacapture-fromelement/idlharness.html (right): https://codereview.chromium.org/2755293002/diff/1/third_party/WebKit/LayoutTe... third_party/WebKit/LayoutTests/external/wpt/mediacapture-fromelement/idlharness.html:47: Media: [video.captureStream()], These should be "HTMLCanvasElement" and "HTMLMediaElement". That is why you have such as short list of tests in the output.
https://codereview.chromium.org/2755293002/diff/1/third_party/WebKit/LayoutTe... File third_party/WebKit/LayoutTests/external/wpt/mediacapture-fromelement/idlharness.html (right): https://codereview.chromium.org/2755293002/diff/1/third_party/WebKit/LayoutTe... third_party/WebKit/LayoutTests/external/wpt/mediacapture-fromelement/idlharness.html:47: Media: [video.captureStream()], On 2017/03/20 16:56:40, Reilly Grant wrote: > These should be "HTMLCanvasElement" and "HTMLMediaElement". That is why you have > such as short list of tests in the output. This idl harness tests 3 partial interfaces which are tiny, really: 2 are just a captureStream() method, with an optional argument for the canvas one. HTML{Canvas/Media}Element are untested interfaces here (l.17-18). The short list of tests is expected. Or am I missing something else?
https://codereview.chromium.org/2755293002/diff/1/third_party/WebKit/LayoutTe... File third_party/WebKit/LayoutTests/external/wpt/mediacapture-fromelement/idlharness.html (right): https://codereview.chromium.org/2755293002/diff/1/third_party/WebKit/LayoutTe... third_party/WebKit/LayoutTests/external/wpt/mediacapture-fromelement/idlharness.html:47: Media: [video.captureStream()], On 2017/03/20 17:00:24, mcasas wrote: > On 2017/03/20 16:56:40, Reilly Grant wrote: > > These should be "HTMLCanvasElement" and "HTMLMediaElement". That is why you > have > > such as short list of tests in the output. > > This idl harness tests 3 partial interfaces which > are tiny, really: 2 are just a captureStream() method, > with an optional argument for the canvas one. > HTML{Canvas/Media}Element are untested interfaces > here (l.17-18). The short list of tests is > expected. Or am I missing something else? I didn't read this closely enough but there is still an issue here. In the add_objects call you are saying that "canvas.captureStream()" and "video.captureStream()" return a "Canvas" and a "Media". No such types exist. If you want to test an interface then you need to have a line mapping the name of that interface to an instance of that interface. So, you need to have: "CanvasCaptureMediaStreamTrack: ['...']". Based on what you have here you need to go the extra step of getting the MediaStreamTrack out of these MediaStreams.
The CQ bit was unchecked by mcasas@chromium.org
reillyg@ PTAL https://codereview.chromium.org/2755293002/diff/1/third_party/WebKit/LayoutTe... File third_party/WebKit/LayoutTests/external/wpt/mediacapture-fromelement/idlharness.html (right): https://codereview.chromium.org/2755293002/diff/1/third_party/WebKit/LayoutTe... third_party/WebKit/LayoutTests/external/wpt/mediacapture-fromelement/idlharness.html:47: Media: [video.captureStream()], On 2017/03/20 17:05:39, Reilly Grant wrote: > On 2017/03/20 17:00:24, mcasas wrote: > > On 2017/03/20 16:56:40, Reilly Grant wrote: > > > These should be "HTMLCanvasElement" and "HTMLMediaElement". That is why you > > have > > > such as short list of tests in the output. > > > > This idl harness tests 3 partial interfaces which > > are tiny, really: 2 are just a captureStream() method, > > with an optional argument for the canvas one. > > HTML{Canvas/Media}Element are untested interfaces > > here (l.17-18). The short list of tests is > > expected. Or am I missing something else? > > I didn't read this closely enough but there is still an issue here. In the > add_objects call you are saying that "canvas.captureStream()" and > "video.captureStream()" return a "Canvas" and a "Media". No such types exist. If > you want to test an interface then you need to have a line mapping the name of > that interface to an instance of that interface. So, you need to have: > "CanvasCaptureMediaStreamTrack: ['...']". Based on what you have here you need > to go the extra step of getting the MediaStreamTrack out of these MediaStreams. OIC, so here I have to create objects of the partial interfaces. Cool, done and updated a few other spots.
lgtm https://codereview.chromium.org/2755293002/diff/20001/third_party/WebKit/Layo... File third_party/WebKit/LayoutTests/external/wpt/mediacapture-fromelement/idlharness.html (right): https://codereview.chromium.org/2755293002/diff/20001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/external/wpt/mediacapture-fromelement/idlharness.html:49: CanvasCaptureMediaStreamTrack: [canvas.captureStream().getTracks()[0]], If you want to test the capture streams generated by both an HTMLMediaElement and HTMLCanvasElement I believe you can pass two objects here.
https://codereview.chromium.org/2755293002/diff/20001/third_party/WebKit/Layo... File third_party/WebKit/LayoutTests/external/wpt/mediacapture-fromelement/idlharness.html (right): https://codereview.chromium.org/2755293002/diff/20001/third_party/WebKit/Layo... third_party/WebKit/LayoutTests/external/wpt/mediacapture-fromelement/idlharness.html:49: CanvasCaptureMediaStreamTrack: [canvas.captureStream().getTracks()[0]], On 2017/03/20 18:03:31, Reilly Grant wrote: > If you want to test the capture streams generated by both an HTMLMediaElement > and HTMLCanvasElement I believe you can pass two objects here. I could but since we're ignoring (l.19) the testing of MediaStream proper, the harness would just test that the object generated by captureStream() is indeed a MediaStream, which it'd be doing anyway IIUC. And MediaStreams should be tested in the mediacapture-stream/ folder.
The CQ bit was checked by mcasas@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from emircan@chromium.org Link to the patchset: https://codereview.chromium.org/2755293002/#ps20001 (title: "reillyg@ comments: corrected object creation")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 20001, "attempt_start_ts": 1490033983615160, "parent_rev": "c8328175c9546a643030ac0eb4ce484268d6c668", "commit_rev": "25d0f43b0bfbf2aaac0b333c739a4827a2d22240"}
Message was sent while issue was closed.
Description was changed from ========== Capture from DOM elements: WPT idl tests I just found the power-of-idlharness-tests; this CL uses them for mediacapture-fromelement (now that WebKit has landed capture from canvas, it's even more widespread). (Inspired by https://crrev.com/2752383002/ WebUSB idlharness tests) BUG=702862 ========== to ========== Capture from DOM elements: WPT idl tests I just found the power-of-idlharness-tests; this CL uses them for mediacapture-fromelement (now that WebKit has landed capture from canvas, it's even more widespread). (Inspired by https://crrev.com/2752383002/ WebUSB idlharness tests) BUG=702862 Review-Url: https://codereview.chromium.org/2755293002 Cr-Commit-Position: refs/heads/master@{#458172} Committed: https://chromium.googlesource.com/chromium/src/+/25d0f43b0bfbf2aaac0b333c739a... ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/chromium/src/+/25d0f43b0bfbf2aaac0b333c739a... |