Update web-platform-tests to revision ba4ca501a5ebdee8cbfc006bf9e7e44231b188d1

This commit is contained in:
WPT Sync Bot 2018-10-06 21:31:01 -04:00
parent 76ddbe4d7a
commit db9cbb4b2e
10 changed files with 45 additions and 29 deletions

View file

@ -18,16 +18,26 @@ promise_test(() => {
// activation concerns the interaction between iframe elements and their parent
// browsing contexts [1]. Because testdriver.js currently cannot operate within
// an iframe, the standard requirement cannot be used to verify the correctness
// of the `bless` method. Instead, rely on the non-standard restriction on
// unattended media playback. Browsers which do not implement such a
// restriction will pass this test spuriously.
// of the `bless` method. Instead, rely on the optional behavior of early exit
// and rejecting in `video.play()` if the media is not "allowed to play". [2]
// Browsers which don't implement this will pass this test spuriously.
//
// [1] https://html.spec.whatwg.org/multipage/origin.html#attr-iframe-sandbox-allow-top-navigation-by-user-activation
promise_test(() => {
// [2] https://html.spec.whatwg.org/multipage/media.html#allowed-to-play
promise_test(t => {
const video = document.createElement('video');
video.setAttribute('src', '/media/counting.ogv');
document.body.appendChild(video);
return test_driver.bless('start video playback', () => video.play())
t.add_cleanup(() => video.remove());
return test_driver.bless('start video playback', () => {
// `paused` changes before `play()` returns when "allowed to play", so the
// promise, if any, is ignored.
assert_true(video.paused);
const playPromise = video.play();
assert_false(video.paused);
if (playPromise) {
playPromise.catch(() => {});
}
});
}, 'user activation');
promise_test(() => {

View file

@ -64,7 +64,7 @@
assert_equals(event.key, null, 'event.key');
assert_equals(event.oldValue, null, 'event.oldValue');
assert_equals(event.newValue, null, 'event.newValue');
assert_equals(event.url, 'undefined', 'event.url');
assert_equals(event.url, '', 'event.url');
assert_equals(event.storageArea, null, 'event.storageArea');
}, 'initStorageEvent with 8 undefined arguments');
</script>