mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Update web-platform-tests to revision b9d4748d6a7f9b21bd420486955b44349aa005ea
This commit is contained in:
parent
0a9a222356
commit
28ed236c3a
76 changed files with 2158 additions and 581 deletions
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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 |
|
@ -0,0 +1,3 @@
|
|||
Cache-Control: no-store
|
||||
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<img srcset="image.png?400 400w, image.png?800 800w, image.png?1600 1600w" sizes="50vw">
|
Loading…
Add table
Add a link
Reference in a new issue