зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1582509 - part2 : modify and enable wpt 'positionstate.html'. r=baku
According to [1], the playback rate can be either positive or negative, the only unsupported value is zero. [1] https://w3c.github.io/mediasession/#dom-mediapositionstate-playbackrate Differential Revision: https://phabricator.services.mozilla.com/D66501 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
371b11291d
Коммит
ac127daa2c
|
@ -1,10 +0,0 @@
|
|||
prefs: [dom.media.mediasession.enabled:true]
|
||||
[idlharness.window.html]
|
||||
[MediaSession interface: navigator.mediaSession must inherit property "setPositionState(optional MediaPositionState)" with the proper type]
|
||||
expected: FAIL
|
||||
|
||||
[MediaSession interface: operation setPositionState(optional MediaPositionState)]
|
||||
expected: FAIL
|
||||
|
||||
[MediaSession interface: calling setPositionState(optional MediaPositionState) on navigator.mediaSession with too few arguments must throw TypeError]
|
||||
expected: FAIL
|
|
@ -1,19 +1,2 @@
|
|||
prefs: [dom.media.mediasession.enabled:true]
|
||||
[positionstate.html]
|
||||
[Test setPositionState with a null value]
|
||||
expected: FAIL
|
||||
|
||||
[Test setPositionState with a valid value for forward playback]
|
||||
expected: FAIL
|
||||
|
||||
[Test setPositionState with optional position]
|
||||
expected: FAIL
|
||||
|
||||
[Test setPositionState with optional playback rate]
|
||||
expected: FAIL
|
||||
|
||||
[Test setPositionState with zero duration]
|
||||
expected: FAIL
|
||||
|
||||
[Test setPositionState with only duration]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -42,16 +42,12 @@ test(() => {
|
|||
}, 'Test setPositionState with zero duration');
|
||||
|
||||
test(() => {
|
||||
assert_throws_js(
|
||||
TypeError,
|
||||
_ => {
|
||||
window.navigator.mediaSession.setPositionState({
|
||||
duration: 60.9,
|
||||
position: 10.1,
|
||||
playbackRate: -2.0
|
||||
});
|
||||
});
|
||||
}, 'Test setPositionState throws a TypeError if playback rate is negative');
|
||||
window.navigator.mediaSession.setPositionState({
|
||||
duration: 60.9,
|
||||
position: 10.1,
|
||||
playbackRate: -2.0
|
||||
});
|
||||
}, 'Test setPositionState with negative playback rate');
|
||||
|
||||
test(() => {
|
||||
assert_throws_js(
|
||||
|
|
Загрузка…
Ссылка в новой задаче