Skip to content

Commit

Permalink
Update web-platform-tests to revision 0d9238c8062f05a55898a0cb60dc0c3…
Browse files Browse the repository at this point in the history
…53794d87a
  • Loading branch information
jgraham committed Jan 21, 2016
1 parent c80fa33 commit 7e8624d
Show file tree
Hide file tree
Showing 57 changed files with 5,288 additions and 264 deletions.
134 changes: 129 additions & 5 deletions tests/wpt/metadata/MANIFEST.json
Expand Up @@ -3225,6 +3225,14 @@
"path": "touch-events/single-touch-manual.html",
"url": "/touch-events/single-touch-manual.html"
},
{
"path": "uievents/order-of-events/mouse-events/click-on-body-manual.html",
"url": "/uievents/order-of-events/mouse-events/click-on-body-manual.html"
},
{
"path": "uievents/order-of-events/mouse-events/click-on-html-manual.html",
"url": "/uievents/order-of-events/mouse-events/click-on-html-manual.html"
},
{
"path": "uievents/order-of-events/mouse-events/mouseevents-mousemove-manual.htm",
"url": "/uievents/order-of-events/mouse-events/mouseevents-mousemove-manual.htm"
Expand Down Expand Up @@ -4669,6 +4677,16 @@
],
"url": "/html/rendering/non-replaced-elements/lists/ol-type-unsupported-disc.html"
},
{
"path": "html/rendering/non-replaced-elements/lists/ol-type-unsupported-invalid.html",
"references": [
[
"/html/rendering/non-replaced-elements/lists/ol-type-unsupported-ref.html",
"=="
]
],
"url": "/html/rendering/non-replaced-elements/lists/ol-type-unsupported-invalid.html"
},
{
"path": "html/rendering/non-replaced-elements/lists/ol-type-unsupported-lower-alpha.html",
"references": [
Expand Down Expand Up @@ -4769,6 +4787,16 @@
],
"url": "/html/rendering/non-replaced-elements/lists/ul-type-unsupported-decimal.html"
},
{
"path": "html/rendering/non-replaced-elements/lists/ul-type-unsupported-invalid.html",
"references": [
[
"/html/rendering/non-replaced-elements/lists/ul-type-unsupported-ref.html",
"=="
]
],
"url": "/html/rendering/non-replaced-elements/lists/ul-type-unsupported-invalid.html"
},
{
"path": "html/rendering/non-replaced-elements/lists/ul-type-unsupported-lower-alpha.html",
"references": [
Expand Down Expand Up @@ -19055,6 +19083,10 @@
"path": "html/syntax/serializing-html-fragments/outerHTML.html",
"url": "/html/syntax/serializing-html-fragments/outerHTML.html"
},
{
"path": "html/syntax/serializing-xml-fragments/outerHTML.html",
"url": "/html/syntax/serializing-xml-fragments/outerHTML.html"
},
{
"path": "html/webappapis/animation-frames/callback-exception.html",
"url": "/html/webappapis/animation-frames/callback-exception.html"
Expand Down Expand Up @@ -21328,12 +21360,20 @@
"url": "/old-tests/submission/Opera/script_scheduling/105.html"
},
{
"path": "old-tests/submission/Opera/script_scheduling/106.html",
"url": "/old-tests/submission/Opera/script_scheduling/106.html"
"path": "old-tests/submission/Opera/script_scheduling/106-import.html",
"url": "/old-tests/submission/Opera/script_scheduling/106-import.html"
},
{
"path": "old-tests/submission/Opera/script_scheduling/106-noimport.html",
"url": "/old-tests/submission/Opera/script_scheduling/106-noimport.html"
},
{
"path": "old-tests/submission/Opera/script_scheduling/107.html",
"url": "/old-tests/submission/Opera/script_scheduling/107.html"
"path": "old-tests/submission/Opera/script_scheduling/107-import.html",
"url": "/old-tests/submission/Opera/script_scheduling/107-import.html"
},
{
"path": "old-tests/submission/Opera/script_scheduling/107-noimport.html",
"url": "/old-tests/submission/Opera/script_scheduling/107-noimport.html"
},
{
"path": "old-tests/submission/Opera/script_scheduling/108.html",
Expand Down Expand Up @@ -26755,6 +26795,58 @@
"path": "shadow-dom/untriaged/user-interaction/ranges-and-selections/test-002.html",
"url": "/shadow-dom/untriaged/user-interaction/ranges-and-selections/test-002.html"
},
{
"path": "streams/byte-length-queuing-strategy.https.html",
"url": "/streams/byte-length-queuing-strategy.https.html"
},
{
"path": "streams/count-queuing-strategy.https.html",
"url": "/streams/count-queuing-strategy.https.html"
},
{
"path": "streams/readable-streams/bad-strategies.https.html",
"url": "/streams/readable-streams/bad-strategies.https.html"
},
{
"path": "streams/readable-streams/bad-underlying-sources.https.html",
"url": "/streams/readable-streams/bad-underlying-sources.https.html"
},
{
"path": "streams/readable-streams/brand-checks.https.html",
"url": "/streams/readable-streams/brand-checks.https.html"
},
{
"path": "streams/readable-streams/cancel.https.html",
"url": "/streams/readable-streams/cancel.https.html"
},
{
"path": "streams/readable-streams/count-queuing-strategy-integration.https.html",
"url": "/streams/readable-streams/count-queuing-strategy-integration.https.html"
},
{
"path": "streams/readable-streams/garbage-collection.https.html",
"url": "/streams/readable-streams/garbage-collection.https.html"
},
{
"path": "streams/readable-streams/general.https.html",
"url": "/streams/readable-streams/general.https.html"
},
{
"path": "streams/readable-streams/pipe-through.https.html",
"url": "/streams/readable-streams/pipe-through.https.html"
},
{
"path": "streams/readable-streams/readable-stream-reader.https.html",
"url": "/streams/readable-streams/readable-stream-reader.https.html"
},
{
"path": "streams/readable-streams/tee.https.html",
"url": "/streams/readable-streams/tee.https.html"
},
{
"path": "streams/readable-streams/templated.https.html",
"url": "/streams/readable-streams/templated.https.html"
},
{
"path": "svg/interfaces.html",
"url": "/svg/interfaces.html"
Expand Down Expand Up @@ -26951,10 +27043,18 @@
"path": "web-animations/animation-timeline/idlharness.html",
"url": "/web-animations/animation-timeline/idlharness.html"
},
{
"path": "web-animations/animation/constructor.html",
"url": "/web-animations/animation/constructor.html"
},
{
"path": "web-animations/keyframe-effect/constructor.html",
"url": "/web-animations/keyframe-effect/constructor.html"
},
{
"path": "web-animations/keyframe-effect/getComputedTiming.html",
"url": "/web-animations/keyframe-effect/getComputedTiming.html"
},
{
"path": "webaudio/the-audio-api/the-audiobuffer-interface/idl-test.html",
"url": "/webaudio/the-audio-api/the-audiobuffer-interface/idl-test.html"
Expand Down Expand Up @@ -35436,6 +35536,18 @@
"url": "/html/rendering/non-replaced-elements/lists/ol-type-unsupported-disc.html"
}
],
"html/rendering/non-replaced-elements/lists/ol-type-unsupported-invalid.html": [
{
"path": "html/rendering/non-replaced-elements/lists/ol-type-unsupported-invalid.html",
"references": [
[
"/html/rendering/non-replaced-elements/lists/ol-type-unsupported-ref.html",
"=="
]
],
"url": "/html/rendering/non-replaced-elements/lists/ol-type-unsupported-invalid.html"
}
],
"html/rendering/non-replaced-elements/lists/ol-type-unsupported-lower-alpha.html": [
{
"path": "html/rendering/non-replaced-elements/lists/ol-type-unsupported-lower-alpha.html",
Expand Down Expand Up @@ -35556,6 +35668,18 @@
"url": "/html/rendering/non-replaced-elements/lists/ul-type-unsupported-decimal.html"
}
],
"html/rendering/non-replaced-elements/lists/ul-type-unsupported-invalid.html": [
{
"path": "html/rendering/non-replaced-elements/lists/ul-type-unsupported-invalid.html",
"references": [
[
"/html/rendering/non-replaced-elements/lists/ul-type-unsupported-ref.html",
"=="
]
],
"url": "/html/rendering/non-replaced-elements/lists/ul-type-unsupported-invalid.html"
}
],
"html/rendering/non-replaced-elements/lists/ul-type-unsupported-lower-alpha.html": [
{
"path": "html/rendering/non-replaced-elements/lists/ul-type-unsupported-lower-alpha.html",
Expand Down Expand Up @@ -39301,7 +39425,7 @@
}
]
},
"rev": "78862c14a70cabb48c685144666912f08e726390",
"rev": "0d9238c8062f05a55898a0cb60dc0c353794d87a",
"url_base": "/",
"version": 2
}
2 changes: 1 addition & 1 deletion tests/wpt/metadata/mozilla-sync
@@ -1 +1 @@
ce0b89d310212aaaa66b759c7c2548fb2f9a2738
8a1d0a8f3e4206c98f35a4bba98fc26237c1f906
116 changes: 116 additions & 0 deletions tests/wpt/web-platform-tests/dom/nodes/attributes.html
Expand Up @@ -465,6 +465,60 @@
assert_throws("INUSE_ATTRIBUTE_ERR", function(){el2.setAttributeNode(attrNode)});
}, "setAttributeNode on bound attribute should throw InUseAttributeError")

