mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Update web-platform-tests to revision 0d318188757a9c996e20b82db201fd04de5aa255
This commit is contained in:
parent
b2a5225831
commit
1a81b18b9f
12321 changed files with 544385 additions and 6 deletions
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE html>
|
||||
<title>link.relList: non-string contains</title>
|
||||
<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-link-element">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#domtokenlist">
|
||||
<link rel="help" href="https://heycam.github.io/webidl/#ecmascript-binding">
|
||||
<link rel="help" href="http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf#page=57">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<link id="link" rel="undefined null 0 NaN Infinity">
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
test(function() {
|
||||
var list = document.getElementById("link").relList;
|
||||
assert_equals(list.contains(undefined), true); //"undefined"
|
||||
assert_equals(list.contains(null), true); //"null"
|
||||
assert_equals(list.contains(-0), true); //"0"
|
||||
assert_equals(list.contains(+0), true); //"0"
|
||||
assert_equals(list.contains(NaN), true); //"NaN"
|
||||
assert_equals(list.contains(+Infinity), true); //"Infinity"
|
||||
assert_equals(list.contains(-Infinity), false); //"-Infinity"
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,32 @@
|
|||
<!DOCTYPE html>
|
||||
<title>link: error events</title>
|
||||
<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-link-element">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="log"></div>
|
||||
<div id="test">
|
||||
<script>
|
||||
//var t404 = async_test("Should get an error event for a 404 error.")
|
||||
//t404.step(function() {
|
||||
// var elt = document.createElement("link");
|
||||
// elt.onerror = t404.step_func(function() {
|
||||
// assert_true(true, "Got error event for 404 error.")
|
||||
// t404.done()
|
||||
// })
|
||||
// elt.rel = "stylesheet";
|
||||
// elt.href = 404 error;
|
||||
// document.getElementsByTagName("head")[0].appendChild(elt);
|
||||
//})
|
||||
var tText = async_test("Should get an error event for a text/plain response.")
|
||||
tText.step(function() {
|
||||
var elt = document.createElement("link");
|
||||
elt.onerror = tText.step_func(function() {
|
||||
assert_true(true, "Got error event for 404 error.")
|
||||
tText.done()
|
||||
})
|
||||
elt.rel = "stylesheet";
|
||||
elt.href = "../../../../../common/css-red.txt";
|
||||
document.getElementsByTagName("head")[0].appendChild(elt);
|
||||
})
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue