HTMLMediaElement.seek: clean-up and update WPTs expectations

This commit is contained in:
Fernando Jiménez Moreno 2018-10-24 15:45:40 +02:00
parent d94cbc83fc
commit aa3c911efa
6 changed files with 130 additions and 32 deletions

View file

@ -35,7 +35,7 @@ use dom::virtualmethods::VirtualMethods;
use dom_struct::dom_struct;
use fetch::FetchCanceller;
use html5ever::{LocalName, Prefix};
use hyper::header::{ByteRangeSpec, ContentLength, Headers, Range as HyperRange, RangeUnit};
use hyper::header::{ByteRangeSpec, ContentLength, Headers, Range as HyperRange};
use ipc_channel::ipc;
use ipc_channel::router::ROUTER;
use microtask::{Microtask, MicrotaskRunnable};
@ -1040,9 +1040,7 @@ impl HTMLMediaElement {
// Step 8.
// XXX(ferjm) seekable attribute: we need to get the information about
// what's been decoded and buffered so far from servo-media
// and turn the seekable attribute into a TimeRange.
// For now we use a boolean flag that is true iff the server
// supports byte-range requests.
// and add the seekable attribute as a TimeRange.
// Step 9.
// servo-media with gstreamer does not support inaccurate seeking for now.
@ -1177,11 +1175,6 @@ impl HTMLMediaElement {
},
_ => {},
},
PlayerEvent::PositionChanged(_) |
PlayerEvent::SeekData(_) |
PlayerEvent::SeekDone(_) => {
// TODO: Support for HTMLMediaElement seeking and related API properties #21998
},
PlayerEvent::EndOfStream => {
// https://html.spec.whatwg.org/multipage/#media-data-processing-steps-list
// => "If the media data can be fetched but is found by inspection to be in

View file

@ -1,15 +0,0 @@
[currentTime.html]
type: testharness
expected: TIMEOUT
[currentTime initial value]
expected: FAIL
[setting currentTime with a media controller present]
expected: FAIL
[setting currentTime when readyState is HAVE_NOTHING]
expected: FAIL
[setting currentTime when readyState is greater than HAVE_NOTHING]
expected: TIMEOUT

View file

@ -1,6 +1,5 @@
[seek-to-currentTime.html]
type: testharness
expected: TIMEOUT
[seek to currentTime]
expected: TIMEOUT
expected: FAIL

View file

@ -1,6 +1,5 @@
[seek-to-max-value.htm]
type: testharness
expected: TIMEOUT
[seek to Number.MAX_VALUE]
expected: TIMEOUT
expected: FAIL

View file

@ -1,6 +1,5 @@
[seek-to-negative-time.htm]
type: testharness
expected: TIMEOUT
[seek to negative time]
expected: TIMEOUT
expected: FAIL

View file

@ -5,253 +5,376 @@
[onabort: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onabort: the default value must be null]
expected: FAIL
[onauxclick: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onauxclick: the default value must be null]
expected: FAIL
[onauxclick: the content attribute must be compiled into a function as the corresponding property]
expected: FAIL
[onblur: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onblur: the default value must be null]
expected: FAIL
[oncancel: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[oncancel: the default value must be null]
expected: FAIL
[oncanplay: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[oncanplay: the default value must be null]
expected: FAIL
[oncanplaythrough: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[oncanplaythrough: the default value must be null]
expected: FAIL
[onchange: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onchange: the default value must be null]
expected: FAIL
[onclick: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onclick: the default value must be null]
expected: FAIL
[onclose: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onclose: the default value must be null]
expected: FAIL
[oncontextmenu: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[oncontextmenu: the default value must be null]
expected: FAIL
[oncuechange: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[oncuechange: the default value must be null]
expected: FAIL
[ondblclick: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[ondblclick: the default value must be null]
expected: FAIL
[ondrag: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[ondrag: the default value must be null]
expected: FAIL
[ondragend: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[ondragend: the default value must be null]
expected: FAIL
[ondragenter: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[ondragenter: the default value must be null]
expected: FAIL
[ondragexit: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[ondragexit: the default value must be null]
expected: FAIL
[ondragleave: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[ondragleave: the default value must be null]
expected: FAIL
[ondragover: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[ondragover: the default value must be null]
expected: FAIL
[ondragstart: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[ondragstart: the default value must be null]
expected: FAIL
[ondrop: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[ondrop: the default value must be null]
expected: FAIL
[ondurationchange: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[ondurationchange: the default value must be null]
expected: FAIL
[onemptied: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onemptied: the default value must be null]
expected: FAIL
[onended: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onended: the default value must be null]
expected: FAIL
[onfocus: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onfocus: the default value must be null]
expected: FAIL
[oninput: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[oninput: the default value must be null]
expected: FAIL
[oninvalid: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[oninvalid: the default value must be null]
expected: FAIL
[onkeydown: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onkeydown: the default value must be null]
expected: FAIL
[onkeypress: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onkeypress: the default value must be null]
expected: FAIL
[onkeyup: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onkeyup: the default value must be null]
expected: FAIL
[onload: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onload: the default value must be null]
expected: FAIL
[onloadeddata: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onloadeddata: the default value must be null]
expected: FAIL
[onloadedmetadata: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onloadedmetadata: the default value must be null]
expected: FAIL
[onloadedmetadata: the content attribute must be compiled into a function as the corresponding property]
expected: FAIL
[onloadend: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onloadend: the default value must be null]
expected: FAIL
[onloadend: the content attribute must be compiled into a function as the corresponding property]
expected: FAIL
[onloadstart: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onloadstart: the default value must be null]
expected: FAIL
[onmousedown: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onmousedown: the default value must be null]
expected: FAIL
[onmouseenter: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onmouseenter: the default value must be null]
expected: FAIL
[onmouseleave: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onmouseleave: the default value must be null]
expected: FAIL
[onmousemove: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onmousemove: the default value must be null]
expected: FAIL
[onmouseout: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onmouseout: the default value must be null]
expected: FAIL
[onmouseover: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onmouseover: the default value must be null]
expected: FAIL
[onmouseup: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onmouseup: the default value must be null]
expected: FAIL
[onwheel: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onwheel: the default value must be null]
expected: FAIL
[onpause: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onpause: the default value must be null]
expected: FAIL
[onplay: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onplay: the default value must be null]
expected: FAIL
[onplaying: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onplaying: the default value must be null]
expected: FAIL
[onprogress: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onprogress: the default value must be null]
expected: FAIL
[onratechange: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onratechange: the default value must be null]
expected: FAIL
[onreset: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onreset: the default value must be null]
expected: FAIL
[onresize: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onresize: the default value must be null]
expected: FAIL
[onscroll: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onscroll: the default value must be null]
expected: FAIL
[onsecuritypolicyviolation: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onsecuritypolicyviolation: the default value must be null]
expected: FAIL
[onsecuritypolicyviolation: the content attribute must be compiled into a function as the corresponding property]
expected: FAIL
[onseeked: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onseeked: the default value must be null]
expected: FAIL
[onseeking: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onseeking: the default value must be null]
expected: FAIL
[onselect: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onselect: the default value must be null]
expected: FAIL
[onstalled: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onstalled: the default value must be null]
expected: FAIL
[onsubmit: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onsubmit: the default value must be null]
expected: FAIL
[onsuspend: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onsuspend: the default value must be null]
expected: FAIL
[ontimeupdate: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[ontimeupdate: the default value must be null]
expected: FAIL
[ontoggle: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[ontoggle: the default value must be null]
expected: FAIL
[onvolumechange: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onvolumechange: the default value must be null]
expected: FAIL
[onwaiting: must be on the appropriate locations for GlobalEventHandlers]
expected: FAIL
[onwaiting: the default value must be null]
expected: FAIL