// Have to use an async_test to see what a DOMAttrModified listener sees,
// because otherwise the event dispatch code will swallow our exceptions. And
// we want to make sure this test always happens, even when no mutation events
// run.
var setAttributeNode_mutation_test = async_test("setAttributeNode, if it fires mutation events, should fire one with the new node when resetting an existing attribute");

test(function(){
var el = document.createElement("div")
var attrNode1 = document.createAttribute("foo");
attrNode1.value = "bar";
el.setAttributeNode(attrNode1);
var attrNode2 = document.createAttribute("foo");
attrNode2.value = "baz";

el.addEventListener("DOMAttrModified", function(e) {
// If this never gets called, that's OK, I guess. But if it gets called, it
// better represent a single modification with attrNode2 as the relatedNode.
// We have to do an inner test() call here, because otherwise the exceptions
// our asserts trigger will get swallowed by the event dispatch code.
setAttributeNode_mutation_test.step(function() {
assert_equals(e.attrName, "foo");
assert_equals(e.attrChange, MutationEvent.MODIFICATION);
assert_equals(e.prevValue, "bar");
assert_equals(e.newValue, "baz");
assert_equals(e.relatedNode, attrNode2);
});
});

var oldNode = el.setAttributeNode(attrNode2);
assert_equals(oldNode, attrNode1,
"Must return the old attr node from a setAttributeNode call");
}, "setAttributeNode, if it fires mutation events, should fire one with the new node when resetting an existing attribute (outer shell)");
setAttributeNode_mutation_test.done();

test(function(){
var el = document.createElement("div")
el.setAttribute("a", "b");
el.setAttribute("c", "d");

assert_array_equals(Array.prototype.map.call(el.attributes, function(a) { return a.name }),
["a", "c"]);
assert_array_equals(Array.prototype.map.call(el.attributes, function(a) { return a.value }),
["b", "d"]);

var attrNode = document.createAttribute("a");
attrNode.value = "e";
el.setAttributeNode(attrNode);

assert_array_equals(Array.prototype.map.call(el.attributes, function(a) { return a.name }),
["a", "c"]);
assert_array_equals(Array.prototype.map.call(el.attributes, function(a) { return a.value }),
["e", "d"]);
}, "setAttributeNode called with an Attr that has the same name as an existing one should not change attribute order");

test(function() {
var el = document.createElement("div");
el.setAttribute("foo", "bar");
Expand Down Expand Up @@ -537,6 +591,10 @@
["0", "1", "2"])
assert_array_equals(Object.getOwnPropertyNames(el.attributes),
["0", "1", "2", "a", "b"])
for (var propName of Object.getOwnPropertyNames(el.attributes)) {
assert_true(el.attributes[propName] instanceof Attr,
"el.attributes has an Attr for property name " + propName);
}
}, "Own property correctness with non-namespaced attribute before same-name namespaced one");

test(function() {
Expand All @@ -550,6 +608,10 @@
["0", "1", "2"])
assert_array_equals(Object.getOwnPropertyNames(el.attributes),
["0", "1", "2", "a", "b"])
for (var propName of Object.getOwnPropertyNames(el.attributes)) {
assert_true(el.attributes[propName] instanceof Attr,
"el.attributes has an Attr for property name " + propName);
}
}, "Own property correctness with namespaced attribute before same-name non-namespaced one");

test(function() {
Expand All @@ -563,5 +625,59 @@
["0", "1", "2"])
assert_array_equals(Object.getOwnPropertyNames(el.attributes),
["0", "1", "2", "a:b", "c:d"])
for (var propName of Object.getOwnPropertyNames(el.attributes)) {
assert_true(el.attributes[propName] instanceof Attr,
"el.attributes has an Attr for property name " + propName);
}
}, "Own property correctness with two namespaced attributes with the same name-with-prefix");

test(function() {
var el = document.createElement("div");
el.setAttributeNS("foo", "A:B", "");
el.setAttributeNS("bar", "c:D", "");
el.setAttributeNS("baz", "e:F", "");
el.setAttributeNS("qux", "g:h", "");
el.setAttributeNS("", "I", "");
el.setAttributeNS("", "j", "");
assert_array_equals(Object.getOwnPropertyNames(el.attributes),
["0", "1", "2", "3", "4", "5", "g:h", "j"])
for (var propName of Object.getOwnPropertyNames(el.attributes)) {
assert_true(el.attributes[propName] instanceof Attr,
"el.attributes has an Attr for property name " + propName);
}
}, "Own property names should only include all-lowercase qualified names for an HTML element in an HTML document");

test(function() {
var el = document.createElementNS("", "div");
el.setAttributeNS("foo", "A:B", "");
el.setAttributeNS("bar", "c:D", "");
el.setAttributeNS("baz", "e:F", "");
el.setAttributeNS("qux", "g:h", "");
el.setAttributeNS("", "I", "");
el.setAttributeNS("", "j", "");
assert_array_equals(Object.getOwnPropertyNames(el.attributes),
["0", "1", "2", "3", "4", "5", "A:B", "c:D", "e:F", "g:h", "I", "j"])
for (var propName of Object.getOwnPropertyNames(el.attributes)) {
assert_true(el.attributes[propName] instanceof Attr,
"el.attributes has an Attr for property name " + propName);
}
}, "Own property names should include all qualified names for a non-HTML element in an HTML document");

test(function() {
var doc = document.implementation.createDocument(null, "");
assert_equals(doc.contentType, "application/xml");
var el = doc.createElementNS("http://www.w3.org/1999/xhtml", "div");
el.setAttributeNS("foo", "A:B", "");
el.setAttributeNS("bar", "c:D", "");
el.setAttributeNS("baz", "e:F", "");
el.setAttributeNS("qux", "g:h", "");
el.setAttributeNS("", "I", "");
el.setAttributeNS("", "j", "");
assert_array_equals(Object.getOwnPropertyNames(el.attributes),
["0", "1", "2", "3", "4", "5", "A:B", "c:D", "e:F", "g:h", "I", "j"])
for (var propName of Object.getOwnPropertyNames(el.attributes)) {
assert_true(el.attributes[propName] instanceof Attr,
"el.attributes has an Attr for property name " + propName);
}
}, "Own property names should include all qualified names for an HTML element in a non-HTML document");
</script>
Expand Up @@ -77,5 +77,17 @@
iframe.setAttribute("srcdoc", "<p>foobar</p>");
document.body.appendChild(iframe);
}, "The fallback base URL of an iframe srcdoc document is the document base URL of the document's browsing context's browsing context container's document.");

async_test(function () {
var iframe = document.createElement("iframe");
iframe.onload = this.step_func_done(function () {
var doc = iframe.contentDocument;
assert_resolve_url(doc, location.href.replace("/document-base-url.html", "/sub"));
assert_equals(doc.baseURI, document.baseURI.replace("/document-base-url.html", "/sub/"),
"The srcdoc document's base URL should be set by the <base> tag.");
});
iframe.setAttribute("srcdoc", "<base href='sub/'><p>foobar</p>");
document.body.appendChild(iframe);
}, "The base URL of an iframe srcdoc document with a <base> tag should be set by that tag.");
</script>
</body>
@@ -0,0 +1,6 @@
<!doctype html>
<meta charset=utf-8>
<title>ol@type: unsupported type: invalid</title>
<link rel=match href=ol-type-unsupported-ref.html>
<ol type=disk><li>1<li>2</ol>
<ol type=DISK><li>1<li>2</ol>
@@ -0,0 +1,7 @@
<!doctype html>
<meta charset=utf-8>
<title>ul@type: unsupported type: invalid</title>
<link rel=match href=ul-type-unsupported-ref.html>
<ul type=disk><li>first item</li><li>second item</li></ul>
<ul type=DISK><li>first item</li><li>second item</li></ul>
<ul type=x><li>first item</li><li>second item</li></ul>

0 comments on commit 7e8624d

Please sign in to comment.