mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Update web-platform-tests to revision 7a767a52741f628430ffbbed46e7f3df68ba3534
Fixes #15648.
This commit is contained in:
parent
a1e4c547f0
commit
4fadf9b0b6
1184 changed files with 22551 additions and 9856 deletions
|
@ -0,0 +1,45 @@
|
|||
<!doctype html>
|
||||
<title>autoplay with slow text tracks</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/common/media.js"></script>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
// https://html.spec.whatwg.org/#ready-states says:
|
||||
//
|
||||
// HAVE_FUTURE_DATA: "the text tracks are ready".
|
||||
// HAVE_ENOUGH_DATA: All the conditions described for the HAVE_FUTURE_DATA state are met, ...
|
||||
//
|
||||
// When the ready state of a media element whose networkState is not NETWORK_EMPTY changes,
|
||||
// the user agent must follow the steps given below:
|
||||
// If the new ready state is HAVE_ENOUGH_DATA
|
||||
// (autoplay)
|
||||
//
|
||||
// So if the text tracks are not yet ready, we can't autoplay.
|
||||
|
||||
var started = 0;
|
||||
var numOfTests = 5;
|
||||
|
||||
function createTest() {
|
||||
var video = document.createElement('video');
|
||||
video.src = getVideoURI('/media/movie_5');
|
||||
video.autoplay = true;
|
||||
video.muted = true;
|
||||
video.controls = true;
|
||||
video.onplaying = function() {
|
||||
started++;
|
||||
assert_equals(track.track.cues.length, 1);
|
||||
if (started === numOfTests) {
|
||||
done();
|
||||
}
|
||||
};
|
||||
var track = document.createElement('track');
|
||||
track.src = '/media/foo.vtt?pipe=trickle(d2)';
|
||||
track.default = true;
|
||||
video.appendChild(track);
|
||||
document.body.appendChild(video);
|
||||
}
|
||||
for (var i = 0; i < numOfTests; ++i) {
|
||||
createTest();
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,3 @@
|
|||
<script>
|
||||
parent.loadedCount++;
|
||||
</script>
|
|
@ -0,0 +1,5 @@
|
|||
<script>
|
||||
parent.nestingTest.step(function() {
|
||||
parent.assert_unreached(window.frameElement.getAttribute("test-description"));
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>Clicking on an <area> element with a download attribute must not throw an exception</title>
|
||||
<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-area-element:activation-behaviour">
|
||||
<link rel="help" href="https://github.com/whatwg/html/issues/2116">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<img src="/images/threecolors.png" usemap="#x" id="img" width="300" height="300">
|
||||
<map name="x">
|
||||
<area id="blob-url" download="foo.html" coords="0,0,300,300">
|
||||
</map>
|
||||
|
||||
<script>
|
||||
"use strict";
|
||||
|
||||
const string = "test";
|
||||
const blob = new Blob([string], { type: "text/html" });
|
||||
|
||||
const link = document.querySelector("#blob-url");
|
||||
link.href = URL.createObjectURL(blob);
|
||||
|
||||
link.click();
|
||||
|
||||
done();
|
||||
</script>
|
|
@ -1,29 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
|
||||
<title>Canvas test: toBlob.jpeg</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/common/canvas-tests.js"></script>
|
||||
<link rel="stylesheet" href="/common/canvas-tests.css">
|
||||
<body class="show_output">
|
||||
|
||||
<h1>toBlob.jpeg</h1>
|
||||
<p class="desc">toBlob with image/jpeg returns a JPEG Blob</p>
|
||||
|
||||
|
||||
<p class="output">Actual output:</p>
|
||||
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
|
||||
|
||||
<ul id="d"></ul>
|
||||
<div id="log"></div>
|
||||
<canvas id="c"></canvas>
|
||||
<script>
|
||||
var t = async_test("toBlob with image/jpeg returns a JPEG Blob");
|
||||
_addTest(function(canvas, ctx) {
|
||||
|
||||
canvas.toBlob(function(data){
|
||||
_assertSame(data.type, "image/jpeg", "data.type", "\"image/jpeg\"");
|
||||
}, 'image/jpeg');
|
||||
|
||||
|
||||
});
|
||||
async_test(function() {
|
||||
on_event(window, "load", this.step_func(function() {
|
||||
var canvas = document.getElementById('c');
|
||||
var ctx = canvas.getContext('2d');
|
||||
canvas.toBlob(this.step_func_done(function(data) {
|
||||
assert_equals(data.type, "image/jpeg");
|
||||
}), 'image/jpeg');
|
||||
}));
|
||||
}, "toBlob with image/jpeg returns a JPEG Blob");
|
||||
</script>
|
||||
|
||||
|
|
|
@ -0,0 +1,33 @@
|
|||
<!doctype html>
|
||||
<meta charset=utf-8>
|
||||
<title>Canvas test: toBlob.null</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/common/canvas-tests.js"></script>
|
||||
<link rel="stylesheet" href="/common/canvas-tests.css">
|
||||
<body class="show_output">
|
||||
|
||||
<h1>toBlob.null</h1>
|
||||
<p class="desc">toBlob with zero dimension returns a null Blob</p>
|
||||
|
||||
<p class="output">Actual output:</p>
|
||||
<canvas id="c" class="output" width="100" height="0"><p class="fallback">FAIL (fallback content)</p></canvas>
|
||||
|
||||
<ul id="d"></ul>
|
||||
<script>
|
||||
async_test(function() {
|
||||
on_event(window, "load", this.step_func(function() {
|
||||
var toBlobCalled = false;
|
||||
c.toBlob(this.step_func(function(blob) {
|
||||
toBlobCalled = true;
|
||||
_assertSame(blob, null, "blob", "null");
|
||||
c.width = 0;
|
||||
c.height = 100;
|
||||
c.toBlob(this.step_func_done(function(blob) {
|
||||
_assertSame(blob, null, "blob", "null");
|
||||
}), 'image/jpeg');
|
||||
}), 'image/jpeg');
|
||||
assert_false(toBlobCalled, "toBlob callback shouldn't be called synchronously");
|
||||
}));
|
||||
}, "toBlob with zero dimension returns a null Blob");
|
||||
</script>
|
|
@ -1,29 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
|
||||
<title>Canvas test: toBlob.png</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/common/canvas-tests.js"></script>
|
||||
<link rel="stylesheet" href="/common/canvas-tests.css">
|
||||
<body class="show_output">
|
||||
|
||||
<h1>toBlob.png</h1>
|
||||
<p class="desc">toBlob with image/png returns a PNG Blob</p>
|
||||
|
||||
|
||||
<p class="output">Actual output:</p>
|
||||
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
|
||||
|
||||
<ul id="d"></ul>
|
||||
<div id="log"></div>
|
||||
<canvas id="c"></canvas>
|
||||
<script>
|
||||
var t = async_test("toBlob with image/png returns a PNG Blob");
|
||||
_addTest(function(canvas, ctx) {
|
||||
|
||||
canvas.toBlob(function(data){
|
||||
_assertSame(data.type, "image/png", "data.type", "\"image/png\"");
|
||||
}, 'image/png');
|
||||
|
||||
|
||||
});
|
||||
async_test(function() {
|
||||
on_event(window, "load", this.step_func(function() {
|
||||
var canvas = document.getElementById('c');
|
||||
var ctx = canvas.getContext('2d');
|
||||
canvas.toBlob(this.step_func_done(function(data) {
|
||||
assert_equals(data.type, "image/png");
|
||||
}), 'image/png');
|
||||
}));
|
||||
}, "toBlob with image/png returns a PNG Blob");
|
||||
</script>
|
||||
|
||||
|
|
|
@ -5,18 +5,18 @@
|
|||
<script src="/resources/testharnessreport.js"></script>
|
||||
<meta name="assert" content="Check if the embed element is ignored when used inside a media element">
|
||||
<script type="application/javascript">
|
||||
window.childLoaded = false;
|
||||
async_test(function() {
|
||||
addEventListener("load", this.step_func_done(function() {
|
||||
assert_false(window.childLoaded);
|
||||
}));
|
||||
}, "Test embed being ignored inside media element");
|
||||
var nestingTest = async_test("Test embed being ignored inside media element");
|
||||
onload = nestingTest.step_func_done(function() {
|
||||
assert_true(true, "We got to a load event without loading things we should not load");
|
||||
});
|
||||
</script>
|
||||
<body>
|
||||
<video>
|
||||
<embed type="text/html" src="embed-iframe.html" />
|
||||
<embed type="text/html" src="../resources/should-not-load.html"
|
||||
test-description="<embed> in <video>">
|
||||
</video>
|
||||
<audio>
|
||||
<embed type="text/html" src="embed-iframe.html" />
|
||||
<embed type="text/html" src="../resources/should-not-load.html"
|
||||
test-description="<embed> in <audio>">
|
||||
</audio>
|
||||
</body>
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8>
|
||||
<title></title>
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<script>
|
||||
var loadedCount = 0;
|
||||
var nestingTest = async_test("Test <embed> nesting inside <object>");
|
||||
onload = nestingTest.step_func_done(function() {
|
||||
assert_equals(loadedCount, 12, "Should have loaded all should-load elements");
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
object, embed { display: none }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<object data="../resources/should-load.html" style="width: 100px; height: 100px">
|
||||
<embed type="text/html" src="../resources/should-not-load.html"
|
||||
test-description="<embed> inside <object>">
|
||||
</object>
|
||||
<object style="width: 100px; height: 100px" data="data:application/x-does-not-exist,test">
|
||||
<embed type="text/html" src="../resources/should-load.html" />
|
||||
</object>
|
||||
<object style="width: 100px; height: 100px" data="data:application/x-does-not-exist,test">
|
||||
<div></div>
|
||||
<embed type="text/html" src="../resources/should-load.html" />
|
||||
</object>
|
||||
<object style="width: 100px; height: 100px" data="data:application/x-does-not-exist,test">
|
||||
<div>
|
||||
<embed type="text/html" src="../resources/should-load.html" />
|
||||
</div>
|
||||
</object>
|
||||
<object style="width: 100px; height: 100px" data="data:application/x-does-not-exist,test">
|
||||
<embed type="text/html" src="../resources/should-load.html" />
|
||||
<embed type="text/html" src="../resources/should-load.html" />
|
||||
<object data="../resources/should-load.html">
|
||||
<embed type="text/html" src="../resources/should-not-load.html"
|
||||
test-description="<embed> inside loaded <object> inside non-loaded <object>">
|
||||
</object>
|
||||
<object data="data:application/x-does-not-exist,test">
|
||||
<embed type="text/html" src="../resources/should-load.html" />
|
||||
</object>
|
||||
</object>
|
||||
<div>
|
||||
<object data="../resources/should-load.html" style="width: 100px; height: 100px"></object>
|
||||
<embed type="text/html" src="../resources/should-load.html" />
|
||||
</div>
|
||||
<div>
|
||||
<embed type="text/html" src="../resources/should-load.html" />
|
||||
<object data="../resources/should-load.html" style="width: 100px; height: 100px"></object>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -23,7 +23,7 @@ async_test(function(t) {
|
|||
|
||||
obj.data = "file:\\http://nonexistent.html";
|
||||
document.body.appendChild(obj);
|
||||
}, "error event");
|
||||
}, "error event (using 'file:' protocol)");
|
||||
|
||||
async_test(function(t) {
|
||||
var obj = document.createElement("object");
|
||||
|
@ -37,7 +37,7 @@ async_test(function(t) {
|
|||
|
||||
obj.data = "http://test:test";
|
||||
document.body.appendChild(obj);
|
||||
}, "error event");
|
||||
}, "error event (using 'http:' protocol)");
|
||||
|
||||
|
||||
async_test(function(t) {
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<title>HTML Test: The embed element represents a document</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<meta name="assert" content="Check if the object element is ignored when used inside a media element">
|
||||
<script type="application/javascript">
|
||||
var nestingTest = async_test("Test <object> being ignored inside media element");
|
||||
onload = nestingTest.step_func_done(function() {
|
||||
assert_true(true, "We got to a load event without loading things we should not load");
|
||||
});
|
||||
</script>
|
||||
<body>
|
||||
<video>
|
||||
<object type="text/html" data="../resources/should-not-load.html"
|
||||
test-description="<object> in <video>"></object>
|
||||
</video>
|
||||
<audio>
|
||||
<object type="text/html" data="../resources/should-not-load.html"
|
||||
test-description="<object> in <audio>"></object>
|
||||
</audio>
|
||||
</body>
|
|
@ -0,0 +1,56 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8>
|
||||
<title></title>
|
||||
<script src=/resources/testharness.js></script>
|
||||
<script src=/resources/testharnessreport.js></script>
|
||||
<script>
|
||||
var loadedCount = 0;
|
||||
var nestingTest = async_test("Test <object> nesting inside <object>");
|
||||
onload = nestingTest.step_func_done(function() {
|
||||
assert_equals(loadedCount, 12, "Should have loaded all should-load elements");
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
object { display: none }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<object data="../resources/should-load.html" style="width: 100px; height: 100px">
|
||||
<object type="text/html" data="../resources/should-not-load.html"
|
||||
test-description="<object> inside <object>"></object>
|
||||
</object>
|
||||
<object style="width: 100px; height: 100px" data="data:application/x-does-not-exist,test">
|
||||
<object type="text/html" data="../resources/should-load.html"></object>
|
||||
</object>
|
||||
<object style="width: 100px; height: 100px" data="data:application/x-does-not-exist,test">
|
||||
<div></div>
|
||||
<object type="text/html" data="../resources/should-load.html"></object>
|
||||
</object>
|
||||
<object style="width: 100px; height: 100px" data="data:application/x-does-not-exist,test">
|
||||
<div>
|
||||
<object type="text/html" data="../resources/should-load.html"></object>
|
||||
</div>
|
||||
</object>
|
||||
<object style="width: 100px; height: 100px" data="data:application/x-does-not-exist,test">
|
||||
<object type="text/html" data="../resources/should-load.html"></object>
|
||||
<object type="text/html" data="../resources/should-load.html"></object>
|
||||
<object data="../resources/should-load.html">
|
||||
<object type="text/html" data="../resources/should-not-load.html"
|
||||
test-description="<object> inside loaded <object> inside non-loaded <object>"></object>
|
||||
</object>
|
||||
<object data="data:application/x-does-not-exist,test">
|
||||
<object type="text/html" data="../resources/should-load.html"></object>
|
||||
</object>
|
||||
</object>
|
||||
<div>
|
||||
<object data="../resources/should-load.html" style="width: 100px; height: 100px"></object>
|
||||
<object type="text/html" data="../resources/should-load.html"></object>
|
||||
</div>
|
||||
<div>
|
||||
<object type="text/html" data="../resources/should-load.html"></object>
|
||||
<object data="../resources/should-load.html" style="width: 100px; height: 100px"></object>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue