<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[196079] trunk/LayoutTests/imported/w3c</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/196079">196079</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-02-03 13:54:36 -0800 (Wed, 03 Feb 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Re-sync W3C DOM web-platform-tests
https://bugs.webkit.org/show_bug.cgi?id=153831
Reviewed by Darin Adler.
Re-sync W3C DOM web-platform-tests from:
https://github.com/w3c/web-platform-tests/tree/master/dom
* web-platform-tests/dom/collections/domstringmap-supported-property-names-expected.txt: Added.
* web-platform-tests/dom/collections/domstringmap-supported-property-names.html: Added.
* web-platform-tests/dom/collections/namednodemap-supported-property-names-expected.txt: Added.
* web-platform-tests/dom/collections/namednodemap-supported-property-names.html: Added.
* web-platform-tests/dom/collections/w3c-import.log:
* web-platform-tests/dom/events/Event-dispatch-propagation-stopped-expected.txt: Added.
* web-platform-tests/dom/events/Event-dispatch-propagation-stopped.html: Added.
* web-platform-tests/dom/events/w3c-import.log:
* web-platform-tests/dom/historical-expected.txt:
* web-platform-tests/dom/historical.html:
* web-platform-tests/dom/interface-objects-expected.txt:
* web-platform-tests/dom/interface-objects.html:
* web-platform-tests/dom/interfaces-expected.txt:
* web-platform-tests/dom/interfaces.html:
* web-platform-tests/dom/nodes/DOMImplementation-createDocument-expected.txt:
* web-platform-tests/dom/nodes/DOMImplementation-createDocument.html:
* web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.html: Added.
* web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.svg: Added.
* web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.xhtml: Added.
* web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.xml: Added.
* web-platform-tests/dom/nodes/Element-classlist-expected.txt:
* web-platform-tests/dom/nodes/Element-classlist.html:
* web-platform-tests/dom/nodes/Node-contains-xhtml-expected.txt: Added.
* web-platform-tests/dom/nodes/Node-contains-xhtml.xhtml: Added.
* web-platform-tests/dom/nodes/Node-isEqualNode-expected.txt:
* web-platform-tests/dom/nodes/Node-isEqualNode-xhtml-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode-expected.txt.
* web-platform-tests/dom/nodes/Node-isEqualNode-xhtml.xhtml: Renamed from LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode.xhtml.
* web-platform-tests/dom/nodes/Node-isEqualNode.html: Added.
* web-platform-tests/dom/nodes/attributes-expected.txt:
* web-platform-tests/dom/nodes/attributes.html:
* web-platform-tests/dom/nodes/w3c-import.log:
* web-platform-tests/dom/ranges/Range-constructor-expected.txt: Added.
* web-platform-tests/dom/ranges/Range-constructor.html: Added.
* web-platform-tests/dom/ranges/w3c-import.log:
* web-platform-tests/dom/w3c-import.log:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdomcollectionsw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/collections/w3c-import.log</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdomeventsw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/w3c-import.log</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdomhistoricalexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/historical-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdomhistoricalhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/historical.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdominterfaceobjectsexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interface-objects-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdominterfaceobjectshtml">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interface-objects.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdominterfacesexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdominterfaceshtml">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdomnodesDOMImplementationcreateDocumentexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/DOMImplementation-createDocument-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdomnodesDOMImplementationcreateDocumenthtml">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/DOMImplementation-createDocument.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdomnodesElementclasslistexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-classlist-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdomnodesElementclasslisthtml">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-classlist.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdomnodesNodeisEqualNodeexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdomnodesattributesexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/attributes-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdomnodesattributeshtml">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/attributes.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdomnodesw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/w3c-import.log</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdomrangesw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/ranges/w3c-import.log</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdomcollectionsdomstringmapsupportedpropertynamesexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/collections/domstringmap-supported-property-names-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdomcollectionsdomstringmapsupportedpropertynameshtml">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/collections/domstringmap-supported-property-names.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdomcollectionsnamednodemapsupportedpropertynamesexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/collections/namednodemap-supported-property-names-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdomcollectionsnamednodemapsupportedpropertynameshtml">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/collections/namednodemap-supported-property-names.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdomeventsEventdispatchpropagationstoppedexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-propagation-stopped-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdomeventsEventdispatchpropagationstoppedhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-propagation-stopped.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdomnodesNodecontainsxhtmlexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-contains-xhtml-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdomnodesNodecontainsxhtmlxhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-contains-xhtml.xhtml</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdomnodesNodeisEqualNodexhtmlexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode-xhtml-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdomnodesNodeisEqualNodexhtmlxhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode-xhtml.xhtml</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdomnodesNodeisEqualNodehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdomrangesRangeconstructorexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/ranges/Range-constructor-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdomrangesRangeconstructorhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/ranges/Range-constructor.html</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdomnodesNodeisEqualNodexhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode.xhtml</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (196078 => 196079)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2016-02-03 21:26:33 UTC (rev 196078)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2016-02-03 21:54:36 UTC (rev 196079)
</span><span class="lines">@@ -1,3 +1,49 @@
</span><ins>+2016-02-03 Chris Dumez <cdumez@apple.com>
+
+ Re-sync W3C DOM web-platform-tests
+ https://bugs.webkit.org/show_bug.cgi?id=153831
+
+ Reviewed by Darin Adler.
+
+ Re-sync W3C DOM web-platform-tests from:
+ https://github.com/w3c/web-platform-tests/tree/master/dom
+
+ * web-platform-tests/dom/collections/domstringmap-supported-property-names-expected.txt: Added.
+ * web-platform-tests/dom/collections/domstringmap-supported-property-names.html: Added.
+ * web-platform-tests/dom/collections/namednodemap-supported-property-names-expected.txt: Added.
+ * web-platform-tests/dom/collections/namednodemap-supported-property-names.html: Added.
+ * web-platform-tests/dom/collections/w3c-import.log:
+ * web-platform-tests/dom/events/Event-dispatch-propagation-stopped-expected.txt: Added.
+ * web-platform-tests/dom/events/Event-dispatch-propagation-stopped.html: Added.
+ * web-platform-tests/dom/events/w3c-import.log:
+ * web-platform-tests/dom/historical-expected.txt:
+ * web-platform-tests/dom/historical.html:
+ * web-platform-tests/dom/interface-objects-expected.txt:
+ * web-platform-tests/dom/interface-objects.html:
+ * web-platform-tests/dom/interfaces-expected.txt:
+ * web-platform-tests/dom/interfaces.html:
+ * web-platform-tests/dom/nodes/DOMImplementation-createDocument-expected.txt:
+ * web-platform-tests/dom/nodes/DOMImplementation-createDocument.html:
+ * web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.html: Added.
+ * web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.svg: Added.
+ * web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.xhtml: Added.
+ * web-platform-tests/dom/nodes/Document-createElement-namespace-tests/empty.xml: Added.
+ * web-platform-tests/dom/nodes/Element-classlist-expected.txt:
+ * web-platform-tests/dom/nodes/Element-classlist.html:
+ * web-platform-tests/dom/nodes/Node-contains-xhtml-expected.txt: Added.
+ * web-platform-tests/dom/nodes/Node-contains-xhtml.xhtml: Added.
+ * web-platform-tests/dom/nodes/Node-isEqualNode-expected.txt:
+ * web-platform-tests/dom/nodes/Node-isEqualNode-xhtml-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode-expected.txt.
+ * web-platform-tests/dom/nodes/Node-isEqualNode-xhtml.xhtml: Renamed from LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode.xhtml.
+ * web-platform-tests/dom/nodes/Node-isEqualNode.html: Added.
+ * web-platform-tests/dom/nodes/attributes-expected.txt:
+ * web-platform-tests/dom/nodes/attributes.html:
+ * web-platform-tests/dom/nodes/w3c-import.log:
+ * web-platform-tests/dom/ranges/Range-constructor-expected.txt: Added.
+ * web-platform-tests/dom/ranges/Range-constructor.html: Added.
+ * web-platform-tests/dom/ranges/w3c-import.log:
+ * web-platform-tests/dom/w3c-import.log:
+
</ins><span class="cx"> 2016-02-01 Chris Dumez <cdumez@apple.com>
</span><span class="cx">
</span><span class="cx"> Native Bindings Descriptors are Incomplete
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdomcollectionsdomstringmapsupportedpropertynamesexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/collections/domstringmap-supported-property-names-expected.txt (0 => 196079)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/collections/domstringmap-supported-property-names-expected.txt         (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/collections/domstringmap-supported-property-names-expected.txt        2016-02-03 21:54:36 UTC (rev 196079)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+Simple
+Simple
+John Doe
+Jane Doe
+Jim Doe
+
+PASS Object.getOwnPropertyNames on DOMStringMap, empty data attribute
+PASS Object.getOwnPropertyNames on DOMStringMap, data attribute trailing hyphen
+PASS Object.getOwnPropertyNames on DOMStringMap, multiple data attributes
+PASS Object.getOwnPropertyNames on DOMStringMap, attribute set on dataset in JS
+PASS Object.getOwnPropertyNames on DOMStringMap, attribute set on element in JS
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdomcollectionsdomstringmapsupportedpropertynameshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/collections/domstringmap-supported-property-names.html (0 => 196079)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/collections/domstringmap-supported-property-names.html         (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/collections/domstringmap-supported-property-names.html        2016-02-03 21:54:36 UTC (rev 196079)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+<!DOCTYPE HTML>
+<meta charset=utf-8>
+<title>DOMStringMap Test: Supported property names</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<div id="log"></div>
+
+<div id="edge1" data-="012">Simple</div>
+
+<div id="edge2" data-id-="012">Simple</div>
+
+<div id="user" data-id="1234567890" data-user="johndoe" data-date-of-birth>
+ John Doe
+</div>
+
+<div id="user2" data-unique-id="1234567890"> Jane Doe </div>
+
+<div id="user3" data-unique-id="4324324241"> Jim Doe </div>
+
+<script>
+
+test(function() {
+ var element = document.querySelector('#edge1');
+ assert_array_equals(Object.getOwnPropertyNames(element.dataset),
+ [""]);
+}, "Object.getOwnPropertyNames on DOMStringMap, empty data attribute");
+
+test(function() {
+ var element = document.querySelector('#edge2');
+ assert_array_equals(Object.getOwnPropertyNames(element.dataset),
+ ["id-"]);
+}, "Object.getOwnPropertyNames on DOMStringMap, data attribute trailing hyphen");
+
+test(function() {
+ var element = document.querySelector('#user');
+ assert_array_equals(Object.getOwnPropertyNames(element.dataset),
+ ['id', 'user', 'dateOfBirth']);
+}, "Object.getOwnPropertyNames on DOMStringMap, multiple data attributes");
+
+test(function() {
+ var element = document.querySelector('#user2');
+ element.dataset.middleName = "mark";
+ assert_array_equals(Object.getOwnPropertyNames(element.dataset),
+ ['uniqueId', 'middleName']);
+}, "Object.getOwnPropertyNames on DOMStringMap, attribute set on dataset in JS");
+
+test(function() {
+ var element = document.querySelector('#user3');
+ element.setAttribute("data-age", 30);
+ assert_array_equals(Object.getOwnPropertyNames(element.dataset),
+ ['uniqueId', 'age']);
+}, "Object.getOwnPropertyNames on DOMStringMap, attribute set on element in JS");
+
+</script>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdomcollectionsnamednodemapsupportedpropertynamesexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/collections/namednodemap-supported-property-names-expected.txt (0 => 196079)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/collections/namednodemap-supported-property-names-expected.txt         (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/collections/namednodemap-supported-property-names-expected.txt        2016-02-03 21:54:36 UTC (rev 196079)
</span><span class="lines">@@ -0,0 +1,7 @@
</span><ins>+Simple
+
+
+FAIL Object.getOwnPropertyNames on NamedNodeMap assert_array_equals: lengths differ, expected 4 got 3
+FAIL Object.getOwnPropertyNames on NamedNodeMap of input assert_array_equals: lengths differ, expected 8 got 5
+FAIL Object.getOwnPropertyNames on NamedNodeMap after attribute removal assert_array_equals: lengths differ, expected 6 got 4
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdomcollectionsnamednodemapsupportedpropertynameshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/collections/namednodemap-supported-property-names.html (0 => 196079)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/collections/namednodemap-supported-property-names.html         (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/collections/namednodemap-supported-property-names.html        2016-02-03 21:54:36 UTC (rev 196079)
</span><span class="lines">@@ -0,0 +1,30 @@
</span><ins>+<!DOCTYPE HTML>
+<meta charset=utf-8>
+<title>NamedNodeMap Test: Supported property names</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<div id="log"></div>
+<div id="simple" class="fancy">Simple</div>
+<input id="result" type="text" value="" width="200px">
+<script>
+
+test(function() {
+ var elt = document.querySelector('#simple');
+ assert_array_equals(Object.getOwnPropertyNames(elt.attributes),
+ ['0','1','id','class']);
+}, "Object.getOwnPropertyNames on NamedNodeMap");
+
+test(function() {
+ var result = document.getElementById("result");
+ assert_array_equals(Object.getOwnPropertyNames(result.attributes),
+ ['0','1','2','3','id','type','value','width']);
+}, "Object.getOwnPropertyNames on NamedNodeMap of input");
+
+test(function() {
+ var result = document.getElementById("result");
+ result.removeAttribute("width");
+ assert_array_equals(Object.getOwnPropertyNames(result.attributes),
+ ['0','1','2','id','type','value']);
+}, "Object.getOwnPropertyNames on NamedNodeMap after attribute removal");
+
+</script>
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdomcollectionsw3cimportlog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/collections/w3c-import.log (196078 => 196079)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/collections/w3c-import.log        2016-02-03 21:26:33 UTC (rev 196078)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/collections/w3c-import.log        2016-02-03 21:54:36 UTC (rev 196079)
</span><span class="lines">@@ -17,3 +17,5 @@
</span><span class="cx"> List of files:
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/dom/collections/HTMLCollection-empty-name.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/dom/collections/HTMLCollection-supported-property-names.html
</span><ins>+/LayoutTests/imported/w3c/web-platform-tests/dom/collections/domstringmap-supported-property-names.html
+/LayoutTests/imported/w3c/web-platform-tests/dom/collections/namednodemap-supported-property-names.html
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdomeventsEventdispatchpropagationstoppedexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-propagation-stopped-expected.txt (0 => 196079)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-propagation-stopped-expected.txt         (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-propagation-stopped-expected.txt        2016-02-03 21:54:36 UTC (rev 196079)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+PASS Calling stopPropagation() prior to dispatchEvent()
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdomeventsEventdispatchpropagationstoppedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-propagation-stopped.html (0 => 196079)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-propagation-stopped.html         (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-propagation-stopped.html        2016-02-03 21:54:36 UTC (rev 196079)
</span><span class="lines">@@ -0,0 +1,59 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+<title> Calling stopPropagation() prior to dispatchEvent() </title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+<div id=log></div>
+
+<table id="table" border="1" style="display: none">
+ <tbody id="table-body">
+ <tr id="table-row">
+ <td id="table-cell">Shady Grove</td>
+ <td>Aeolian</td>
+ </tr>
+ <tr id="parent">
+ <td id="target">Over the river, Charlie</td>
+ <td>Dorian</td>
+ </tr>
+ </tbody>
+</table>
+
+<script>
+test(function() {
+ var event = "foo";
+ var target = document.getElementById("target");
+ var parent = document.getElementById("parent");
+ var tbody = document.getElementById("table-body");
+ var table = document.getElementById("table");
+ var body = document.body;
+ var html = document.documentElement;
+ var current_targets = [window, document, html, body, table, tbody, parent, target];
+ var expected_targets = [];
+ var actual_targets = [];
+ var expected_phases = [];
+ var actual_phases = [];
+
+ var test_event = function(evt) {
+ actual_targets.push(evt.currentTarget);
+ actual_phases.push(evt.eventPhase);
+ };
+
+ for (var i = 0; i < current_targets.length; ++i) {
+ current_targets[i].addEventListener(event, test_event, true);
+ current_targets[i].addEventListener(event, test_event, false);
+ }
+
+ var evt = document.createEvent("Event");
+ evt.initEvent(event, true, true);
+ evt.stopPropagation();
+ target.dispatchEvent(evt);
+
+ assert_array_equals(actual_targets, expected_targets, "actual_targets");
+ assert_array_equals(actual_phases, expected_phases, "actual_phases");
+});
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdomeventsw3cimportlog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/w3c-import.log (196078 => 196079)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/w3c-import.log        2016-02-03 21:26:33 UTC (rev 196078)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/events/w3c-import.log        2016-02-03 21:54:36 UTC (rev 196079)
</span><span class="lines">@@ -21,6 +21,7 @@
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-bubbles-false.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-handlers-changed.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-omitted-capture.html
</span><ins>+/LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-propagation-stopped.html
</ins><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-redispatch.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-reenter.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/dom/events/Event-dispatch-target-moved.html
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdomhistoricalexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/historical-expected.txt (196078 => 196079)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/historical-expected.txt        2016-02-03 21:26:33 UTC (rev 196078)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/historical-expected.txt        2016-02-03 21:54:36 UTC (rev 196079)
</span><span class="lines">@@ -7,6 +7,7 @@
</span><span class="cx"> PASS Historical DOM features must be removed: DOMImplementationSource
</span><span class="cx"> PASS Historical DOM features must be removed: DOMLocator
</span><span class="cx"> PASS Historical DOM features must be removed: DOMObject
</span><ins>+FAIL Historical DOM features must be removed: DOMSettableTokenList assert_equals: expected (undefined) undefined but got (object) object "[object DOMSettableTokenListConstructor]"
</ins><span class="cx"> PASS Historical DOM features must be removed: DOMUserData
</span><span class="cx"> PASS Historical DOM features must be removed: Entity
</span><span class="cx"> PASS Historical DOM features must be removed: EntityReference
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdomhistoricalhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/historical.html (196078 => 196079)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/historical.html        2016-02-03 21:26:33 UTC (rev 196078)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/historical.html        2016-02-03 21:54:36 UTC (rev 196079)
</span><span class="lines">@@ -18,6 +18,7 @@
</span><span class="cx"> "DOMImplementationSource",
</span><span class="cx"> "DOMLocator",
</span><span class="cx"> "DOMObject",
</span><ins>+ "DOMSettableTokenList",
</ins><span class="cx"> "DOMUserData",
</span><span class="cx"> "Entity",
</span><span class="cx"> "EntityReference",
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdominterfaceobjectsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interface-objects-expected.txt (196078 => 196079)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interface-objects-expected.txt        2016-02-03 21:26:33 UTC (rev 196078)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interface-objects-expected.txt        2016-02-03 21:54:36 UTC (rev 196079)
</span><span class="lines">@@ -19,7 +19,5 @@
</span><span class="cx"> PASS Should be able to delete NodeFilter.
</span><span class="cx"> PASS Should be able to delete NodeList.
</span><span class="cx"> PASS Should be able to delete HTMLCollection.
</span><del>-PASS Should be able to delete DOMStringList.
</del><span class="cx"> PASS Should be able to delete DOMTokenList.
</span><del>-PASS Should be able to delete DOMSettableTokenList.
</del><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdominterfaceobjectshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interface-objects.html (196078 => 196079)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interface-objects.html        2016-02-03 21:26:33 UTC (rev 196078)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interface-objects.html        2016-02-03 21:54:36 UTC (rev 196079)
</span><span class="lines">@@ -31,9 +31,7 @@
</span><span class="cx"> "NodeFilter",
</span><span class="cx"> "NodeList",
</span><span class="cx"> "HTMLCollection",
</span><del>- "DOMStringList",
- "DOMTokenList",
- "DOMSettableTokenList"
</del><ins>+ "DOMTokenList"
</ins><span class="cx"> ];
</span><span class="cx"> test(function() {
</span><span class="cx"> for (var p in window) {
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdominterfacesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt (196078 => 196079)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt        2016-02-03 21:26:33 UTC (rev 196078)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt        2016-02-03 21:54:36 UTC (rev 196079)
</span><span class="lines">@@ -707,7 +707,7 @@
</span><span class="cx"> PASS Element interface: attribute tagName
</span><span class="cx"> PASS Element interface: attribute id
</span><span class="cx"> PASS Element interface: attribute className
</span><del>-PASS Element interface: attribute classList
</del><ins>+FAIL Element interface: attribute classList assert_equals: setter must be function for PutForwards, Replaceable, or non-readonly attributes expected "function" but got "undefined"
</ins><span class="cx"> PASS Element interface: operation hasAttributes()
</span><span class="cx"> PASS Element interface: attribute attributes
</span><span class="cx"> FAIL Element interface: operation getAttribute(DOMString) assert_equals: property has wrong .length expected 1 but got 0
</span><span class="lines">@@ -1557,6 +1557,9 @@
</span><span class="cx"> PASS DOMTokenList interface: operation add(DOMString)
</span><span class="cx"> PASS DOMTokenList interface: operation remove(DOMString)
</span><span class="cx"> PASS DOMTokenList interface: operation toggle(DOMString,boolean)
</span><ins>+FAIL DOMTokenList interface: operation replace(DOMString,DOMString) assert_own_property: interface prototype object missing non-static operation expected property "replace" missing
+FAIL DOMTokenList interface: operation supports(DOMString) assert_own_property: interface prototype object missing non-static operation expected property "supports" missing
+FAIL DOMTokenList interface: attribute value assert_true: The prototype object must have a property "value" expected true got false
</ins><span class="cx"> FAIL DOMTokenList interface: stringifier assert_true: property is not enumerable expected true got false
</span><span class="cx"> PASS DOMTokenList must be primary interface of document.body.classList
</span><span class="cx"> PASS Stringification of document.body.classList
</span><span class="lines">@@ -1571,10 +1574,9 @@
</span><span class="cx"> PASS DOMTokenList interface: calling remove(DOMString) on document.body.classList with too few arguments must throw TypeError
</span><span class="cx"> PASS DOMTokenList interface: document.body.classList must inherit property "toggle" with the proper type (5)
</span><span class="cx"> PASS DOMTokenList interface: calling toggle(DOMString,boolean) on document.body.classList with too few arguments must throw TypeError
</span><del>-FAIL DOMSettableTokenList interface: existence and properties of interface object assert_equals: class string of DOMSettableTokenList expected "[object Function]" but got "[object DOMSettableTokenListConstructor]"
-PASS DOMSettableTokenList interface object length
-PASS DOMSettableTokenList interface object name
-PASS DOMSettableTokenList interface: existence and properties of interface prototype object
-PASS DOMSettableTokenList interface: existence and properties of interface prototype object's "constructor" property
-PASS DOMSettableTokenList interface: attribute value
</del><ins>+FAIL DOMTokenList interface: document.body.classList must inherit property "replace" with the proper type (6) assert_inherits: property "replace" not found in prototype chain
+FAIL DOMTokenList interface: calling replace(DOMString,DOMString) on document.body.classList with too few arguments must throw TypeError assert_inherits: property "replace" not found in prototype chain
+FAIL DOMTokenList interface: document.body.classList must inherit property "supports" with the proper type (7) assert_inherits: property "supports" not found in prototype chain
+FAIL DOMTokenList interface: calling supports(DOMString) on document.body.classList with too few arguments must throw TypeError assert_inherits: property "supports" not found in prototype chain
+FAIL DOMTokenList interface: document.body.classList must inherit property "value" with the proper type (8) assert_inherits: property "value" not found in prototype chain
</ins><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdominterfaceshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces.html (196078 => 196079)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces.html        2016-02-03 21:26:33 UTC (rev 196078)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces.html        2016-02-03 21:54:36 UTC (rev 196079)
</span><span class="lines">@@ -283,7 +283,7 @@
</span><span class="cx">
</span><span class="cx"> attribute DOMString id;
</span><span class="cx"> attribute DOMString className;
</span><del>- [SameObject] readonly attribute DOMTokenList classList;
</del><ins>+ [SameObject, PutForwards=value] readonly attribute DOMTokenList classList;
</ins><span class="cx">
</span><span class="cx"> boolean hasAttributes();
</span><span class="cx"> [SameObject] readonly attribute NamedNodeMap attributes;
</span><span class="lines">@@ -460,13 +460,12 @@
</span><span class="cx"> void add(DOMString... tokens);
</span><span class="cx"> void remove(DOMString... tokens);
</span><span class="cx"> boolean toggle(DOMString token, optional boolean force);
</span><ins>+ void replace(DOMString token, DOMString newToken);
+ boolean supports(DOMString token);
+ attribute DOMString value;
</ins><span class="cx"> stringifier;
</span><span class="cx"> // iterable<DOMString>;
</span><span class="cx"> };
</span><del>-
-interface DOMSettableTokenList : DOMTokenList {
- attribute DOMString value;
-};
</del><span class="cx"> </script>
</span><span class="cx"> <script>
</span><span class="cx"> "use strict";
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdomnodesDOMImplementationcreateDocumentexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/DOMImplementation-createDocument-expected.txt (196078 => 196079)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/DOMImplementation-createDocument-expected.txt        2016-02-03 21:26:33 UTC (rev 196078)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/DOMImplementation-createDocument-expected.txt        2016-02-03 21:54:36 UTC (rev 196079)
</span><span class="lines">@@ -337,4 +337,6 @@
</span><span class="cx"> PASS createDocument test 178: "foo","bar",DocumentType node,null
</span><span class="cx"> PASS createDocument test 178: metadata for "foo","bar",DocumentType node
</span><span class="cx"> PASS createDocument test 178: characterSet aliases for "foo","bar",DocumentType node
</span><ins>+FAIL createDocument with missing arguments assert_throws: createDocument() should throw function "function () {
+ document.implementation.createDocument(..." did not throw
</ins><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdomnodesDOMImplementationcreateDocumenthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/DOMImplementation-createDocument.html (196078 => 196079)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/DOMImplementation-createDocument.html        2016-02-03 21:26:33 UTC (rev 196078)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/DOMImplementation-createDocument.html        2016-02-03 21:54:36 UTC (rev 196079)
</span><span class="lines">@@ -120,4 +120,14 @@
</span><span class="cx"> }
</span><span class="cx"> })
</span><span class="cx"> })
</span><ins>+
+test(function() {
+ assert_throws(new TypeError(), function() {
+ document.implementation.createDocument()
+ }, "createDocument() should throw")
+
+ assert_throws(new TypeError(), function() {
+ document.implementation.createDocument('')
+ }, "createDocument('') should throw")
+}, "createDocument with missing arguments");
</ins><span class="cx"> </script>
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdomnodesElementclasslistexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-classlist-expected.txt (196078 => 196079)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-classlist-expected.txt        2016-02-03 21:26:33 UTC (rev 196078)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-classlist-expected.txt        2016-02-03 21:54:36 UTC (rev 196079)
</span><span class="lines">@@ -62,5 +62,5 @@
</span><span class="cx"> PASS classList.add should treat \n as a space
</span><span class="cx"> PASS classList.add should treat \f as a space
</span><span class="cx"> PASS classList.length must be read-only
</span><del>-PASS classList must be read-only
</del><ins>+FAIL classList must have [PutForwards=value] assert_equals: expected 2 but got 1
</ins><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdomnodesElementclasslisthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-classlist.html (196078 => 196079)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-classlist.html        2016-02-03 21:26:33 UTC (rev 196078)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Element-classlist.html        2016-02-03 21:54:36 UTC (rev 196079)
</span><span class="lines">@@ -290,15 +290,13 @@
</span><span class="cx"> assert_false(failed,'an error was thrown');
</span><span class="cx"> }, 'classList.length must be read-only');
</span><span class="cx"> test(function () {
</span><del>- var failed = false, realList = secondelem.classList;
- try {
- secondelem.classList = '';
- } catch(e) {
- failed = e;
- }
</del><ins>+ var realList = secondelem.classList;
+ secondelem.classList = 'foo bar';
</ins><span class="cx"> assert_equals(secondelem.classList,realList);
</span><del>- assert_false(failed,'an error was thrown');
-}, 'classList must be read-only');
</del><ins>+ assert_equals(secondelem.classList.length,2);
+ assert_equals(secondelem.classList[0],'foo');
+ assert_equals(secondelem.classList[1],'bar');
+}, 'classList must have [PutForwards=value]');
</ins><span class="cx"> </script>
</span><span class="cx"> </head>
</span><span class="cx"> <body>
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdomnodesNodecontainsxhtmlexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-contains-xhtml-expected.txt (0 => 196079)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-contains-xhtml-expected.txt         (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-contains-xhtml-expected.txt        2016-02-03 21:54:36 UTC (rev 196079)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+ Link text
+
+FAIL Should throw TypeError if the arguments are wrong. assert_throws: function "function () {
+ document.contains();
+ }" did not throw
+PASS contains(null) should be false
+PASS document.contains
+PASS contains with a button
+PASS contains with a text node
+PASS contains with a processing instruction
+FAIL contains with a document fragment NotSupportedError: DOM Exception 9
+PASS contaibs with another document
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdomnodesNodecontainsxhtmlxhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-contains-xhtml.xhtml (0 => 196079)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-contains-xhtml.xhtml         (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-contains-xhtml.xhtml        2016-02-03 21:54:36 UTC (rev 196079)
</span><span class="lines">@@ -0,0 +1,83 @@
</span><ins>+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Node.nodeName</title>
+<link rel="author" title="Olli Pettay" href="mailto:Olli@Pettay.fi"/>
+<link rel="author" title="Ms2ger" href="mailto:Ms2ger@gmail.com"/>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+<div id="log"/>
+<div id="test">
+ <input type="button" id="testbutton"/>
+ <a id="link">Link text</a>
+</div>
+<script>
+<![CDATA[
+test(function() {
+ assert_throws(new TypeError(), function() {
+ document.contains();
+ });
+ assert_throws(new TypeError(), function() {
+ document.contains(9);
+ });
+}, "Should throw TypeError if the arguments are wrong.");
+
+test(function() {
+ assert_equals(document.contains(null), false, "Document shouldn't contain null.");
+}, "contains(null) should be false");
+
+test(function() {
+ assert_equals(document.contains(document), true, "Document should contain itself!");
+ assert_equals(document.contains(document.createElement("foo")), false, "Document shouldn't contain element which is't in the document");
+ assert_equals(document.contains(document.createTextNode("foo")), false, "Document shouldn't contain text node which is't in the document");
+}, "document.contains");
+
+test(function() {
+ var tb = document.getElementById("testbutton");
+ assert_equals(tb.contains(tb), true, "Element should contain itself.")
+ assert_equals(document.contains(tb), true, "Document should contain element in it!");
+ assert_equals(document.documentElement.contains(tb), true, "Element should contain element in it!");
+}, "contains with a button");
+
+test(function() {
+ var link = document.getElementById("link");
+ var text = link.firstChild;
+ assert_equals(document.contains(text), true, "Document should contain a text node in it.");
+ assert_equals(link.contains(text), true, "Element should contain a text node in it.");
+ assert_equals(text.contains(text), true, "Text node should contain itself.");
+ assert_equals(text.contains(link), false, "text node shouldn't contain its parent.");
+}, "contains with a text node");
+
+test(function() {
+ var pi = document.createProcessingInstruction("adf", "asd");
+ assert_equals(pi.contains(document), false, "Processing instruction shouldn't contain document");
+ assert_equals(document.contains(pi), false, "Document shouldn't contain newly created processing instruction");
+ document.documentElement.appendChild(pi);
+ document.contains(pi, true, "Document should contain processing instruction");
+}, "contains with a processing instruction");
+
+test(function() {
+ if ("createContextualFragment" in document.createRange()) {
+ var df = document.createRange().createContextualFragment("<div>foo</div>");
+ assert_equals(df.contains(df.firstChild), true, "Document fragment should contain its child");
+ assert_equals(df.contains(df.firstChild.firstChild), true,
+ "Document fragment should contain its descendant");
+ assert_equals(df.contains(df), true, "Document fragment should contain itself.");
+ }
+}, "contains with a document fragment");
+
+test(function() {
+ var d = document.implementation.createHTMLDocument("");
+ assert_equals(document.contains(d), false,
+ "Document shouldn't contain another document.");
+ assert_equals(document.contains(d.createElement("div")), false,
+ "Document shouldn't contain an element from another document.");
+ assert_equals(document.contains(d.documentElement), false,
+ "Document shouldn't contain an element from another document.");
+}, "contaibs with another document");
+]]>
+</script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdomnodesNodeisEqualNodeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode-expected.txt (196078 => 196079)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode-expected.txt        2016-02-03 21:26:33 UTC (rev 196078)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode-expected.txt        2016-02-03 21:54:36 UTC (rev 196079)
</span><span class="lines">@@ -1,17 +1,11 @@
</span><del>-
</del><span class="cx">
</span><del>-PASS Node.isEqualNode
-PASS Node.isEqualNode 1
-PASS Node.isEqualNode 2
-PASS Node.isEqualNode 3
-PASS Node.isEqualNode 4
-PASS Node.isEqualNode 5
-PASS Node.isEqualNode 6
-PASS isEqualNode should return true when the attributes are in a different order
-PASS isEqualNode should return true if elements have same namespace, prefix, and local name
-PASS isEqualNode should return false if elements have different namespace
-PASS isEqualNode should return false if elements have different prefix
-PASS isEqualNode should return false if elements have different local name
-PASS isEqualNode should return true when the attributes have different prefixes
-PASS isEqualNode should return true when only the internal subsets of DocumentTypes differ.
</del><ins>+PASS doctypes should be compared on name, public ID, and system ID
+PASS elements should be compared on namespace, namespace prefix, local name, and number of attributes
+PASS elements should be compared on attribute namespace, local name, and value
+PASS processing instructions should be compared on target and data
+PASS text nodes should be compared on data
+PASS comments should be compared on data
+PASS document fragments should not be compared based on properties
+FAIL documents should not be compared based on properties assert_true: default HTML documents, created different ways expected true got false
+PASS node equality testing should test descendant equality too
</ins><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdomnodesNodeisEqualNodexhtmlexpectedtxtfromrev196078trunkLayoutTestsimportedw3cwebplatformtestsdomnodesNodeisEqualNodeexpectedtxt"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode-xhtml-expected.txt (from rev 196078, trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode-expected.txt) (0 => 196079)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode-xhtml-expected.txt         (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode-xhtml-expected.txt        2016-02-03 21:54:36 UTC (rev 196079)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+
+
+PASS Node.isEqualNode
+PASS Node.isEqualNode 1
+PASS Node.isEqualNode 2
+PASS Node.isEqualNode 3
+PASS Node.isEqualNode 4
+PASS Node.isEqualNode 5
+PASS Node.isEqualNode 6
+PASS isEqualNode should return true when the attributes are in a different order
+PASS isEqualNode should return true if elements have same namespace, prefix, and local name
+PASS isEqualNode should return false if elements have different namespace
+PASS isEqualNode should return false if elements have different prefix
+PASS isEqualNode should return false if elements have different local name
+PASS isEqualNode should return true when the attributes have different prefixes
+PASS isEqualNode should return true when only the internal subsets of DocumentTypes differ.
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdomnodesNodeisEqualNodexhtmlxhtmlfromrev196078trunkLayoutTestsimportedw3cwebplatformtestsdomnodesNodeisEqualNodexhtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode-xhtml.xhtml (from rev 196078, trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode.xhtml) (0 => 196079)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode-xhtml.xhtml         (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode-xhtml.xhtml        2016-02-03 21:54:36 UTC (rev 196079)
</span><span class="lines">@@ -0,0 +1,84 @@
</span><ins>+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<title>Node.isEqualNode</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+<div id="log"/>
+<script>
+function testNullHandling(node) {
+ test(function() {
+ assert_false(node.isEqualNode(null))
+ assert_false(node.isEqualNode(undefined))
+ })
+}
+[
+ document.createElement("foo"),
+ document.createTextNode("foo"),
+ document.createProcessingInstruction("foo", "bar"),
+ document.createComment("foo"),
+ document,
+ document.implementation.createDocumentType("html", "", ""),
+ document.createDocumentFragment()
+].forEach(testNullHandling)
+
+test(function() {
+ var a = document.createElement("foo")
+ a.setAttribute("a", "bar")
+ a.setAttribute("b", "baz")
+ var b = document.createElement("foo")
+ b.setAttribute("b", "baz")
+ b.setAttribute("a", "bar")
+ assert_true(a.isEqualNode(b))
+}, "isEqualNode should return true when the attributes are in a different order")
+
+test(function() {
+ var a = document.createElementNS("ns", "prefix:foo")
+ var b = document.createElementNS("ns", "prefix:foo")
+ assert_true(a.isEqualNode(b))
+}, "isEqualNode should return true if elements have same namespace, prefix, and local name")
+
+test(function() {
+ var a = document.createElementNS("ns1", "prefix:foo")
+ var b = document.createElementNS("ns2", "prefix:foo")
+ assert_false(a.isEqualNode(b))
+}, "isEqualNode should return false if elements have different namespace")
+
+test(function() {
+ var a = document.createElementNS("ns", "prefix1:foo")
+ var b = document.createElementNS("ns", "prefix2:foo")
+ assert_false(a.isEqualNode(b))
+}, "isEqualNode should return false if elements have different prefix")
+
+test(function() {
+ var a = document.createElementNS("ns", "prefix:foo1")
+ var b = document.createElementNS("ns", "prefix:foo2")
+ assert_false(a.isEqualNode(b))
+}, "isEqualNode should return false if elements have different local name")
+
+test(function() {
+ var a = document.createElement("foo")
+ a.setAttributeNS("ns", "x:a", "bar")
+ var b = document.createElement("foo")
+ b.setAttributeNS("ns", "y:a", "bar")
+ assert_true(a.isEqualNode(b))
+}, "isEqualNode should return true when the attributes have different prefixes")
+var internalSubset = async_test("isEqualNode should return true when only the internal subsets of DocumentTypes differ.")
+var wait = 2;
+function iframeLoaded() {
+ if (!--wait) {
+ internalSubset.step(function() {
+ var doc1 = document.getElementById("subset1").contentDocument
+ var doc2 = document.getElementById("subset2").contentDocument
+ assert_true(doc1.doctype.isEqualNode(doc2.doctype), "doc1.doctype.isEqualNode(doc2.doctype)")
+ assert_true(doc1.isEqualNode(doc2), "doc1.isEqualNode(doc2)")
+ })
+ internalSubset.done()
+ }
+}
+</script>
+<iframe id="subset1" onload="iframeLoaded()" src="Node-isEqualNode-iframe1.xml" />
+<iframe id="subset2" onload="iframeLoaded()" src="Node-isEqualNode-iframe2.xml" />
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdomnodesNodeisEqualNodehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode.html (0 => 196079)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode.html         (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode.html        2016-02-03 21:54:36 UTC (rev 196079)
</span><span class="lines">@@ -0,0 +1,161 @@
</span><ins>+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Node.prototype.isEqualNode</title>
+<link rel=help href="https://dom.spec.whatwg.org/#dom-node-isequalnode">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+
+<script>
+"use strict";
+
+test(function() {
+
+ var doctype1 = document.implementation.createDocumentType("qualifiedName", "publicId", "systemId");
+ var doctype2 = document.implementation.createDocumentType("qualifiedName", "publicId", "systemId");
+ var doctype3 = document.implementation.createDocumentType("qualifiedName2", "publicId", "systemId");
+ var doctype4 = document.implementation.createDocumentType("qualifiedName", "publicId2", "systemId");
+ var doctype5 = document.implementation.createDocumentType("qualifiedName", "publicId", "systemId3");
+
+ assert_true(doctype1.isEqualNode(doctype1), "self-comparison");
+ assert_true(doctype1.isEqualNode(doctype2), "same properties");
+ assert_false(doctype1.isEqualNode(doctype3), "different name");
+ assert_false(doctype1.isEqualNode(doctype4), "different public ID");
+ assert_false(doctype1.isEqualNode(doctype5), "different system ID");
+
+}, "doctypes should be compared on name, public ID, and system ID");
+
+test(function() {
+
+ var element1 = document.createElementNS("namespace", "prefix:localName");
+ var element2 = document.createElementNS("namespace", "prefix:localName");
+ var element3 = document.createElementNS("namespace2", "prefix:localName");
+ var element4 = document.createElementNS("namespace", "prefix2:localName");
+ var element5 = document.createElementNS("namespace", "prefix:localName2");
+
+ var element6 = document.createElementNS("namespace", "prefix:localName");
+ element6.setAttribute("foo", "bar");
+
+ assert_true(element1.isEqualNode(element1), "self-comparison");
+ assert_true(element1.isEqualNode(element2), "same properties");
+ assert_false(element1.isEqualNode(element3), "different namespace");
+ assert_false(element1.isEqualNode(element4), "different prefix");
+ assert_false(element1.isEqualNode(element5), "different local name");
+ assert_false(element1.isEqualNode(element6), "different number of attributes");
+
+}, "elements should be compared on namespace, namespace prefix, local name, and number of attributes");
+
+test(function() {
+
+ var element1 = document.createElement("element");
+ element1.setAttributeNS("namespace", "prefix:localName", "value");
+
+ var element2 = document.createElement("element");
+ element2.setAttributeNS("namespace", "prefix:localName", "value");
+
+ var element3 = document.createElement("element");
+ element3.setAttributeNS("namespace2", "prefix:localName", "value");
+
+ var element4 = document.createElement("element");
+ element4.setAttributeNS("namespace", "prefix2:localName", "value");
+
+ var element5 = document.createElement("element");
+ element5.setAttributeNS("namespace", "prefix:localName2", "value");
+
+ var element6 = document.createElement("element");
+ element6.setAttributeNS("namespace", "prefix:localName", "value2");
+
+ assert_true(element1.isEqualNode(element1), "self-comparison");
+ assert_true(element1.isEqualNode(element2), "attribute with same properties");
+ assert_false(element1.isEqualNode(element3), "attribute with different namespace");
+ assert_true(element1.isEqualNode(element4), "attribute with different prefix");
+ assert_false(element1.isEqualNode(element5), "attribute with different local name");
+ assert_false(element1.isEqualNode(element6), "attribute with different value");
+
+}, "elements should be compared on attribute namespace, local name, and value");
+
+test(function() {
+
+ var pi1 = document.createProcessingInstruction("target", "data");
+ var pi2 = document.createProcessingInstruction("target", "data");
+ var pi3 = document.createProcessingInstruction("target2", "data");
+ var pi4 = document.createProcessingInstruction("target", "data2");
+
+ assert_true(pi1.isEqualNode(pi1), "self-comparison");
+ assert_true(pi1.isEqualNode(pi2), "same properties");
+ assert_false(pi1.isEqualNode(pi3), "different target");
+ assert_false(pi1.isEqualNode(pi4), "different data");
+
+}, "processing instructions should be compared on target and data");
+
+test(function() {
+
+ var text1 = document.createTextNode("data");
+ var text2 = document.createTextNode("data");
+ var text3 = document.createTextNode("data2");
+
+ assert_true(text1.isEqualNode(text1), "self-comparison");
+ assert_true(text1.isEqualNode(text2), "same properties");
+ assert_false(text1.isEqualNode(text3), "different data");
+
+}, "text nodes should be compared on data");
+
+test(function() {
+
+ var comment1 = document.createComment("data");
+ var comment2 = document.createComment("data");
+ var comment3 = document.createComment("data2");
+
+ assert_true(comment1.isEqualNode(comment1), "self-comparison");
+ assert_true(comment1.isEqualNode(comment2), "same properties");
+ assert_false(comment1.isEqualNode(comment3), "different data");
+
+}, "comments should be compared on data");
+
+test(function() {
+
+ var documentFragment1 = document.createDocumentFragment();
+ var documentFragment2 = document.createDocumentFragment();
+
+ assert_true(documentFragment1.isEqualNode(documentFragment1), "self-comparison");
+ assert_true(documentFragment1.isEqualNode(documentFragment2), "same properties");
+
+}, "document fragments should not be compared based on properties");
+
+test(function() {
+
+ var document1 = document.implementation.createDocument("", "");
+ var document2 = document.implementation.createDocument("", "");
+
+ assert_true(document1.isEqualNode(document1), "self-comparison");
+ assert_true(document1.isEqualNode(document2), "another empty XML document");
+
+ var htmlDoctype = document.implementation.createDocumentType("html", "", "");
+ var document3 = document.implementation.createDocument("http://www.w3.org/1999/xhtml", "html", htmlDoctype);
+ document3.documentElement.appendChild(document3.createElement("head"));
+ document3.documentElement.appendChild(document3.createElement("body"));
+ var document4 = document.implementation.createHTMLDocument();
+ assert_true(document3.isEqualNode(document4), "default HTML documents, created different ways");
+
+}, "documents should not be compared based on properties");
+
+test(function() {
+
+ testDeepEquality(function() { return document.createElement("foo") });
+ testDeepEquality(function() { return document.createDocumentFragment() });
+ testDeepEquality(function() { return document.implementation.createDocument("", "") });
+ testDeepEquality(function() { return document.implementation.createHTMLDocument() });
+
+ function testDeepEquality(parentFactory) {
+ // Some ad-hoc tests of deep equality
+
+ var parentA = parentFactory();
+ var parentB = parentFactory();
+
+ parentA.appendChild(document.createComment("data"));
+ assert_false(parentA.isEqualNode(parentB));
+ parentB.appendChild(document.createComment("data"));
+ assert_true(parentA.isEqualNode(parentB));
+ }
+
+}, "node equality testing should test descendant equality too");
+</script>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdomnodesNodeisEqualNodexhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode.xhtml (196078 => 196079)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode.xhtml        2016-02-03 21:26:33 UTC (rev 196078)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode.xhtml        2016-02-03 21:54:36 UTC (rev 196079)
</span><span class="lines">@@ -1,84 +0,0 @@
</span><del>-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<title>Node.isEqualNode</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-</head>
-<body>
-<div id="log"/>
-<script>
-function testNullHandling(node) {
- test(function() {
- assert_false(node.isEqualNode(null))
- assert_false(node.isEqualNode(undefined))
- })
-}
-[
- document.createElement("foo"),
- document.createTextNode("foo"),
- document.createProcessingInstruction("foo", "bar"),
- document.createComment("foo"),
- document,
- document.implementation.createDocumentType("html", "", ""),
- document.createDocumentFragment()
-].forEach(testNullHandling)
-
-test(function() {
- var a = document.createElement("foo")
- a.setAttribute("a", "bar")
- a.setAttribute("b", "baz")
- var b = document.createElement("foo")
- b.setAttribute("b", "baz")
- b.setAttribute("a", "bar")
- assert_true(a.isEqualNode(b))
-}, "isEqualNode should return true when the attributes are in a different order")
-
-test(function() {
- var a = document.createElementNS("ns", "prefix:foo")
- var b = document.createElementNS("ns", "prefix:foo")
- assert_true(a.isEqualNode(b))
-}, "isEqualNode should return true if elements have same namespace, prefix, and local name")
-
-test(function() {
- var a = document.createElementNS("ns1", "prefix:foo")
- var b = document.createElementNS("ns2", "prefix:foo")
- assert_false(a.isEqualNode(b))
-}, "isEqualNode should return false if elements have different namespace")
-
-test(function() {
- var a = document.createElementNS("ns", "prefix1:foo")
- var b = document.createElementNS("ns", "prefix2:foo")
- assert_false(a.isEqualNode(b))
-}, "isEqualNode should return false if elements have different prefix")
-
-test(function() {
- var a = document.createElementNS("ns", "prefix:foo1")
- var b = document.createElementNS("ns", "prefix:foo2")
- assert_false(a.isEqualNode(b))
-}, "isEqualNode should return false if elements have different local name")
-
-test(function() {
- var a = document.createElement("foo")
- a.setAttributeNS("ns", "x:a", "bar")
- var b = document.createElement("foo")
- b.setAttributeNS("ns", "y:a", "bar")
- assert_true(a.isEqualNode(b))
-}, "isEqualNode should return true when the attributes have different prefixes")
-var internalSubset = async_test("isEqualNode should return true when only the internal subsets of DocumentTypes differ.")
-var wait = 2;
-function iframeLoaded() {
- if (!--wait) {
- internalSubset.step(function() {
- var doc1 = document.getElementById("subset1").contentDocument
- var doc2 = document.getElementById("subset2").contentDocument
- assert_true(doc1.doctype.isEqualNode(doc2.doctype), "doc1.doctype.isEqualNode(doc2.doctype)")
- assert_true(doc1.isEqualNode(doc2), "doc1.isEqualNode(doc2)")
- })
- internalSubset.done()
- }
-}
-</script>
-<iframe id="subset1" onload="iframeLoaded()" src="Node-isEqualNode-iframe1.xml" />
-<iframe id="subset2" onload="iframeLoaded()" src="Node-isEqualNode-iframe2.xml" />
-</body>
-</html>
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdomnodesattributesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/attributes-expected.txt (196078 => 196079)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/attributes-expected.txt        2016-02-03 21:26:33 UTC (rev 196078)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/attributes-expected.txt        2016-02-03 21:54:36 UTC (rev 196079)
</span><span class="lines">@@ -1,5 +1,5 @@
</span><span class="cx">
</span><del>-FAIL AttrExodus assert_false: expected false got true
</del><ins>+FAIL AttrExodus assert_false: should not be a Node expected false got true
</ins><span class="cx"> PASS When qualifiedName does not match the Name production, an INVALID_CHARACTER_ERR exception is to be thrown. (setAttribute)
</span><span class="cx"> PASS setAttribute should lowercase its name argument (upper case attribute)
</span><span class="cx"> PASS setAttribute should lowercase its name argument (mixed case attribute)
</span><span class="lines">@@ -39,11 +39,19 @@
</span><span class="cx"> PASS Basic functionality of getAttributeNode/getAttributeNodeNS
</span><span class="cx"> PASS Basic functionality of setAttributeNode
</span><span class="cx"> PASS Basic functionality of setAttributeNodeNS
</span><ins>+FAIL If attr’s element is neither null nor element, throw an InUseAttributeError. Test bug: unrecognized DOMException code "INUSE_ATTRIBUTE_ERR" passed to assert_throws()
+PASS Replacing an attr by itself
</ins><span class="cx"> PASS Basic functionality of removeAttributeNode
</span><span class="cx"> FAIL setAttributeNode on bound attribute should throw InUseAttributeError Test bug: unrecognized DOMException code "INUSE_ATTRIBUTE_ERR" passed to assert_throws()
</span><ins>+PASS setAttributeNode, if it fires mutation events, should fire one with the new node when resetting an existing attribute
+PASS setAttributeNode, if it fires mutation events, should fire one with the new node when resetting an existing attribute (outer shell)
+PASS setAttributeNode called with an Attr that has the same name as an existing one should not change attribute order
</ins><span class="cx"> FAIL getAttributeNames tests el.getAttributeNames is not a function. (In 'el.getAttributeNames()', 'el.getAttributeNames' is undefined)
</span><span class="cx"> FAIL Own property correctness with basic attributes assert_array_equals: lengths differ, expected 2 got 3
</span><span class="cx"> FAIL Own property correctness with non-namespaced attribute before same-name namespaced one assert_array_equals: lengths differ, expected 3 got 4
</span><span class="cx"> FAIL Own property correctness with namespaced attribute before same-name non-namespaced one assert_array_equals: lengths differ, expected 3 got 4
</span><span class="cx"> FAIL Own property correctness with two namespaced attributes with the same name-with-prefix assert_array_equals: lengths differ, expected 3 got 4
</span><ins>+FAIL Own property names should only include all-lowercase qualified names for an HTML element in an HTML document assert_array_equals: lengths differ, expected 8 got 7
+FAIL Own property names should include all qualified names for a non-HTML element in an HTML document assert_array_equals: lengths differ, expected 12 got 7
+FAIL Own property names should include all qualified names for an HTML element in a non-HTML document assert_array_equals: lengths differ, expected 12 got 7
</ins><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdomnodesattributeshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/attributes.html (196078 => 196079)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/attributes.html        2016-02-03 21:26:33 UTC (rev 196078)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/attributes.html        2016-02-03 21:54:36 UTC (rev 196079)
</span><span class="lines">@@ -19,12 +19,17 @@
</span><span class="cx"> test(function() {
</span><span class="cx"> document.body.setAttribute("abc", "pass")
</span><span class="cx"> var attr = document.body.attributes[0]
</span><del>- assert_true(attr instanceof Attr)
- assert_false(attr instanceof Node)
- assert_throws(new TypeError(), function() { attr.appendChild(document.createTextNode("fail")) })
- assert_throws(new TypeError(), function() { attr.appendChild(null) })
</del><ins>+ assert_true(attr instanceof Attr, "should be an Attr")
+ assert_false(attr instanceof Node, "should not be a Node")
+ var removed_members = [
+ "appendChild",
+ "insertBefore",
+ "childNodes",
+ ]
+ removed_members.forEach(function(m) {
+ assert_false(m in attr, m + " should not be supported")
+ })
</ins><span class="cx"> assert_equals(attr.value, "pass")
</span><del>- assert_false("childNodes" in attr, "Should not have childNodes")
</del><span class="cx"> }, "AttrExodus")
</span><span class="cx">
</span><span class="cx"> // setAttribute exhaustive tests
</span><span class="lines">@@ -442,6 +447,26 @@
</span><span class="cx"> }, "Basic functionality of setAttributeNodeNS")
</span><span class="cx">
</span><span class="cx"> test(function() {
</span><ins>+ var el = document.createElement("div");
+ var other = document.createElement("div");
+ attr = document.createAttribute("foo");
+ assert_equals(el.setAttributeNode(attr), null);
+ assert_equals(attr.ownerElement, el);
+ assert_throws("INUSE_ATTRIBUTE_ERR",
+ function() { other.setAttributeNode(attr) },
+ "Attribute already associated with el")
+}, "If attr’s element is neither null nor element, throw an InUseAttributeError.");
+
+test(function() {
+ var el = document.createElement("div");
+ attr = document.createAttribute("foo");
+ assert_equals(el.setAttributeNode(attr), null);
+ el.setAttribute("bar", "qux");
+ assert_equals(el.setAttributeNode(attr), attr);
+ assert_equals(el.attributes[0], attr);
+}, "Replacing an attr by itself");
+
+test(function() {
</ins><span class="cx"> var el = document.createElement("div")
</span><span class="cx"> el.setAttribute("foo", "bar")
</span><span class="cx"> var attrNode = el.getAttributeNode("foo");
</span><span class="lines">@@ -460,6 +485,60 @@
</span><span class="cx"> assert_throws("INUSE_ATTRIBUTE_ERR", function(){el2.setAttributeNode(attrNode)});
</span><span class="cx"> }, "setAttributeNode on bound attribute should throw InUseAttributeError")
</span><span class="cx">
</span><ins>+// 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");
+
</ins><span class="cx"> test(function() {
</span><span class="cx"> var el = document.createElement("div");
</span><span class="cx"> el.setAttribute("foo", "bar");
</span><span class="lines">@@ -532,6 +611,10 @@
</span><span class="cx"> ["0", "1", "2"])
</span><span class="cx"> assert_array_equals(Object.getOwnPropertyNames(el.attributes),
</span><span class="cx"> ["0", "1", "2", "a", "b"])
</span><ins>+ for (var propName of Object.getOwnPropertyNames(el.attributes)) {
+ assert_true(el.attributes[propName] instanceof Attr,
+ "el.attributes has an Attr for property name " + propName);
+ }
</ins><span class="cx"> }, "Own property correctness with non-namespaced attribute before same-name namespaced one");
</span><span class="cx">
</span><span class="cx"> test(function() {
</span><span class="lines">@@ -545,6 +628,10 @@
</span><span class="cx"> ["0", "1", "2"])
</span><span class="cx"> assert_array_equals(Object.getOwnPropertyNames(el.attributes),
</span><span class="cx"> ["0", "1", "2", "a", "b"])
</span><ins>+ for (var propName of Object.getOwnPropertyNames(el.attributes)) {
+ assert_true(el.attributes[propName] instanceof Attr,
+ "el.attributes has an Attr for property name " + propName);
+ }
</ins><span class="cx"> }, "Own property correctness with namespaced attribute before same-name non-namespaced one");
</span><span class="cx">
</span><span class="cx"> test(function() {
</span><span class="lines">@@ -558,5 +645,59 @@
</span><span class="cx"> ["0", "1", "2"])
</span><span class="cx"> assert_array_equals(Object.getOwnPropertyNames(el.attributes),
</span><span class="cx"> ["0", "1", "2", "a:b", "c:d"])
</span><ins>+ for (var propName of Object.getOwnPropertyNames(el.attributes)) {
+ assert_true(el.attributes[propName] instanceof Attr,
+ "el.attributes has an Attr for property name " + propName);
+ }
</ins><span class="cx"> }, "Own property correctness with two namespaced attributes with the same name-with-prefix");
</span><ins>+
+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");
</ins><span class="cx"> </script>
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdomnodesw3cimportlog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/w3c-import.log (196078 => 196079)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/w3c-import.log        2016-02-03 21:26:33 UTC (rev 196078)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/w3c-import.log        2016-02-03 21:54:36 UTC (rev 196079)
</span><span class="lines">@@ -114,9 +114,11 @@
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-compareDocumentPosition.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-constants.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-contains.html
</span><ins>+/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-contains.xml
</ins><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-insertBefore.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode-iframe1.xml
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode-iframe2.xml
</span><ins>+/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode.html
</ins><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-isEqualNode.xhtml
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-lookupNamespaceURI.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/dom/nodes/Node-lookupPrefix.xhtml
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdomrangesRangeconstructorexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/ranges/Range-constructor-expected.txt (0 => 196079)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/ranges/Range-constructor-expected.txt         (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/ranges/Range-constructor-expected.txt        2016-02-03 21:54:36 UTC (rev 196079)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+PASS Range constructor test
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdomrangesRangeconstructorhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/ranges/Range-constructor.html (0 => 196079)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/ranges/Range-constructor.html         (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/ranges/Range-constructor.html        2016-02-03 21:54:36 UTC (rev 196079)
</span><span class="lines">@@ -0,0 +1,20 @@
</span><ins>+<!doctype html>
+<title>Range constructor test</title>
+<link rel="author" title="Aryeh Gregor" href=ayg@aryeh.name>
+<div id=log></div>
+<script src=/resources/testharness.js></script>
+<script src=/resources/testharnessreport.js></script>
+<script>
+"use strict";
+
+test(function() {
+ var range = new Range();
+ assert_equals(range.startContainer, document, "startContainer");
+ assert_equals(range.endContainer, document, "endContainer");
+ assert_equals(range.startOffset, 0, "startOffset");
+ assert_equals(range.endOffset, 0, "endOffset");
+ assert_true(range.collapsed, "collapsed");
+ assert_equals(range.commonAncestorContainer, document,
+ "commonAncestorContainer");
+});
+</script>
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdomrangesw3cimportlog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/ranges/w3c-import.log (196078 => 196079)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/ranges/w3c-import.log        2016-02-03 21:26:33 UTC (rev 196078)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/ranges/w3c-import.log        2016-02-03 21:54:36 UTC (rev 196079)
</span><span class="lines">@@ -24,6 +24,7 @@
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/dom/ranges/Range-compareBoundaryPoints.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/dom/ranges/Range-comparePoint-2.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/dom/ranges/Range-comparePoint.html
</span><ins>+/LayoutTests/imported/w3c/web-platform-tests/dom/ranges/Range-constructor.html
</ins><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/dom/ranges/Range-deleteContents.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/dom/ranges/Range-detach.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/dom/ranges/Range-extractContents.html
</span></span></pre>
</div>
</div>
</body>
</html>