mirror of
https://github.com/servo/servo.git
synced 2025-08-14 01:45:33 +01:00
Update web-platform-tests to revision e87f38097902e16348d4e17f4fe3bc2d0112bff1
This commit is contained in:
parent
2f8fa32e91
commit
db5631a086
381 changed files with 11610 additions and 4232 deletions
|
@ -40,7 +40,7 @@ function runWindowTests (baselineDimensions) {
|
|||
var prefixedMessage = new PrefixedMessageTest();
|
||||
prefixedMessage.onMessage(t.step_func_done((data, e) => {
|
||||
e.source.close();
|
||||
assert_equals(data.width, baselineDimensions.width);
|
||||
assert_equals(data.height, baselineDimensions.height);
|
||||
}));
|
||||
var win = window.open(prefixedMessage.url(windowURL), '', feature);
|
||||
}, `${feature}: absence of feature "height" should be treated same as "height=0"`);
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
["replace",
|
||||
"NOBODY",
|
||||
"@ FD ;",
|
||||
"it does not matter, you see \f",
|
||||
"text/plain",
|
||||
"text/xml",
|
||||
"application/octet-stream",
|
||||
"\0"].forEach(type => {
|
||||
async_test(t => {
|
||||
const frame = document.body.appendChild(document.createElement("iframe"));
|
||||
t.add_cleanup(() => frame.remove());
|
||||
frame.contentDocument.open(type);
|
||||
frame.contentDocument.write("<B>heya</b>");
|
||||
frame.contentDocument.close();
|
||||
assert_equals(frame.contentDocument.body.firstChild.localName, "b");
|
||||
assert_equals(frame.contentDocument.body.textContent, "heya");
|
||||
assert_equals(frame.contentDocument.contentType, "text/html");
|
||||
t.done();
|
||||
}, "document.open() with type set to: " + type + " (type argument is supposed to be ignored)");
|
||||
});
|
|
@ -13,13 +13,13 @@
|
|||
"use strict";
|
||||
async_test(function(t) {
|
||||
var request = new XMLHttpRequest();
|
||||
request.open("GET", "domstringlist.idl");
|
||||
request.open("GET", "/interfaces/html.idl");
|
||||
request.send();
|
||||
request.onload = t.step_func(function() {
|
||||
var idlArray = new IdlArray();
|
||||
var idls = request.responseText;
|
||||
|
||||
idlArray.add_idls(idls);
|
||||
idlArray.add_idls(idls, { only: ["DOMStringList"] });
|
||||
|
||||
idlArray.add_objects({
|
||||
DOMStringList: ['location.ancestorOrigins'],
|
||||
|
|
|
@ -5,13 +5,13 @@ importScripts("/resources/WebIDLParser.js", "/resources/idlharness.js");
|
|||
|
||||
async_test(function(t) {
|
||||
var request = new XMLHttpRequest();
|
||||
request.open("GET", "domstringlist.idl");
|
||||
request.open("GET", "/interfaces/html.idl");
|
||||
request.send();
|
||||
request.onload = t.step_func(function() {
|
||||
var idlArray = new IdlArray();
|
||||
var idls = request.responseText;
|
||||
|
||||
idlArray.add_idls(idls);
|
||||
idlArray.add_idls(idls, { only: ["DOMStringList"] });
|
||||
|
||||
idlArray.add_objects({
|
||||
DOMStringList: [],
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
[Exposed=(Window,Worker)]
|
||||
interface DOMStringList {
|
||||
readonly attribute unsigned long length;
|
||||
getter DOMString? item(unsigned long index);
|
||||
boolean contains(DOMString string);
|
||||
};
|
|
@ -0,0 +1,2 @@
|
|||
def main(request, response):
|
||||
return ([("Content-Type", "text/html")], "<script>parent.postMessage(\"" + str(request.POST.first("testinput")) + "\", '*');</script>")
|
|
@ -0,0 +1,25 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<body>
|
||||
<iframe id=testframe name=testframe></iframe>
|
||||
<form id=testform method=post action="//{{domains[www1]}}:{{location[port]}}/html/semantics/forms/form-submission-0/resources/file-submission.py" target=testframe enctype="multipart/form-data">
|
||||
<input name=testinput id=testinput type=file>
|
||||
</form>
|
||||
<script>
|
||||
async_test(t => {
|
||||
const dataTransfer = new DataTransfer();
|
||||
dataTransfer.items.add(new File(["foobar"], "name"));
|
||||
assert_equals(1, dataTransfer.files.length);
|
||||
|
||||
testinput.files = dataTransfer.files;
|
||||
testform.submit();
|
||||
|
||||
onmessage = e => {
|
||||
if (e.source !== testframe) return;
|
||||
assert_equals("FieldStorage('testinput', 'name', 'foobar')", e.data);
|
||||
t.done();
|
||||
};
|
||||
}, 'Posting a File');
|
||||
</script>
|
|
@ -0,0 +1,31 @@
|
|||
<!DOCTYPE html>
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/parsing.html#tree-construction:html-integration-point">
|
||||
<body>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<math><annotation-xml id="point-1" encoding="text/html"><xmp></xmp><img></xmp></annotation-xml></math>
|
||||
<math><annotation-xml id="point-2" encoding="application/xhtml+xml"><style></style><img></style></annotation-xml></math>
|
||||
<svg><foreignObject id="point-3"><iframe></iframe><img></iframe></foreignObject></svg>
|
||||
<svg><desc id="point-4"><noembed></noembed><img></noembed></desc></svg>
|
||||
<svg><title id="point-5"><noframes></noframes><img></noframes></title></svg>
|
||||
|
||||
<script>
|
||||
function generate_test(id) {
|
||||
return () => {
|
||||
let point = document.querySelector('#' + id);
|
||||
assert_not_equals(point.namespaceURI, 'http://www.w3.org/1999/xhtml');
|
||||
let rawTextElement = point.firstChild;
|
||||
assert_equals(rawTextElement.namespaceURI, 'http://www.w3.org/1999/xhtml');
|
||||
assert_equals(rawTextElement.textContent.substr(0, 4), '<',
|
||||
'Entity references should not be decoded.');
|
||||
};
|
||||
}
|
||||
|
||||
test(generate_test('point-1'), 'MathML annotation-xml with encoding=text/html should be an HTML integration point');
|
||||
test(generate_test('point-2'), 'MathML annotation-xml with encoding=application/xhtml+xml should be an HTML integration point');
|
||||
test(generate_test('point-3'), 'SVG foreignObject should be an HTML integration point');
|
||||
test(generate_test('point-4'), 'SVG desc should be an HTML integration point');
|
||||
test(generate_test('point-5'), 'SVG title should be an HTML integration point');
|
||||
</script>
|
||||
</body>
|
Loading…
Add table
Add a link
Reference in a new issue