mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update web-platform-tests to revision d7afcb8708eac08a614d161d5622a48172daf7e3
This commit is contained in:
parent
6f8bb4dd40
commit
edff458e23
791 changed files with 17647 additions and 10322 deletions
|
@ -12,4 +12,22 @@ test(function() {
|
|||
elm();
|
||||
});
|
||||
}, 'object legacycaller should not be supported');
|
||||
|
||||
test(() => {
|
||||
const obj = document.createElement("object");
|
||||
assert_false("typeMustMatch" in obj);
|
||||
}, "object's typeMustMatch IDL attribute should not be supported");
|
||||
|
||||
async_test(t => {
|
||||
const obj = document.createElement("object");
|
||||
t.add_cleanup(() => obj.remove());
|
||||
obj.setAttribute("data", "/common/blank.html");
|
||||
obj.setAttribute("type", "text/plain");
|
||||
obj.setAttribute("typemustmatch", "");
|
||||
obj.onload = t.step_func_done(() => {
|
||||
assert_not_equals(obj.contentDocument, null, "/common/blank.html should be loaded");
|
||||
});
|
||||
obj.onerror = t.unreached_func();
|
||||
document.body.appendChild(obj);
|
||||
}, "object's typemustmatch content attribute should not be supported");
|
||||
</script>
|
||||
|
|
|
@ -1,41 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>HTML Test: display fallback content</title>
|
||||
<link rel="author" title="Intel" href="http://www.intel.com">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
|
||||
var t1 = async_test("the typemustmatch attribute is specified");
|
||||
var t2 = async_test("the typemustmatch attribute is not specified");
|
||||
|
||||
</script>
|
||||
<body onload="t1.done(); t2.done()">
|
||||
<object id="obj"></object>
|
||||
<div id="log"></div>
|
||||
<script>
|
||||
|
||||
t1.step(function() {
|
||||
var obj1 = document.createElement("object");
|
||||
obj1.setAttribute("data", "/images/blue.png");
|
||||
obj1.setAttribute("type", "text/plain");
|
||||
obj1.setAttribute("typemustmatch", "");
|
||||
obj1.onload = t1.step_func(function () {
|
||||
assert_true("typeMustMatch" in obj1, "typeMustMatch is not supported.");
|
||||
assert_unreached("The image of the first object should not be loaded.");
|
||||
});
|
||||
document.getElementById("obj").appendChild(obj1);
|
||||
});
|
||||
|
||||
t2.step(function () {
|
||||
var obj2 = document.createElement("object");
|
||||
obj2.setAttribute("data", "test2.html");
|
||||
obj2.setAttribute("type", "text/plain");
|
||||
obj2.onload = t2.step_func( function () {
|
||||
assert_not_equals(obj2.contentDocument, null, "The test2.html should be loaded.");
|
||||
});
|
||||
document.getElementById("obj").appendChild(obj2);
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
|
@ -1,4 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>HTML Test: object - fallback</title>
|
||||
<link rel="author" title="Intel" href="http://www.intel.com">
|
|
@ -0,0 +1,15 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-input-element">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<div id="newParent"></div>
|
||||
<datalist id="suggestions">
|
||||
<option>12:00</option>
|
||||
<input type="time" list="suggestions">
|
||||
</datalist>
|
||||
<script>
|
||||
test(() => {
|
||||
document.body.offsetTop;
|
||||
newParent.appendChild(suggestions);
|
||||
}, "Moving a datalist enclosing an input type=time using that list should not crash.");
|
||||
</script>
|
|
@ -0,0 +1,11 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/input.html#input-type-change">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<input id="myInput" type="file">
|
||||
<script>
|
||||
test(() => {
|
||||
myInput.offsetTop;
|
||||
myInput.type = "text";
|
||||
}, "Changing type from file to text should not crash.");
|
||||
</script>
|
|
@ -36,7 +36,7 @@ for (var target of ["self", "parent", "top"]) {
|
|||
|
||||
/**
|
||||
* And now check that a noopener load targeted at something other than one of
|
||||
* the three special targets above in fact ignores existing things with the
|
||||
* the three special targets above is still able to reuse existing things with the
|
||||
* given name. We do this in two ways. First, by opening a window named
|
||||
* "ourpopup" and then doing a load via <a rel="noopener" target="ourpopup"> and
|
||||
* verifying that the load happens in a window with a null opener, etc, while
|
||||
|
@ -44,17 +44,17 @@ for (var target of ["self", "parent", "top"]) {
|
|||
* <a rel="noopener"> at a name that an existing subframe has, and ensuring that
|
||||
* this subframe is not navigated.
|
||||
*/
|
||||
var t1 = async_test("Check that targeting of rel=noopener with a given name ignores an existing window with that name");
|
||||
var t1 = async_test("Check that targeting of rel=noopener with a given name reuses an existing window with that name");
|
||||
var w;
|
||||
t1.add_cleanup(function() { w.close(); });
|
||||
var channel = new BroadcastChannel("ourpopup");
|
||||
channel.onmessage = t1.step_func_done(function(e) {
|
||||
var data = e.data;
|
||||
assert_false(data.hasOpener);
|
||||
assert_true(data.hasOpener);
|
||||
assert_false(data.hasParent);
|
||||
assert_equals(data.name, "ourpopup");
|
||||
assert_equals(w.opener, window);
|
||||
assert_equals(w.location.href, "about:blank");
|
||||
assert_not_equals(w.location.href, "about:blank");
|
||||
});
|
||||
t1.step(function() {
|
||||
w = window.open("", "ourpopup");
|
||||
|
@ -62,15 +62,15 @@ t1.step(function() {
|
|||
document.querySelectorAll("a")[0].click();
|
||||
});
|
||||
|
||||
var t2 = async_test("Check that targeting of rel=noopener with a given name ignores an existing subframe with that name");
|
||||
var t2 = async_test("Check that targeting of rel=noopener with a given name reuses an existing subframe with that name");
|
||||
var channel = new BroadcastChannel("oursubframe");
|
||||
channel.onmessage = t2.step_func_done(function(e) {
|
||||
var data = e.data;
|
||||
assert_false(data.hasOpener);
|
||||
assert_false(data.hasParent);
|
||||
assert_true(data.hasParent);
|
||||
assert_equals(data.name, "oursubframe");
|
||||
assert_equals(document.querySelector("iframe").contentWindow.location.href,
|
||||
"about:blank");
|
||||
assert_not_equals(document.querySelector("iframe").contentWindow.location.href,
|
||||
"about:blank");
|
||||
});
|
||||
t2.step(function() {
|
||||
document.querySelectorAll("a")[1].click();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue