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 dom_struct::dom_struct;
use fetch::FetchCanceller; use fetch::FetchCanceller;
use html5ever::{LocalName, Prefix}; 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::ipc;
use ipc_channel::router::ROUTER; use ipc_channel::router::ROUTER;
use microtask::{Microtask, MicrotaskRunnable}; use microtask::{Microtask, MicrotaskRunnable};
@ -1040,9 +1040,7 @@ impl HTMLMediaElement {
// Step 8. // Step 8.
// XXX(ferjm) seekable attribute: we need to get the information about // XXX(ferjm) seekable attribute: we need to get the information about
// what's been decoded and buffered so far from servo-media // what's been decoded and buffered so far from servo-media
// and turn the seekable attribute into a TimeRange. // and add the seekable attribute as a TimeRange.
// For now we use a boolean flag that is true iff the server
// supports byte-range requests.
// Step 9. // Step 9.
// servo-media with gstreamer does not support inaccurate seeking for now. // 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 => { PlayerEvent::EndOfStream => {
// https://html.spec.whatwg.org/multipage/#media-data-processing-steps-list // 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 // => "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] [seek-to-currentTime.html]
type: testharness type: testharness
expected: TIMEOUT
[seek to currentTime] [seek to currentTime]
expected: TIMEOUT expected: FAIL

View file

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

View file

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

View file

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