Update web-platform-tests to revision fab2c513bffb2bd19600d23b495264d123df092f

This commit is contained in:
Ms2ger 2016-05-06 10:53:19 +02:00
parent c226bf85a9
commit ebddcc2d7f
441 changed files with 3689 additions and 1521 deletions

View file

@ -1,6 +1,5 @@
@ayg
@Ms2ger
@foolip
@gsnedders
@jdm
@jgraham

View file

@ -115,7 +115,7 @@ var embeddedElements = {
media: "string"
},
track: {
kind: {type: "enum", keywords: ["subtitles", "captions", "descriptions", "chapters", "metadata"], defaultVal: "captions"},
kind: {type: "enum", keywords: ["subtitles", "captions", "descriptions", "chapters", "metadata"], defaultVal: "subtitles", invalidVal: "metadata"},
src: "url",
srclang: "string",
label: "string",

View file

@ -9,7 +9,7 @@ var metadataElements = {
link: {
// Conforming
href: "url",
crossOrigin: {type: "enum", keywords: ["anonymous", "use-credentials"], nonCanon:{"": "anonymous"}},
crossOrigin: {type: "enum", keywords: ["anonymous", "use-credentials"], nonCanon:{"": "anonymous"}, isNullable: true, defaultVal: null, invalidVal: "anonymous"},
rel: "string",
relList: {type: "tokenlist", domAttrName: "rel"},
media: "string",

View file

@ -74,6 +74,8 @@ var tabularElements = {
colSpan: {type: "unsigned long", defaultVal: 1},
rowSpan: {type: "unsigned long", defaultVal: 1},
headers: "settable tokenlist",
scope: {type: "enum", keywords: ["row", "col", "rowgroup", "colgroup"]},
abbr: "string",
// HTMLTableCellElement (Obsolete)
align: "string",
@ -85,15 +87,14 @@ var tabularElements = {
noWrap: "boolean",
vAlign: "string",
bgColor: {type: "string", treatNullAsEmptyString: true},
// HTMLTableDataCellElement (Obsolete)
abbr: "string",
},
th: {
// HTMLTableCellElement (Conforming)
colSpan: {type: "unsigned long", defaultVal: 1},
rowSpan: {type: "unsigned long", defaultVal: 1},
headers: "settable tokenlist",
scope: {type: "enum", keywords: ["row", "col", "rowgroup", "colgroup"]},
abbr: "string",
// HTMLTableCellElement (Obsolete)
align: "string",
@ -105,15 +106,6 @@ var tabularElements = {
noWrap: "boolean",
vAlign: "string",
bgColor: {type: "string", treatNullAsEmptyString: true},
// HTMLTableHeaderCellElement (Conforming)
// TODO: double-check that the way we're treating missing value
// defaults is consistent here. scope has an auto state with no
// associated keyword, which is the missing value default -- is this
// the right syntax for that?
scope: {type: "enum", keywords: ["row", "col", "rowgroup", "colgroup"]},
abbr: "string",
sorted: "string",
},
};

View file

@ -1557,23 +1557,15 @@ interface HTMLTableRowElement : HTMLElement {
// also has obsolete members
};
interface HTMLTableDataCellElement : HTMLTableCellElement {
// also has obsolete members
};
interface HTMLTableHeaderCellElement : HTMLTableCellElement {
attribute DOMString scope;
attribute DOMString abbr;
attribute DOMString sorted;
void sort();
};
interface HTMLTableCellElement : HTMLElement {
attribute unsigned long colSpan;
attribute unsigned long rowSpan;
[PutForwards=value] readonly attribute DOMTokenList headers;
[CEReactions] attribute unsigned long colSpan;
[CEReactions] attribute unsigned long rowSpan;
[CEReactions, SameObject, PutForwards=value] readonly attribute DOMTokenList headers;
readonly attribute long cellIndex;
[CEReactions] attribute DOMString scope; // only conforming for th elements
[CEReactions] attribute DOMString abbr; // only conforming for th elements
// also has obsolete members
};
@ -1960,6 +1952,15 @@ interface HTMLTemplateElement : HTMLElement {
readonly attribute DocumentFragment content;
};
interface HTMLSlotElement : HTMLElement {
/*[CEReactions]*/ attribute DOMString name;
sequence<Node> assignedNodes(optional AssignedNodesOptions options);
};
dictionary AssignedNodesOptions {
boolean flatten = false;
};
typedef (CanvasRenderingContext2D or WebGLRenderingContext) RenderingContext;
interface HTMLCanvasElement : HTMLElement {
@ -3128,10 +3129,6 @@ partial interface HTMLTableCellElement {
[TreatNullAs=EmptyString] attribute DOMString bgColor;
};
partial interface HTMLTableDataCellElement {
attribute DOMString abbr;
};
partial interface HTMLTableRowElement {
attribute DOMString align;
attribute DOMString ch;
@ -3204,59 +3201,8 @@ window.onload = function() {
Transferable: [],
Document: ['iframe.contentDocument', 'new Document()'],
XMLDocument: ['document.implementation.createDocument(null, "", null)'],
HTMLElement: [
'document.createElement("noscript")',
'document.createElement("section")',
'document.createElement("nav")',
'document.createElement("article")',
'document.createElement("aside")',
'document.createElement("hgroup")',
'document.createElement("header")',
'document.createElement("footer")',
'document.createElement("address")',
'document.createElement("dt")',
'document.createElement("dd")',
'document.createElement("figure")',
'document.createElement("figcaption")',
'document.createElement("em")',
'document.createElement("strong")',
'document.createElement("small")',
'document.createElement("s")',
'document.createElement("cite")',
'document.createElement("dfn")',
'document.createElement("abbr")',
'document.createElement("code")',
'document.createElement("var")',
'document.createElement("samp")',
'document.createElement("kbd")',
'document.createElement("sub")',
'document.createElement("sup")',
'document.createElement("i")',
'document.createElement("b")',
'document.createElement("u")',
'document.createElement("mark")',
'document.createElement("ruby")',
'document.createElement("rt")',
'document.createElement("rp")',
'document.createElement("bdi")',
'document.createElement("bdo")',
'document.createElement("wbr")',
'document.createElement("summary")',
'document.createElement("acronym")',
],
HTMLUnknownElement: [
'document.createElement("blink")',
'document.createElement("quasit")',
'document.createElement("bgsound")',
'document.createElement("isindex")',
'document.createElement("multicol")',
'document.createElement("nextid")',
'document.createElement("rb")',
'document.createElement("spacer")',
'document.createElement("basefont")',
'document.createElement("directory")',
'document.createElement("mod")',
],
HTMLElement: ['document.createElement("noscript")'], // more tests in html/semantics/interfaces.js
HTMLUnknownElement: ['document.createElement("bgsound")'], // more tests in html/semantics/interfaces.js
HTMLHtmlElement: ['document.createElement("html")'],
HTMLHeadElement: ['document.createElement("head")'],
HTMLTitleElement: ['document.createElement("title")'],
@ -3266,22 +3212,10 @@ window.onload = function() {
HTMLStyleElement: ['document.createElement("style")'],
HTMLScriptElement: ['document.createElement("script")'],
HTMLBodyElement: ['document.createElement("body")'],
HTMLHeadingElement: [
'document.createElement("h1")',
'document.createElement("h2")',
'document.createElement("h3")',
'document.createElement("h4")',
'document.createElement("h5")',
'document.createElement("h6")',
],
HTMLHeadingElement: ['document.createElement("h1")'],
HTMLParagraphElement: ['document.createElement("p")'],
HTMLHRElement: ['document.createElement("hr")'],
HTMLPreElement: [
'document.createElement("pre")',
'document.createElement("listing")',
'document.createElement("plaintext")',
'document.createElement("xmp")',
],
HTMLPreElement: ['document.createElement("pre")'],
HTMLQuoteElement: [
'document.createElement("blockquote")',
'document.createElement("q")',
@ -3324,6 +3258,8 @@ window.onload = function() {
DataCue: [],
TimeRanges: ['document.createElement("video").buffered'],
TrackEvent: ['new TrackEvent("addtrack"; {track:document.createElement("track").track})'],
HTMLTemplateElement: ['document.createElement("template")'],
HTMLSlotElement: ['document.createElement("slot")'],
HTMLCanvasElement: ['document.createElement("canvas")'],
CanvasRenderingContext2D: ['document.createElement("canvas").getContext("2d")'],
CanvasGradient: [],
@ -3344,9 +3280,10 @@ window.onload = function() {
'document.createElement("tfoot")',
],
HTMLTableRowElement: ['document.createElement("tr")'],
HTMLTableDataCellElement: ['document.createElement("td")'],
HTMLTableHeaderCellElement: ['document.createElement("th")'],
HTMLTableCellElement: [],
HTMLTableCellElement: [
'document.createElement("td")',
'document.createElement("th")',
],
HTMLFormElement: ['document.createElement("form")'],
HTMLFieldsetElement: ['document.createElement("fieldset")'],
HTMLLegendElement: ['document.createElement("legend")'],
@ -3364,7 +3301,6 @@ window.onload = function() {
HTMLMeterElement: ['document.createElement("meter")'],
ValidityState: ['document.createElement("input").validity'],
HTMLDetailsElement: ['document.createElement("details")'],
HTMLCommandElement: ['document.createElement("command")'],
HTMLMenuElement: ['document.createElement("menu")'],
Window: ['window'],
BarProp: [],

View file

@ -9,9 +9,16 @@
<script src=interfaces.js></script>
<div id="log"></div>
<script>
function do_test(local_name, iface) {
function do_test(local_name, iface, variant) {
test(function() {
var e = document.createElement(local_name), i = "HTML" + iface + "Element";
var e;
var i = "HTML" + iface + "Element";
if (variant === "useNS") {
// Use createElementNS here to preserve the case of local_name.
e = document.createElementNS("http://www.w3.org/1999/xhtml", local_name);
} else {
e = document.createElement(local_name);
}
assert_class_string(e, i,
"Element " + local_name + " should have " + i +
" as its primary interface.");
@ -27,7 +34,13 @@ function do_test(local_name, iface) {
}
elements.forEach(function(a) {
do_test(a[0], a[1]);
do_test(a[0].toUpperCase(), a[1]);
do_test(a[0], a[1], "useNS");
// Only run the createElement variant if the input is all-lowercase, because createElement
// case-folds to lowercase. Custom elements are required to use all-lowercase to implement
// HTMLElement, otherwise they use HTMLUnknownElement per spec. Example: "foo-BAR".
if (a[0] === a[0].toLowerCase()) {
do_test(a[0].toUpperCase(), a[1]);
}
})
</script>

View file

@ -1,12 +1,17 @@
var elements = [
["a", "Anchor"],
["abbr", ""],
["acronym", ""],
["address", ""],
["applet", "Applet"],
["area", "Area"],
["article", ""],
["aside", ""],
["audio", "Audio"],
["b", ""],
["base", "Base"],
["basefont", "Unknown"],
["basefont", ""],
["bdi", ""],
["bdo", ""],
["bgsound", "Unknown"],
["big", ""],
@ -22,17 +27,29 @@ var elements = [
["code", ""],
["col", "TableCol"],
["colgroup", "TableCol"],
["command", "Unknown"],
["data", "Data"],
["datalist", "DataList"],
["dd", ""],
["del", "Mod"],
["details", "Details"],
["dfn", ""],
["dialog", "Dialog"],
["dir", "Directory"],
["directory", "Unknown"],
["div", "Div"],
["dl", "DList"],
["dt", ""],
["em", ""],
["embed", "Embed"],
["fieldset", "FieldSet"],
["figcaption", ""],
["figure", ""],
["font", "Font"],
["foo-BAR", "Unknown"], // not a valid custom element name
["foo-bar", ""], // valid custom element name
["foo", "Unknown"],
["footer", ""],
["form", "Form"],
["frame", "Frame"],
["frameset", "FrameSet"],
@ -43,6 +60,8 @@ var elements = [
["h5", "Heading"],
["h6", "Heading"],
["head", "Head"],
["header", ""],
["hgroup", ""],
["hr", "HR"],
["html", "Html"],
["i", ""],
@ -58,12 +77,19 @@ var elements = [
["legend", "Legend"],
["li", "LI"],
["link", "Link"],
["listing", ""],
["listing", "Pre"],
["main", ""],
["map", "Map"],
["mark", ""],
["marquee", "Marquee"],
["menu", "Menu"],
["menuitem", "MenuItem"],
["meta", "Meta"],
["meter", "Meter"],
["mod", "Unknown"],
["multicol", "Unknown"],
["nav", ""],
["nextid", "Unknown"],
["nobr", ""],
["noembed", ""],
["noframes", ""],
@ -72,15 +98,26 @@ var elements = [
["ol", "OList"],
["optgroup", "OptGroup"],
["option", "Option"],
["output", "Output"],
["p", "Paragraph"],
["param", "Param"],
["picture", "Picture"],
["plaintext", ""],
["pre", "Pre"],
["progress", "Progress"],
["q", "Quote"],
["quasit", "Unknown"],
["rb", ""],
["rp", ""],
["rt", ""],
["rtc", ""],
["ruby", ""],
["s", ""],
["samp", ""],
["script", "Script"],
["section", ""],
["select", "Select"],
["slot", "Slot"],
["small", ""],
["source", "Source"],
["spacer", "Unknown"],
@ -89,52 +126,25 @@ var elements = [
["strong", ""],
["style", "Style"],
["sub", ""],
["summary", ""],
["sup", ""],
["table", "Table"],
["tbody", "TableSection"],
["td", "TableDataCell"],
["td", "TableCell"],
["textarea", "TextArea"],
["tfoot", "TableSection"],
["th", "TableHeaderCell"],
["th", "TableCell"],
["thead", "TableSection"],
["time", "Time"],
["title", "Title"],
["tr", "TableRow"],
["track", "Track"],
["tt", ""],
["u", ""],
["ul", "UList"],
["var", ""],
["video", "Video"],
["wbr", ""],
["xmp", ""],
["section", ""],
["nav", ""],
["article", ""],
["aside", ""],
["hgroup", ""],
["header", ""],
["footer", ""],
["time", "Time"],
["mark", ""],
["progress", "Progress"],
["meter", "Meter"],
["ruby", ""],
["rb", ""],
["rt", ""],
["rtc", ""],
["rp", ""],
["figure", ""],
["datalist", "DataList"],
["output", "Output"],
["details", "Details"],
["command", "Command"],
["nextid", "Unknown"],
["bdi", ""],
["data", "Data"],
["a", "Anchor"],
["area", "Area"],
["dialog", "Dialog"],
["figcaption", ""],
["summary", ""],
["track", "Track"],
["foo", "Unknown"]
["xmp", "Pre"],
["å-bar", "Unknown"], // not a valid custom element name
];

View file

@ -0,0 +1,48 @@
<!doctype html>
<title>innerHTML getter for pre/textarea/listing with initial LF</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<div id="outer">
<div id="inner">
<pre id="pre1">
x</pre>
<pre id="pre2">
x</pre>
<textarea id="textarea1">
x</textarea>
<textarea id="textarea2">
x</textarea>
<listing id="listing1">
x</listing>
<listing id="listing2">
x</listing>
</div>
</div>
<script>
var expected_outer = '\n<div id="inner">\n<pre id="pre1">x</pre>\n<pre id="pre2">\n\nx</pre>\n<textarea id="textarea1">x</textarea>\n<textarea id="textarea2">\n\nx</textarea>\n<listing id="listing1">x</listing>\n<listing id="listing2">\n\nx</listing>\n</div>\n';
var expected_inner = expected_outer.replace('\n<div id="inner">', '').replace('</div>\n', '');
var expected_1 = 'x';
var expected_2 = '\nx';
test(function() {
assert_equals(outer.innerHTML, expected_outer);
}, 'outer div');
test(function() {
assert_equals(inner.innerHTML, expected_inner);
}, 'inner div');
['pre', 'textarea', 'listing'].forEach(function(tag) {
test(function() {
assert_equals(document.getElementById(tag + '1').innerHTML, expected_1);
}, tag + '1');
test(function() {
assert_equals(document.getElementById(tag + '2').innerHTML, expected_2);
}, tag + '2');
});
</script>

View file

@ -10,12 +10,8 @@
<div id="log"></div>
<script>
async_test(function (t) {
t.step(function() {
assert_false(document.hidden, "document.hidden must be exist and be false to run this test properly");
});
window.requestAnimationFrame(function () {
t.step(function() { assert_true(true); t.done(); });
});
assert_false(document.hidden, "document.hidden must exist and be false to run this test properly");
window.requestAnimationFrame(t.step_func_done());
}, "requestAnimationFrame callback is invoked at least once before the timeout");
</script>
</body>

View file

@ -1,7 +1,7 @@
<!DOCTYPE html>
<title>Event handlers processing algorithm</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script
<script src="/resources/testharnessreport.js"></script>
<body>
<div id="foo" style="width: 100px; height: 100px; background-color: black"></div>
<script>