Update web-platform-tests to revision 3b3585e368841b77caea8576fa56cef91c3fbdf0

This commit is contained in:
Ms2ger 2016-09-26 10:52:50 +02:00
parent d00639c55f
commit 3b4f0ec0bb
541 changed files with 14609 additions and 3288 deletions

View file

@ -102,26 +102,6 @@ document.body.appendChild(s);
finish('nested');
</script>
<!-- Test beforescriptexecute and afterscriptexecute -->
<script id="script-exec-before-after">
function verifyScriptExec(e) {
verify('script-exec');
}
document.addEventListener('beforescriptexecute', verifyScriptExec, false);
document.addEventListener('afterscriptexecute', verifyScriptExec, false);
var s = document.createElement("script");
s.id = "script-exec-test";
s.textContent = "function nop() { return false }";
document.body.appendChild(s);
document.removeEventListener('beforescriptexecute', verifyScriptExec);
document.removeEventListener('afterscriptexecute', verifyScriptExec);
finish('script-exec');
</script>
<!-- Test script load error event listener -->
<script>
function testLoadFail() {

View file

@ -53,7 +53,14 @@ test(function() {
for (var p in document.forms) {
result.push(p);
}
assert_array_equals(result, ["0", "1", "2", "item", "namedItem", "length"])
// http://heycam.github.io/webidl/#property-enumeration
// If the object supports indexed properties, then the objects supported
// property indices are enumerated first, in numerical order.
assert_array_equals(result.splice(0, 2), ["0", "1", "2"]);
// [...]
// Finally, any enumerable own properties or properties from the objects
// prototype chain are then enumerated, in no defined order.
assert_array_equals(result.sort(), ["0", "1", "2", "item", "namedItem", "length"].sort())
}, "document.forms iteration")
test(function() {

View file

@ -26,7 +26,6 @@ var embeddedElements = {
srcdoc: "string",
name: "string",
sandbox: "settable tokenlist",
seamless: "boolean",
allowFullscreen: "boolean",
width: "string",
height: "string",
@ -135,11 +134,9 @@ var embeddedElements = {
shape: "string",
target: "string",
download: "string",
ping: "urls",
ping: "string",
rel: "string",
relList: {type: "tokenlist", domAttrName: "rel"},
hreflang: "string",
type: "string",
// HTMLHyperlinkElementUtils
href: "url",

View file

@ -34,7 +34,6 @@ var metadataElements = {
style: {
media: "string",
type: "string",
scoped: "boolean",
},
};

View file

@ -1,9 +1,6 @@
// Up-to-date as of 2013-04-12.
var tabularElements = {
table: {
// Conforming
sortable: "boolean",
// Obsolete
align: "string",
border: "string",

View file

@ -4,7 +4,7 @@ var textElements = {
// Conforming
target: "string",
download: "string",
ping: "urls",
ping: "string",
rel: "string",
relList: {type: "tokenlist", domAttrName: "rel"},
hreflang: "string",

View file

@ -10,9 +10,8 @@ ReflectionTests.start = new Date().getTime();
* algorithm here, because we're not concerned with its correctness -- we're
* only testing HTML reflection, not Web Addresses.
*
* Return "" if the URL couldn't be resolved, since this is really for
* reflected URL attributes, and those are supposed to return "" if the URL
* couldn't be resolved.
* Return the input if the URL couldn't be resolved, per the spec for
* reflected URL attributes.
*
* It seems like IE9 doesn't implement URL decomposition attributes correctly
* for <a>, which causes all these tests to fail. Ideally I'd do this in some
@ -25,41 +24,17 @@ ReflectionTests.start = new Date().getTime();
* special cases for all the values we test.
*/
ReflectionTests.resolveUrl = function(url) {
url = String(url);
var el = document.createElement("a");
el.href = String(url);
el.href = url;
var ret = el.protocol + "//" + el.host + el.pathname + el.search + el.hash;
if (ret == "//") {
return "";
return url;
} else {
return ret;
}
};
/**
* Given some input, convert to a multi-URL value for IDL get per the spec.
*/
ReflectionTests.urlsExpected = function(urls) {
var expected = "";
// TODO: Test other whitespace?
urls = urls + "";
var split = urls.split(" ");
for (var j = 0; j < split.length; j++) {
if (split[j] == "") {
continue;
}
var append = ReflectionTests.resolveUrl(split[j]);
if (append == "") {
continue;
}
if (expected == "") {
expected = append;
} else {
expected += " " + append;
}
}
return expected;
};
/**
* The "rules for parsing non-negative integers" from the HTML spec. They're
* mostly used for reflection, so here seems like as good a place to test them
@ -177,14 +152,17 @@ ReflectionTests.typeMap = {
]
},
/**
* "If a reflecting IDL attribute is a DOMString attribute whose content
* attribute is defined to contain a URL, then on getting, the IDL
* attribute must resolve the value of the content attribute relative to
* the element and return the resulting absolute URL if that was
* successful, or the empty string otherwise; and on setting, must set the
* content attribute to the specified literal value. If the content
* attribute is absent, the IDL attribute must return the default value, if
* the content attribute has one, or else the empty string."
* "If a reflecting IDL attribute is a USVString attribute whose content
* attribute is defined to contain a URL, then on getting, if the content
* attribute is absent, the IDL attribute must return the empty string.
* Otherwise, the IDL attribute must parse the value of the content
* attribute relative to the element's node document and if that is
* successful, return the resulting URL string. If parsing fails, then the
* value of the content attribute must be returned instead, converted to a
* USVString. On setting, the content attribute must be set to the specified
* new value."
*
* Also HTMLHyperLinkElementUtils href, used by a.href and area.href
*/
"url": {
"jsType": "string",
@ -197,31 +175,6 @@ ReflectionTests.typeMap = {
"domExpected": ReflectionTests.resolveUrl,
"idlIdlExpected": ReflectionTests.resolveUrl
},
/**
* "If a reflecting IDL attribute is a DOMString attribute whose content
* attribute is defined to contain one or more URLs, then on getting, the
* IDL attribute must split the content attribute on spaces and return the
* concatenation of resolving each token URL to an absolute URL relative to
* the element, with a single U+0020 SPACE character between each URL,
* ignoring any tokens that did not resolve successfully. If the content
* attribute is absent, the IDL attribute must return the default value, if
* the content attribute has one, or else the empty string. On setting, the
* IDL attribute must set the content attribute to the specified literal
* value."
*
* Seems to only be used for ping.
*/
"urls": {
"jsType": "string",
"defaultVal": "",
"domTests": ["", " foo ", "http://site.example/ foo bar baz",
"//site.example/path???@#l", binaryString, undefined, 7, 1.5, true,
false, {"test": 6}, NaN, +Infinity, -Infinity, "\0", null,
{"toString":function(){return "test-toString";}},
{"valueOf":function(){return "test-valueOf";}, toString:null}],
"domExpected": ReflectionTests.urlsExpected,
"idlIdlExpected": ReflectionTests.urlsExpected
},
/**
* "If a reflecting IDL attribute is a DOMString whose content attribute is
* an enumerated attribute, and the IDL attribute is limited to only known