Update web-platform-tests to revision b9d4748d6a7f9b21bd420486955b44349aa005ea

This commit is contained in:
WPT Sync Bot 2019-05-30 10:23:26 +00:00
parent 0a9a222356
commit 28ed236c3a
76 changed files with 2158 additions and 581 deletions

View file

@ -7,16 +7,21 @@
<video hidden></video>
<script>
// Negative test for the specified behavior prior to HTML r8447.
async_test(function(t) {
promise_test(async function(t) {
var v = document.querySelector('video');
v.play();
t.step_timeout(function() {
assert_equals(v.networkState, v.NETWORK_EMPTY,
'networkState after stable state');
assert_false(v.paused, 'paused after stable state');
v.parentNode.removeChild(v);
assert_false(v.paused, 'paused after removing');
v.onpause = t.step_func_done();
}, 0);
var watcher = new EventWatcher(t, v, [ 'pause' ]);
var p = v.play();
await new Promise(resolve => t.step_timeout(resolve, 0));
assert_equals(v.networkState, v.NETWORK_EMPTY,
'networkState after stable state');
assert_false(v.paused, 'paused after stable state');
v.parentNode.removeChild(v);
assert_false(v.paused, 'paused after removing');
await watcher.wait_for('pause');
await promise_rejects(t, 'AbortError', p, 'We expect promise being rejected');
assert_true(v.paused, 'paused after removing and stable state');
});
</script>

View file

@ -17,13 +17,13 @@
// Testing TextTrackCueList [] operator.
assert_equals(cues[0].id, "1");
assert_equals(cues[3].id, "4");
assert_object_equals(cues[4], undefined);
assert_equals(cues[4], undefined);
// Testing TextTrackCueList getCueById().
assert_equals(cues.getCueById("1").startTime, 0);
assert_equals(cues.getCueById("4").startTime, 121);
assert_object_equals(cues.getCueById("junk"), undefined);
assert_equals(cues.getCueById("junk"), null);
});
});
</script>
</video>
</video>

View file

@ -0,0 +1,20 @@
<!doctype html>
<title>Avoid srcset image reloads when viewport resizes</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
setup({explicit_done:true});
const image_was_loaded = () => {
const iframe = document.getElementById("iframe");
// Resize the iframe
iframe.width="400";
// Wait 500 ms
step_timeout(() => {
// Check that the iframe only loaded a single resource
const entries = iframe.contentWindow.performance.getEntriesByType("resource");
assert_equals(entries.length, 1);
done();
}, 500);
}
</script>
<iframe id=iframe width="401" src="resources/resized.html" onload="image_was_loaded()"></iframe>

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 B

View file

@ -0,0 +1,2 @@
<!DOCTYPE html>
<img srcset="image.png?400 400w, image.png?800 800w, image.png?1600 1600w" sizes="50vw">