[wpt-sync] Sync PR 17636 - Reland: [shapedetection] Add some shapedetection tests
Categories
(Testing :: web-platform-tests, task, P4)
Tracking
(firefox70 fixed)
| Tracking | Status | |
|---|---|---|
| firefox70 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 17636 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/17636
Details from upstream follow.
Wanming Lin <wanming.lin@intel.com> wrote:
Reland: [shapedetection] Add some shapedetection tests
The original CL has been reverted because the test
external/wpt/shape-detection/detection-HTMLVideoElement-invalid-state.html
is flaky.In the previous CL, the way to create a HTMLVideoElement with 'HAVE_METADATA'
state is wrong, because simply loading a video file its readyState should
be >= HAVE_METADATA during loadedmetadata event. Which is the reason of the flaky.This reland CL leverages MediaSource API to precisely trigger a transition
to HAVE_METADATA state by invokingappendBuffer()with an initialization segment.See relevant spec: https://w3c.github.io/media-source/#sourcebuffer-init-segment-received
Original change's description:
[shapedetection] Add some shapedetection tests
Cover following two checkpoints:
- If the ImageBitmapSource is an HTMLVideoElement object whose readyState attribute
is either HAVE_NOTHING or HAVE_METADATA then reject the Promise with a new
DOMException whose name is InvalidStateError.- If the ImageBitmapSource argument is an HTMLCanvasElement whose bitmap’s origin-clean
flag is false, then reject the Promise with a new DOMException whose name is SecurityError.spec: https://wicg.github.io/shape-detection-api/#image-sources-for-detection
Change-Id: I0522d0340d3cb0291df6be65dfc1ab99037b30f7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1666766
Reviewed-by: Reilly Grant \<reillyg@chromium.org>
Commit-Queue: Wanming Lin \<wanming.lin@intel.com>
Cr-Commit-Position: refs/heads/master@{#671578}Bug: 979170
Change-Id: I963c3b6bce86791f5bedde7849c2e439b28c5481
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1688460
Reviewed-by: Reilly Grant \<reillyg@chromium.org>
Commit-Queue: Wanming Lin \<wanming.lin@intel.com>
Cr-Commit-Position: refs/heads/master@{#675956}
Updated•6 years ago
|
Comment 2•6 years ago
|
||
| bugherder | ||
Description
•