mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update web-platform-tests to revision 3bfdeb8976fc51748935c8d1f1014dfba8e08dfb
This commit is contained in:
parent
fcd6beb608
commit
cb63cfd5c7
185 changed files with 3083 additions and 1074 deletions
|
@ -1,4 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<style>
|
||||
body {
|
||||
height: 2000px;
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
// META: script=/common/get-host-info.sub.js
|
||||
|
||||
function echoURL(content) {
|
||||
return `/common/echo.py?content=${encodeURIComponent(content)}`;
|
||||
}
|
||||
|
||||
function setSrc(frame, type, content) {
|
||||
if (type === "same-origin") {
|
||||
frame.src = echoURL(content);
|
||||
} else if (type === "cross-site") {
|
||||
frame.src = `${get_host_info().HTTP_NOTSAMESITE_ORIGIN}${echoURL(content)}`;
|
||||
} else {
|
||||
frame.srcdoc = content;
|
||||
}
|
||||
}
|
||||
|
||||
["srcdoc", "same-origin", "cross-site"].forEach(type => {
|
||||
const initialType = type === "srcdoc" ? type : "same-origin";
|
||||
|
||||
[
|
||||
{
|
||||
"namedObject": "<div id=abc></div>",
|
||||
"namedObjectLocalName": "div"
|
||||
},
|
||||
{
|
||||
"namedObject": "<object name=abc></object>",
|
||||
"namedObjectLocalName": "object"
|
||||
},
|
||||
{
|
||||
"namedObject": "<iframe id=abc></iframe>",
|
||||
"namedObjectLocalName": "iframe"
|
||||
}
|
||||
].forEach(testData => {
|
||||
async_test(t => {
|
||||
const frame = document.createElement("iframe");
|
||||
t.add_cleanup(() => frame.remove());
|
||||
setSrc(frame, initialType, `<script>function f() { return abc }</script>${testData.namedObject}`);
|
||||
frame.onload = t.step_func(() => {
|
||||
const f = frame.contentWindow.f,
|
||||
associatedAbc = f();
|
||||
frame.onload = t.step_func_done(() => {
|
||||
assert_equals(f(), associatedAbc);
|
||||
assert_equals(associatedAbc.localName, testData.namedObjectLocalName);
|
||||
});
|
||||
setSrc(frame, type, "<span id=abc></span>");
|
||||
});
|
||||
document.body.append(frame);
|
||||
}, `Window's associated Document object is used for finding named objects (<${testData.namedObjectLocalName}> via ${type} <iframe>)`);
|
||||
});
|
||||
|
||||
async_test(t => {
|
||||
const frame = document.createElement("iframe");
|
||||
t.add_cleanup(() => frame.remove());
|
||||
setSrc(frame, initialType, "<script>function f() { return abc }</script><object name=abc data='about:blank'></object>");
|
||||
frame.onload = t.step_func(() => {
|
||||
const f = frame.contentWindow.f,
|
||||
associatedAbc = f(),
|
||||
associatedAbcContainer = associatedAbc.frameElement;
|
||||
frame.onload = t.step_func_done(() => {
|
||||
assert_equals(f(), associatedAbcContainer);
|
||||
assert_equals(associatedAbcContainer.contentWindow, null);
|
||||
});
|
||||
setSrc(frame, type, "<span id=abc></span>");
|
||||
});
|
||||
document.body.append(frame);
|
||||
}, `Window's associated Document object is used for finding named objects (<object> with browsing ccontext via ${type} <iframe)>`);
|
||||
});
|
|
@ -99,7 +99,8 @@ var embeddedElements = {
|
|||
|
||||
width: "unsigned long",
|
||||
height: "unsigned long",
|
||||
poster: "url"
|
||||
poster: "url",
|
||||
playsInline: "boolean",
|
||||
},
|
||||
audio: {
|
||||
// HTMLMediaElement
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
<!doctype html>
<html class="reftest-wait">
<meta charset="utf-8">
<title>textarea multiline placeholder (CR)</title>
<link rel="help" href="https://html.spec.whatwg.org/multipage/form-elements.html#attr-textarea-placeholder">
<meta name="assert" content="textarea element's placeholder preserves newlines (CR)">
<link rel="match" href="/html/form-elements/the-textarea-element/multiline-placeholder-ref.html">
<link rel="stylesheet" href="support/placeholder.css">
<textarea rows="5" placeholder="this is
a multiline
placeholder"></textarea>
<textarea rows="5" placeholder="this is
a multiline

placeholder"></textarea>
<textarea rows="5" id="dynamic"></textarea>
<script>
document.querySelector("#dynamic")
.setAttribute("placeholder", "this is\ra multiline\r\rplaceholder");
document.documentElement.classList.remove("reftest-wait");
</script>
</html>
|
|
@ -0,0 +1 @@
|
|||
<!doctype html>
<html class="reftest-wait">
<meta charset="utf-8">
<title>textarea multiline placeholder (CR)</title>
<link rel="help" href="https://html.spec.whatwg.org/multipage/form-elements.html#attr-textarea-placeholder">
<meta name="assert" content="textarea element's placeholder preserves newlines (CR)">
<link rel="match" href="multiline-placeholder-ref.html">
<link rel="stylesheet" href="support/placeholder.css">
<textarea rows="5" placeholder="this is
a multiline
placeholder"></textarea>
<textarea rows="5" placeholder="this is
a multiline

placeholder"></textarea>
<textarea rows="5" id="dynamic"></textarea>
<script>
document.querySelector("#dynamic")
.setAttribute("placeholder", "this is\ra multiline\r\rplaceholder");
document.documentElement.classList.remove("reftest-wait");
</script>
</html>
|
|
@ -4,7 +4,7 @@
|
|||
<title>textarea multiline placeholder (CRLF)</title>
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/form-elements.html#attr-textarea-placeholder">
|
||||
<meta name="assert" content="textarea element's placeholder preserves newlines (CRLF)">
|
||||
<link rel="match" href="/html/form-elements/the-textarea-element/multiline-placeholder-ref.html">
|
||||
<link rel="match" href="multiline-placeholder-ref.html">
|
||||
<link rel="stylesheet" href="support/placeholder.css">
|
||||
<textarea rows="5" placeholder="this is
|
||||
a multiline
|
|
@ -4,7 +4,7 @@
|
|||
<title>textarea multiline placeholder</title>
|
||||
<link rel="help" href="https://html.spec.whatwg.org/multipage/form-elements.html#attr-textarea-placeholder">
|
||||
<meta name="assert" content="textarea element's placeholder preserves newlines">
|
||||
<link rel="match" href="/html/form-elements/the-textarea-element/multiline-placeholder-ref.html">
|
||||
<link rel="match" href="multiline-placeholder-ref.html">
|
||||
<link rel="stylesheet" href="support/placeholder.css">
|
||||
<textarea rows="5" placeholder="this is
|
||||
a multiline
|
Loading…
Add table
Add a link
Reference in a new issue