<!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>[207520] trunk/LayoutTests</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/207520">207520</a></dd>
<dt>Author</dt> <dd>rniwa@webkit.org</dd>
<dt>Date</dt> <dd>2016-10-18 22:03:11 -0700 (Tue, 18 Oct 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Import the latest custom elements tests from W3C
https://bugs.webkit.org/show_bug.cgi?id=163640

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Import more custom elements tests from web-platform-tests as of fbe5ac0fd8eecac67d1562032eeba5bd7ec2b735.
Most of these tests are written and fixed by me.

* web-platform-tests/custom-elements/htmlconstructor/newtarget-expected.txt:
* web-platform-tests/custom-elements/htmlconstructor/newtarget.html:
* web-platform-tests/custom-elements/reactions/DOMStringMap-expected.txt: Added.
* web-platform-tests/custom-elements/reactions/DOMStringMap.html: Added.
* web-platform-tests/custom-elements/reactions/Document-expected.txt:
* web-platform-tests/custom-elements/reactions/Document.html:
* web-platform-tests/custom-elements/reactions/Element-expected.txt:
* web-platform-tests/custom-elements/reactions/Element.html:
* web-platform-tests/custom-elements/reactions/ElementContentEditable-expected.txt: Added.
* web-platform-tests/custom-elements/reactions/ElementContentEditable.html: Added.
* web-platform-tests/custom-elements/reactions/HTMLElement-expected.txt: Added.
* web-platform-tests/custom-elements/reactions/HTMLElement.html: Added.
* web-platform-tests/custom-elements/reactions/NamedNodeMap-expected.txt:
* web-platform-tests/custom-elements/reactions/NamedNodeMap.html:
* web-platform-tests/custom-elements/reactions/Range-expected.txt:
* web-platform-tests/custom-elements/reactions/Range.html:
* web-platform-tests/custom-elements/reactions/Selection-expected.txt: Added.
* web-platform-tests/custom-elements/reactions/Selection.html: Added.
* web-platform-tests/custom-elements/reactions/resources/reactions.js:
* web-platform-tests/custom-elements/reactions/w3c-import.log:
* web-platform-tests/custom-elements/resources/custom-elements-helpers.js:

LayoutTests:

Removed the test re-imported via web-platform-tests in <a href="http://trac.webkit.org/projects/webkit/changeset/206838">r206838</a>.

* fast/custom-elements/lifecycle-callback-timing-expected.txt: Removed.
* fast/custom-elements/lifecycle-callback-timing.html: Removed.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestscustomelementshtmlconstructornewtargetexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestscustomelementshtmlconstructornewtargethtml">trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsDocumentexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Document-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsDocumenthtml">trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Document.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsElementexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Element-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsElementhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Element.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsNamedNodeMapexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/NamedNodeMap-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsNamedNodeMaphtml">trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/NamedNodeMap.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsRangeexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Range-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsRangehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Range.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsresourcesreactionsjs">trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/resources/reactions.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsw3cimportlog">trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/w3c-import.log</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestscustomelementsresourcescustomelementshelpersjs">trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsDOMStringMapexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/DOMStringMap-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsDOMStringMaphtml">trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/DOMStringMap.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsElementContentEditableexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/ElementContentEditable-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsElementContentEditablehtml">trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/ElementContentEditable.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsHTMLElementexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLElement-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsHTMLElementhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLElement.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsSelectionexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Selection-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsSelectionhtml">trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Selection.html</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastcustomelementslifecyclecallbacktimingexpectedtxt">trunk/LayoutTests/fast/custom-elements/lifecycle-callback-timing-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcustomelementslifecyclecallbacktiminghtml">trunk/LayoutTests/fast/custom-elements/lifecycle-callback-timing.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (207519 => 207520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-10-19 04:46:39 UTC (rev 207519)
+++ trunk/LayoutTests/ChangeLog        2016-10-19 05:03:11 UTC (rev 207520)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-10-18  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
+
+        Import the latest custom elements tests from W3C
+        https://bugs.webkit.org/show_bug.cgi?id=163640
+
+        Reviewed by Chris Dumez.
+
+        Removed the test re-imported via web-platform-tests in r206838.
+
+        * fast/custom-elements/lifecycle-callback-timing-expected.txt: Removed.
+        * fast/custom-elements/lifecycle-callback-timing.html: Removed.
+
</ins><span class="cx"> 2016-10-18  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Web IDL] Drop webkit-specific extended attributes that are no longer useful
</span></span></pre></div>
<a id="trunkLayoutTestsfastcustomelementslifecyclecallbacktimingexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/custom-elements/lifecycle-callback-timing-expected.txt (207519 => 207520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/custom-elements/lifecycle-callback-timing-expected.txt        2016-10-19 04:46:39 UTC (rev 207519)
+++ trunk/LayoutTests/fast/custom-elements/lifecycle-callback-timing-expected.txt        2016-10-19 05:03:11 UTC (rev 207520)
</span><span class="lines">@@ -1,4 +0,0 @@
</span><del>-
-PASS setAttribute and removeAttribute must enqueue and invoke attributeChangedCallback 
-PASS Calling Node.prototype.cloneNode(false) must push a new element queue to the processing stack 
-
</del></span></pre></div>
<a id="trunkLayoutTestsfastcustomelementslifecyclecallbacktiminghtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/custom-elements/lifecycle-callback-timing.html (207519 => 207520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/custom-elements/lifecycle-callback-timing.html        2016-10-19 04:46:39 UTC (rev 207519)
+++ trunk/LayoutTests/fast/custom-elements/lifecycle-callback-timing.html        2016-10-19 05:03:11 UTC (rev 207520)
</span><span class="lines">@@ -1,89 +0,0 @@
</span><del>-&lt;!DOCTYPE html&gt;
-&lt;html&gt;
-&lt;head&gt;
-&lt;title&gt;Custom Elements: Lifecycle callback must be invoked before returning to author scripts&lt;/title&gt;
-&lt;meta name=&quot;author&quot; title=&quot;Ryosuke Niwa&quot; href=&quot;mailto:rniwa@webkit.org&quot;&gt;
-&lt;meta name=&quot;assert&quot; content=&quot;Lifecycle callbacks must be invoked before returning to author scripts&quot;&gt;
-&lt;link rel=&quot;help&quot; href=&quot;https://w3c.github.io/webcomponents/spec/custom/#enqueuing-and-invoking-callbacks&quot;&gt;
-&lt;script src=&quot;../../resources/testharness.js&quot;&gt;&lt;/script&gt;
-&lt;script src=&quot;../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
-&lt;link rel='stylesheet' href='../../resources/testharness.css'&gt;
-&lt;/head&gt;
-&lt;body&gt;
-&lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
-&lt;script&gt;
-
-class MyCustomElement extends HTMLElement {
-    attributeChangedCallback(...args) {
-        this.handler(...args);
-    }
-
-    handler() { }
-}
-MyCustomElement.observedAttributes = ['data-title', 'title'];
-customElements.define('my-custom-element', MyCustomElement);
-
-test(function () {
-    var instance = document.createElement('my-custom-element');
-    var anotherInstance = document.createElement('my-custom-element');
-
-    var callbackOrder = [];
-    instance.handler = function () {
-        callbackOrder.push([this, 'begin']);
-        anotherInstance.setAttribute('data-title', 'baz');
-        callbackOrder.push([this, 'end']);
-    }
-    anotherInstance.handler = function () {
-        callbackOrder.push([this, 'begin']);
-        callbackOrder.push([this, 'end']);
-    }
-
-    instance.setAttribute('title', 'foo');
-    assert_equals(callbackOrder.length, 4);
-
-    assert_array_equals(callbackOrder[0], [instance, 'begin']);
-    assert_array_equals(callbackOrder[1], [anotherInstance, 'begin']);
-    assert_array_equals(callbackOrder[2], [anotherInstance, 'end']);
-    assert_array_equals(callbackOrder[3], [instance, 'end']);
-
-}, 'setAttribute and removeAttribute must enqueue and invoke attributeChangedCallback');
-
-test(function () {
-    var shouldCloneAnotherInstance = false;
-    var anotherInstanceClone;
-    var log = [];
-
-    class SelfCloningElement extends HTMLElement {
-        constructor() {
-            super();
-            log.push([this, 'begin']);
-            if (shouldCloneAnotherInstance) {
-                shouldCloneAnotherInstance = false;
-                anotherInstanceClone = anotherInstance.cloneNode(false);
-            }
-            log.push([this, 'end']);
-        }
-    }
-    customElements.define('self-cloning-element', SelfCloningElement);
-
-    var instance = document.createElement('self-cloning-element');
-    var anotherInstance = document.createElement('self-cloning-element');
-    shouldCloneAnotherInstance = true;
-
-    assert_equals(log.length, 4);
-    var instanceClone = instance.cloneNode(false);
-
-    assert_equals(log.length, 8);
-    assert_array_equals(log[0], [instance, 'begin']);
-    assert_array_equals(log[1], [instance, 'end']);
-    assert_array_equals(log[2], [anotherInstance, 'begin']);
-    assert_array_equals(log[3], [anotherInstance, 'end']);
-    assert_array_equals(log[4], [instanceClone, 'begin']);
-    assert_array_equals(log[5], [anotherInstanceClone, 'begin']);
-    assert_array_equals(log[6], [anotherInstanceClone, 'end']);
-    assert_array_equals(log[7], [instanceClone, 'end']);
-}, 'Calling Node.prototype.cloneNode(false) must push a new element queue to the processing stack');
-
-&lt;/script&gt;
-&lt;/body&gt;
-&lt;/html&gt;
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (207519 => 207520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2016-10-19 04:46:39 UTC (rev 207519)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2016-10-19 05:03:11 UTC (rev 207520)
</span><span class="lines">@@ -1,3 +1,35 @@
</span><ins>+2016-10-18  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
+
+        Import the latest custom elements tests from W3C
+        https://bugs.webkit.org/show_bug.cgi?id=163640
+
+        Reviewed by Chris Dumez.
+
+        Import more custom elements tests from web-platform-tests as of fbe5ac0fd8eecac67d1562032eeba5bd7ec2b735.
+        Most of these tests are written and fixed by me.
+
+        * web-platform-tests/custom-elements/htmlconstructor/newtarget-expected.txt:
+        * web-platform-tests/custom-elements/htmlconstructor/newtarget.html:
+        * web-platform-tests/custom-elements/reactions/DOMStringMap-expected.txt: Added.
+        * web-platform-tests/custom-elements/reactions/DOMStringMap.html: Added.
+        * web-platform-tests/custom-elements/reactions/Document-expected.txt:
+        * web-platform-tests/custom-elements/reactions/Document.html:
+        * web-platform-tests/custom-elements/reactions/Element-expected.txt:
+        * web-platform-tests/custom-elements/reactions/Element.html:
+        * web-platform-tests/custom-elements/reactions/ElementContentEditable-expected.txt: Added.
+        * web-platform-tests/custom-elements/reactions/ElementContentEditable.html: Added.
+        * web-platform-tests/custom-elements/reactions/HTMLElement-expected.txt: Added.
+        * web-platform-tests/custom-elements/reactions/HTMLElement.html: Added.
+        * web-platform-tests/custom-elements/reactions/NamedNodeMap-expected.txt:
+        * web-platform-tests/custom-elements/reactions/NamedNodeMap.html:
+        * web-platform-tests/custom-elements/reactions/Range-expected.txt:
+        * web-platform-tests/custom-elements/reactions/Range.html:
+        * web-platform-tests/custom-elements/reactions/Selection-expected.txt: Added.
+        * web-platform-tests/custom-elements/reactions/Selection.html: Added.
+        * web-platform-tests/custom-elements/reactions/resources/reactions.js:
+        * web-platform-tests/custom-elements/reactions/w3c-import.log:
+        * web-platform-tests/custom-elements/resources/custom-elements-helpers.js:
+
</ins><span class="cx"> 2016-10-18  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Changing details.open should cause a toggle event to be fired asynchronously
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestscustomelementshtmlconstructornewtargetexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget-expected.txt (207519 => 207520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget-expected.txt        2016-10-19 04:46:39 UTC (rev 207519)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget-expected.txt        2016-10-19 05:03:11 UTC (rev 207520)
</span><span class="lines">@@ -1,7 +1,12 @@
</span><span class="cx"> 
</span><del>-FAIL Use NewTarget's prototype, not the one stored at definition time promise_test: Unhandled rejection with value: object &quot;TypeError: null is not an object (evaluating 'document.bo...&quot;
-FAIL Rethrow any exceptions thrown while getting the prototype assert_throws: function &quot;() =&gt; {
-      return Reflect.construct(w.HTMLElement, [],...&quot; threw object &quot;TypeError: new.target does not define a custom element&quot; (&quot;TypeError&quot;) expected object &quot;[object Object]&quot; (&quot;prototype throws&quot;)
-FAIL If prototype is not object, derives the fallback from NewTarget's realm (autonomous custom elements) promise_test: Unhandled rejection with value: object &quot;TypeError: new.target does not define a custom element&quot;
-FAIL If prototype is not object, derives the fallback from NewTarget's realm (customized built-in elements) promise_test: Unhandled rejection with value: object &quot;TypeError: Reflect.construct requires the first argument ...&quot;
</del><ins>+PASS Use NewTarget's prototype, not the one stored at definition time 
+PASS Rethrow any exceptions thrown while getting the prototype 
+FAIL If prototype is not object (null), derives the fallback from NewTarget's realm (autonomous custom elements) assert_equals: Must use the HTMLElement from the realm of NewTarget expected object &quot;[object HTMLElementPrototype]&quot; but got object &quot;[object HTMLElementPrototype]&quot;
+FAIL If prototype is not object (undefined), derives the fallback from NewTarget's realm (autonomous custom elements) assert_equals: Must use the HTMLElement from the realm of NewTarget expected object &quot;[object HTMLElementPrototype]&quot; but got object &quot;[object HTMLElementPrototype]&quot;
+FAIL If prototype is not object (5), derives the fallback from NewTarget's realm (autonomous custom elements) assert_equals: Must use the HTMLElement from the realm of NewTarget expected object &quot;[object HTMLElementPrototype]&quot; but got object &quot;[object HTMLElementPrototype]&quot;
+FAIL If prototype is not object (string), derives the fallback from NewTarget's realm (autonomous custom elements) assert_equals: Must use the HTMLElement from the realm of NewTarget expected object &quot;[object HTMLElementPrototype]&quot; but got object &quot;[object HTMLElementPrototype]&quot;
+FAIL If prototype is not object (null), derives the fallback from NewTarget's realm (customized built-in elements) promise_test: Unhandled rejection with value: object &quot;TypeError: Reflect.construct requires the first argument ...&quot;
+FAIL If prototype is not object (undefined), derives the fallback from NewTarget's realm (customized built-in elements) promise_test: Unhandled rejection with value: object &quot;TypeError: Reflect.construct requires the first argument ...&quot;
+FAIL If prototype is not object (5), derives the fallback from NewTarget's realm (customized built-in elements) promise_test: Unhandled rejection with value: object &quot;TypeError: Reflect.construct requires the first argument ...&quot;
+FAIL If prototype is not object (string), derives the fallback from NewTarget's realm (customized built-in elements) promise_test: Unhandled rejection with value: object &quot;TypeError: Reflect.construct requires the first argument ...&quot;
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestscustomelementshtmlconstructornewtargethtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget.html (207519 => 207520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget.html        2016-10-19 04:46:39 UTC (rev 207519)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/htmlconstructor/newtarget.html        2016-10-19 05:03:11 UTC (rev 207520)
</span><span class="lines">@@ -5,37 +5,35 @@
</span><span class="cx"> &lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../resources/custom-elements-helpers.js&quot;&gt;&lt;/script&gt;
</span><del>-
</del><ins>+&lt;body&gt;
</ins><span class="cx"> &lt;script&gt;
</span><span class="cx"> &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx"> test_with_window(w =&gt; {
</span><del>-  let afterDefinition = false;
</del><ins>+  let beforeDefinition = true;
</ins><span class="cx">   const proto1 = { &quot;proto&quot;: &quot;number one&quot; };
</span><span class="cx">   const proto2 = { &quot;proto&quot;: &quot;number two&quot; };
</span><span class="cx"> 
</span><del>-  const TestElement = (function () {
-    assert_throws({ name: &quot;prototype throws&quot; }, () =&gt; {
-      const o = Reflect.construct(w.HTMLElement, [], new.target);
</del><ins>+  function TestElement() {
+    const o = Reflect.construct(w.HTMLElement, [], new.target);
+    assert_equals(Object.getPrototypeOf(o), proto2,
+      &quot;Must use the value returned from new.target.prototype&quot;);
+    assert_not_equals(Object.getPrototypeOf(o), proto1,
+      &quot;Must not use the prototype stored at definition time&quot;);
+  }
</ins><span class="cx"> 
</span><del>-      assert_equals(Object.getPrototypeOf(o), proto2,
-        &quot;Must use the value returned from new.target.prototype&quot;);
-      assert_not_equals(Object.getPrototypeOf(o), proto1,
-        &quot;Must not use the prototype stored at definition time&quot;);
-    });
-  }).bind({});
-
-  Object.defineProperty(TestElement, &quot;prototype&quot;, {
-    get() {
-      return beforeDefinition ? proto1 : proto2;
-    }
</del><ins>+  const ElementWithDynamicPrototype = new Proxy(TestElement, {
+      get: function (target, name) {
+        if (name == &quot;prototype&quot;)
+          return beforeDefinition ? proto1 : proto2;
+        return target[name];
+      }
</ins><span class="cx">   });
</span><span class="cx"> 
</span><del>-  w.customElements.define(&quot;test-element&quot;, TestElement);
</del><ins>+  w.customElements.define(&quot;test-element&quot;, ElementWithDynamicPrototype);
</ins><span class="cx"> 
</span><del>-  beforeDefinition = true;
-  new TestElement();
-
</del><ins>+  beforeDefinition = false;
+  new ElementWithDynamicPrototype();
</ins><span class="cx"> }, &quot;Use NewTarget's prototype, not the one stored at definition time&quot;);
</span><span class="cx"> 
</span><span class="cx"> test_with_window(w =&gt; {
</span><span class="lines">@@ -42,63 +40,65 @@
</span><span class="cx">   // We have to not throw during define(), but throw during super()
</span><span class="cx">   let throws = false;
</span><span class="cx"> 
</span><del>-  const TestElement = (function () {
</del><ins>+  function TestElement() {
+    throws = true;
</ins><span class="cx">     assert_throws({ name: &quot;prototype throws&quot; }, () =&gt; {
</span><del>-      return Reflect.construct(w.HTMLElement, [], new.target);
</del><ins>+      Reflect.construct(w.HTMLElement, [], new.target);
</ins><span class="cx">     });
</span><del>-  }).bind({});
</del><ins>+  }
</ins><span class="cx"> 
</span><del>-  Object.defineProperty(TestElement, &quot;prototype&quot;, {
-    get() {
-      if (throws) {
</del><ins>+  const ElementWithDynamicPrototype = new Proxy(TestElement, {
+    get: function (target, name) {
+      if (throws &amp;&amp; name == &quot;prototype&quot;)
</ins><span class="cx">         throw { name: &quot;prototype throws&quot; };
</span><del>-      }
-      return {};
</del><ins>+      return target[name];
</ins><span class="cx">     }
</span><span class="cx">   });
</span><span class="cx"> 
</span><del>-  w.customElements.define(&quot;test-element&quot;, TestElement);
</del><ins>+  w.customElements.define(&quot;test-element&quot;, ElementWithDynamicPrototype);
</ins><span class="cx"> 
</span><del>-  throws = true;
-  new TestElement();
</del><ins>+  new ElementWithDynamicPrototype();
</ins><span class="cx"> 
</span><span class="cx"> }, &quot;Rethrow any exceptions thrown while getting the prototype&quot;);
</span><span class="cx"> 
</span><del>-test_with_window(w =&gt; {
-  for (const notAnObject of [null, undefined, 5, &quot;string&quot;]) {
</del><ins>+[null, undefined, 5, &quot;string&quot;].forEach(function (notAnObject) {
+  test_with_window(w =&gt; {
</ins><span class="cx">     // We have to return an object during define(), but not during super()
</span><span class="cx">     let returnNotAnObject = false;
</span><span class="cx"> 
</span><del>-    const TestElement = (function () {
</del><ins>+    function TestElement() {
</ins><span class="cx">       const o = Reflect.construct(w.HTMLElement, [], new.target);
</span><span class="cx"> 
</span><del>-      assert_equals(Object.getPrototypeOf(o), window.HTMLElement,
</del><ins>+      assert_equals(Object.getPrototypeOf(new.target), window.Function.prototype);
+      assert_equals(Object.getPrototypeOf(o), window.HTMLElement.prototype,
</ins><span class="cx">         &quot;Must use the HTMLElement from the realm of NewTarget&quot;);
</span><del>-      assert_not_equals(Object.getPrototypeOf(o), w.HTMLElement,
</del><ins>+      assert_not_equals(Object.getPrototypeOf(o), w.HTMLElement.prototype,
</ins><span class="cx">         &quot;Must not use the HTMLElement from the realm of the active function object (w.HTMLElement)&quot;);
</span><span class="cx"> 
</span><span class="cx">       return o;
</span><del>-    }).bind({});
</del><ins>+    }
</ins><span class="cx"> 
</span><del>-    Object.defineProperty(TestElement, &quot;prototype&quot;, {
-      get() {
-        return returnNotAnObject ? notAnObject : {};
</del><ins>+    const ElementWithDynamicPrototype = new Proxy(TestElement, {
+      get: function (target, name) {
+        if (name == &quot;prototype&quot;)
+          return returnNotAnObject ? notAnObject : {};
+        return target[name];
</ins><span class="cx">       }
</span><span class="cx">     });
</span><span class="cx"> 
</span><del>-    w.customElements.define(&quot;test-element&quot;, TestElement);
</del><ins>+    w.customElements.define(&quot;test-element&quot;, ElementWithDynamicPrototype);
</ins><span class="cx"> 
</span><span class="cx">     returnNotAnObject = true;
</span><del>-    new TestElement();
-  }
-}, &quot;If prototype is not object, derives the fallback from NewTarget's realm (autonomous custom elements)&quot;);
</del><ins>+    new ElementWithDynamicPrototype();
+  }, &quot;If prototype is not object (&quot; + notAnObject + &quot;), derives the fallback from NewTarget's realm (autonomous custom elements)&quot;);
+});
</ins><span class="cx"> 
</span><del>-test_with_window(w =&gt; {
-  for (const notAnObject of [null, undefined, 5, &quot;string&quot;]) {
</del><ins>+[null, undefined, 5, &quot;string&quot;].forEach(function (notAnObject) {
+  test_with_window(w =&gt; {
</ins><span class="cx">     // We have to return an object during define(), but not during super()
</span><span class="cx">     let returnNotAnObject = false;
</span><span class="cx"> 
</span><del>-    const TestElement = (function () {
</del><ins>+    function TestElement() {
</ins><span class="cx">       const o = Reflect.construct(w.HTMLParagraphElement, [], new.target);
</span><span class="cx"> 
</span><span class="cx">       assert_equals(Object.getPrototypeOf(o), window.HTMLParagraphElement,
</span><span class="lines">@@ -107,18 +107,22 @@
</span><span class="cx">         &quot;Must not use the HTMLParagraphElement from the realm of the active function object (w.HTMLParagraphElement)&quot;);
</span><span class="cx"> 
</span><span class="cx">       return o;
</span><del>-    }).bind({});
</del><ins>+    }
</ins><span class="cx"> 
</span><del>-    Object.defineProperty(TestElement, &quot;prototype&quot;, {
-      get() {
-        return returnNotAnObject ? notAnObject : {};
</del><ins>+    const ElementWithDynamicPrototype = new Proxy(TestElement, {
+      get: function (target, name) {
+        if (name == &quot;prototype&quot;)
+          return returnNotAnObject ? notAnObject : {};
+        return target[name];
</ins><span class="cx">       }
</span><span class="cx">     });
</span><span class="cx"> 
</span><del>-    w.customElements.define(&quot;test-element&quot;, TestElement, { extends: &quot;p&quot; });
</del><ins>+    w.customElements.define(&quot;test-element&quot;, ElementWithDynamicPrototype, { extends: &quot;p&quot; });
</ins><span class="cx"> 
</span><span class="cx">     returnNotAnObject = true;
</span><del>-    new TestElement();
-  }
-}, &quot;If prototype is not object, derives the fallback from NewTarget's realm (customized built-in elements)&quot;);
</del><ins>+    new ElementWithDynamicPrototype();
+  }, &quot;If prototype is not object (&quot; + notAnObject + &quot;), derives the fallback from NewTarget's realm (customized built-in elements)&quot;);
+});
+
</ins><span class="cx"> &lt;/script&gt;
</span><ins>+&lt;/body&gt;
</ins><span class="cx">\ No newline at end of file
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsDOMStringMapexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/DOMStringMap-expected.txt (0 => 207520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/DOMStringMap-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/DOMStringMap-expected.txt        2016-10-19 05:03:11 UTC (rev 207520)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+
+FAIL setter on DOMStringMap must enqueue an attributeChanged reaction when adding an observed data attribute assert_array_equals: lengths differ, expected 1 got 0
+PASS setter on DOMStringMap must not enqueue an attributeChanged reaction when adding an unobserved data attribute 
+FAIL setter on DOMStringMap must enqueue an attributeChanged reaction when mutating the value of an observed data attribute assert_array_equals: lengths differ, expected 2 got 1
+FAIL setter on DOMStringMap must enqueue an attributeChanged reaction when mutating the value of an observed data attribute to the same value assert_array_equals: lengths differ, expected 2 got 1
+PASS setter on DOMStringMap must not enqueue an attributeChanged reaction when mutating the value of an unobserved data attribute 
+FAIL deleter on DOMStringMap must enqueue an attributeChanged reaction when removing an observed data attribute assert_array_equals: lengths differ, expected 2 got 1
+PASS deleter on DOMStringMap must not enqueue an attributeChanged reaction when removing an unobserved data attribute 
+PASS deleter on DOMStringMap must not enqueue an attributeChanged reaction when it does not remove a data attribute 
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsDOMStringMaphtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/DOMStringMap.html (0 => 207520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/DOMStringMap.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/DOMStringMap.html        2016-10-19 05:03:11 UTC (rev 207520)
</span><span class="lines">@@ -0,0 +1,96 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;Custom Elements: CEReactions on DOMStringMap interface&lt;/title&gt;
+&lt;meta name=&quot;author&quot; title=&quot;Ryosuke Niwa&quot; href=&quot;mailto:rniwa@webkit.org&quot;&gt;
+&lt;meta name=&quot;assert&quot; content=&quot;setter and deleter of DOMStringMap interface must have CEReactions&quot;&gt;
+&lt;meta name=&quot;help&quot; content=&quot;https://html.spec.whatwg.org/#domstringmap&quot;&gt;
+&lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/custom-elements-helpers.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;./resources/reactions.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+
+test(function () {
+    var element = define_new_custom_element(['data-foo']);
+    var instance = document.createElement(element.name);
+    assert_array_equals(element.takeLog().types(), ['constructed']);
+    instance.dataset.foo = 'bar';
+    var logEntries = element.takeLog();
+    assert_array_equals(logEntries.types(), ['attributeChanged']);
+    assert_attribute_log_entry(logEntries.last(), {name: 'data-foo', oldValue: null, newValue: 'bar', namespace: null});
+}, 'setter on DOMStringMap must enqueue an attributeChanged reaction when adding an observed data attribute');
+
+test(function () {
+    var element = define_new_custom_element(['data-bar']);
+    var instance = document.createElement(element.name);
+    assert_array_equals(element.takeLog().types(), ['constructed']);
+    instance.dataset.foo = 'bar';
+    assert_array_equals(element.takeLog().types(), []);
+}, 'setter on DOMStringMap must not enqueue an attributeChanged reaction when adding an unobserved data attribute');
+
+test(function () {
+    var element = define_new_custom_element(['data-foo']);
+    var instance = document.createElement(element.name);
+    instance.dataset.foo = 'bar';
+    assert_array_equals(element.takeLog().types(), ['constructed', 'attributeChanged']);
+    instance.dataset.foo = 'baz';
+    var logEntries = element.takeLog();
+    assert_array_equals(logEntries.types(), ['attributeChanged']);
+    assert_attribute_log_entry(logEntries.last(), {name: 'data-foo', oldValue: 'bar', newValue: 'baz', namespace: null});
+}, 'setter on DOMStringMap must enqueue an attributeChanged reaction when mutating the value of an observed data attribute');
+
+test(function () {
+    var element = define_new_custom_element(['data-foo']);
+    var instance = document.createElement(element.name);
+    instance.dataset.foo = 'bar';
+    assert_array_equals(element.takeLog().types(), ['constructed', 'attributeChanged']);
+    instance.dataset.foo = 'bar';
+    var logEntries = element.takeLog();
+    assert_array_equals(logEntries.types(), ['attributeChanged']);
+    assert_attribute_log_entry(logEntries.last(), {name: 'data-foo', oldValue: 'bar', newValue: 'bar', namespace: null});
+}, 'setter on DOMStringMap must enqueue an attributeChanged reaction when mutating the value of an observed data attribute to the same value');
+
+test(function () {
+    var element = define_new_custom_element(['data-zero']);
+    var instance = document.createElement(element.name);
+    instance.dataset.foo = 'bar';
+    assert_array_equals(element.takeLog().types(), ['constructed']);
+    instance.dataset.foo = 'baz';
+    assert_array_equals(element.takeLog().types(), []);
+}, 'setter on DOMStringMap must not enqueue an attributeChanged reaction when mutating the value of an unobserved data attribute');
+
+test(function () {
+    var element = define_new_custom_element(['data-foo']);
+    var instance = document.createElement(element.name);
+    instance.dataset.foo = 'bar';
+    assert_array_equals(element.takeLog().types(), ['constructed', 'attributeChanged']);
+    delete instance.dataset.foo;
+    var logEntries = element.takeLog();
+    assert_array_equals(logEntries.types(), ['attributeChanged']);
+    assert_attribute_log_entry(logEntries.last(), {name: 'data-foo', oldValue: 'bar', newValue: null, namespace: null});
+}, 'deleter on DOMStringMap must enqueue an attributeChanged reaction when removing an observed data attribute');
+
+test(function () {
+    var element = define_new_custom_element(['data-bar']);
+    var instance = document.createElement(element.name);
+    instance.dataset.foo = 'bar';
+    assert_array_equals(element.takeLog().types(), ['constructed']);
+    delete instance.dataset.foo;
+    assert_array_equals(element.takeLog().types(), []);
+}, 'deleter on DOMStringMap must not enqueue an attributeChanged reaction when removing an unobserved data attribute');
+
+test(function () {
+    var element = define_new_custom_element(['data-foo']);
+    var instance = document.createElement(element.name);
+    assert_array_equals(element.takeLog().types(), ['constructed']);
+    delete instance.dataset.foo;
+    assert_array_equals(element.takeLog().types(), []);
+}, 'deleter on DOMStringMap must not enqueue an attributeChanged reaction when it does not remove a data attribute');
+
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsDocumentexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Document-expected.txt (207519 => 207520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Document-expected.txt        2016-10-19 04:46:39 UTC (rev 207519)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Document-expected.txt        2016-10-19 05:03:11 UTC (rev 207520)
</span><span class="lines">@@ -1,4 +1,5 @@
</span><span class="cx"> 
</span><span class="cx"> FAIL importNode on Document must construct a new custom element when importing a custom element assert_array_equals: lengths differ, expected 1 got 0
</span><span class="cx"> PASS adoptNode on Document must enqueue an adopted reaction when importing a custom element 
</span><ins>+FAIL execCommand on Document must enqueue a disconnected reaction when deleting a custom element from a contenteditable element assert_array_equals: lengths differ, expected 1 got 0
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsDocumenthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Document.html (207519 => 207520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Document.html        2016-10-19 04:46:39 UTC (rev 207519)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Document.html        2016-10-19 05:03:11 UTC (rev 207520)
</span><span class="lines">@@ -1,10 +1,11 @@
</span><span class="cx"> &lt;!DOCTYPE html&gt;
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><del>-&lt;title&gt;Custom Elements: CEReactions on ParentNode interface&lt;/title&gt;
</del><ins>+&lt;title&gt;Custom Elements: CEReactions on Document interface&lt;/title&gt;
</ins><span class="cx"> &lt;meta name=&quot;author&quot; title=&quot;Ryosuke Niwa&quot; href=&quot;mailto:rniwa@webkit.org&quot;&gt;
</span><span class="cx"> &lt;meta name=&quot;assert&quot; content=&quot;importNode and adoptNode of Document interface must have CEReactions&quot;&gt;
</span><span class="cx"> &lt;meta name=&quot;help&quot; content=&quot;https://dom.spec.whatwg.org/#document&quot;&gt;
</span><ins>+&lt;meta name=&quot;help&quot; content=&quot;https://html.spec.whatwg.org/#document&quot;&gt;
</ins><span class="cx"> &lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../resources/custom-elements-helpers.js&quot;&gt;&lt;/script&gt;
</span><span class="lines">@@ -42,6 +43,23 @@
</span><span class="cx">     assert_equals(logEntries.last().newDocument, newDoc);
</span><span class="cx"> }, 'adoptNode on Document must enqueue an adopted reaction when importing a custom element');
</span><span class="cx"> 
</span><ins>+test(function () {
+    var element = define_new_custom_element();
+    var instance = document.createElement(element.name);
+
+    var container = document.createElement('div');
+    container.contentEditable = true;
+    container.appendChild(instance);
+    document.body.appendChild(container);
+
+    assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
+
+    container.focus();
+    document.execCommand('delete', false, null);
+
+    assert_array_equals(element.takeLog().types(), ['disconnected']);
+}, 'execCommand on Document must enqueue a disconnected reaction when deleting a custom element from a contenteditable element');
+
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsElementexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Element-expected.txt (207519 => 207520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Element-expected.txt        2016-10-19 04:46:39 UTC (rev 207519)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Element-expected.txt        2016-10-19 05:03:11 UTC (rev 207520)
</span><span class="lines">@@ -13,11 +13,9 @@
</span><span class="cx"> PASS setAttributeNS on Element must not enqueue an attributeChanged reaction when adding an unobserved attribute 
</span><span class="cx"> PASS setAttributeNS on Element must enqueue an attributeChanged reaction when replacing an existing attribute 
</span><span class="cx"> PASS setAttributeNS on Element must enqueue an attributeChanged reaction when replacing an existing unobserved attribute 
</span><del>-PASS removeAttribute on Element must not enqueue an attributeChanged reaction when removing an attribute that does not exist 
</del><span class="cx"> PASS removeAttribute on Element must not enqueue an attributeChanged reaction when removing an unobserved attribute 
</span><span class="cx"> PASS removeAttribute on Element must enqueue an attributeChanged reaction when removing an existing attribute 
</span><span class="cx"> PASS removeAttribute on Element must not enqueue an attributeChanged reaction when removing an existing unobserved attribute 
</span><del>-PASS removeAttributeNS on Element must not enqueue an attributeChanged reaction when removing an attribute that does not exist 
</del><span class="cx"> PASS removeAttributeNS on Element must not enqueue an attributeChanged reaction when removing an unobserved attribute 
</span><span class="cx"> PASS removeAttributeNS on Element must enqueue an attributeChanged reaction when removing an existing attribute 
</span><span class="cx"> PASS removeAttributeNS on Element must not enqueue an attributeChanged reaction when removing an existing unobserved attribute 
</span><span class="lines">@@ -29,10 +27,17 @@
</span><span class="cx"> PASS setAttributeNodeNS on Element must not enqueue an attributeChanged reaction when adding an unobserved attribute 
</span><span class="cx"> PASS setAttributeNodeNS on Element must enqueue an attributeChanged reaction when replacing an existing attribute 
</span><span class="cx"> PASS setAttributeNodeNS on Element must enqueue an attributeChanged reaction when replacing an existing unobserved attribute 
</span><del>-PASS removeAttributeNode on Element must not enqueue an attributeChanged reaction when removing an attribute that does not exist 
</del><span class="cx"> PASS removeAttributeNode on Element must not enqueue an attributeChanged reaction when removing an unobserved attribute 
</span><span class="cx"> PASS removeAttributeNode on Element must enqueue an attributeChanged reaction when removing an existing attribute 
</span><span class="cx"> PASS removeAttributeNode on Element must not enqueue an attributeChanged reaction when removing an existing unobserved attribute 
</span><del>-PASS undefined must enqueue a connected reaction 
-PASS undefined must enqueue a disconnected reaction, an adopted reaction, and a connected reaction when the custom element was in another document 
</del><ins>+PASS insertAdjacentElement on Element must enqueue a connected reaction 
+PASS insertAdjacentElement on Element must enqueue a disconnected reaction, an adopted reaction, and a connected reaction when the custom element was in another document 
+FAIL innerHTML on Element must enqueue a connected reaction for a newly constructed custom element assert_array_equals: lengths differ, expected 2 got 1
+FAIL innerHTML on Element must enqueue a attributeChanged reaction for a newly constructed custom element assert_array_equals: lengths differ, expected 3 got 1
+FAIL innerHTML on Element must enqueue a disconnected reaction assert_array_equals: lengths differ, expected 1 got 0
+FAIL outerHTML on Element must enqueue a connected reaction for a newly constructed custom element assert_array_equals: lengths differ, expected 2 got 1
+FAIL outerHTML on Element must enqueue a attributeChanged reaction for a newly constructed custom element assert_array_equals: lengths differ, expected 3 got 1
+FAIL outerHTML on Element must enqueue a disconnected reaction assert_array_equals: lengths differ, expected 1 got 0
+FAIL insertAdjacentHTML on Element must enqueue a connected reaction for a newly constructed custom element assert_array_equals: lengths differ, expected 2 got 1
+FAIL insertAdjacentHTML on Element must enqueue a attributeChanged reaction for a newly constructed custom element assert_array_equals: lengths differ, expected 3 got 1
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsElementhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Element.html (207519 => 207520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Element.html        2016-10-19 04:46:39 UTC (rev 207519)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Element.html        2016-10-19 05:03:11 UTC (rev 207520)
</span><span class="lines">@@ -1,10 +1,11 @@
</span><span class="cx"> &lt;!DOCTYPE html&gt;
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><del>-&lt;title&gt;Custom Elements: CEReactions on Node interface&lt;/title&gt;
</del><ins>+&lt;title&gt;Custom Elements: CEReactions on Element interface&lt;/title&gt;
</ins><span class="cx"> &lt;meta name=&quot;author&quot; title=&quot;Ryosuke Niwa&quot; href=&quot;mailto:rniwa@webkit.org&quot;&gt;
</span><del>-&lt;meta name=&quot;assert&quot; content=&quot;id, className, slot, setAttribute, setAttributeNS, removeAttribute, removeAttributeNS, setAttributeNode, setAttributeNodeNS, removeAttributeNode, and insertAdjacentElement of Element interface must have CEReactions&quot;&gt;
</del><ins>+&lt;meta name=&quot;assert&quot; content=&quot;id, className, slot, setAttribute, setAttributeNS, removeAttribute, removeAttributeNS, setAttributeNode, setAttributeNodeNS, removeAttributeNode, insertAdjacentElement, innerHTML, outerHTML, and insertAdjacentHTML of Element interface must have CEReactions&quot;&gt;
</ins><span class="cx"> &lt;meta name=&quot;help&quot; content=&quot;https://dom.spec.whatwg.org/#element&quot;&gt;
</span><ins>+&lt;meta name=&quot;help&quot; content=&quot;https://w3c.github.io/DOM-Parsing/&quot;&gt;
</ins><span class="cx"> &lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../resources/custom-elements-helpers.js&quot;&gt;&lt;/script&gt;
</span><span class="lines">@@ -54,8 +55,28 @@
</span><span class="cx"> 
</span><span class="cx"> testNodeConnector(function (newContainer, element) {
</span><span class="cx">     newContainer.insertAdjacentElement('afterBegin', element);
</span><del>-});
</del><ins>+}, 'insertAdjacentElement on Element');
</ins><span class="cx"> 
</span><ins>+testInsertingMarkup(function (newContainer, markup) {
+    newContainer.innerHTML = markup;
+}, 'innerHTML on Element');
+
+testNodeDisconnector(function (customElement) {
+    customElement.parentNode.innerHTML = '';
+}, 'innerHTML on Element');
+
+testInsertingMarkup(function (newContainer, markup) {
+    newContainer.firstChild.outerHTML = markup;
+}, 'outerHTML on Element');
+
+testNodeDisconnector(function (customElement) {
+    customElement.outerHTML = '';
+}, 'outerHTML on Element');
+
+testInsertingMarkup(function (newContainer, markup) {
+    newContainer.insertAdjacentHTML('afterBegin', markup);
+}, 'insertAdjacentHTML on Element');
+
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsElementContentEditableexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/ElementContentEditable-expected.txt (0 => 207520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/ElementContentEditable-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/ElementContentEditable-expected.txt        2016-10-19 05:03:11 UTC (rev 207520)
</span><span class="lines">@@ -0,0 +1,4 @@
</span><ins>+
+FAIL contentEditable on ElementContentEditable must enqueue an attributeChanged reaction when adding contenteditable content attribute assert_array_equals: lengths differ, expected 1 got 0
+FAIL contentEditable on ElementContentEditable must enqueue an attributeChanged reaction when replacing an existing attribute assert_array_equals: lengths differ, expected 2 got 1
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsElementContentEditablehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/ElementContentEditable.html (0 => 207520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/ElementContentEditable.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/ElementContentEditable.html        2016-10-19 05:03:11 UTC (rev 207520)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;Custom Elements: CEReactions on ElementContentEditable interface&lt;/title&gt;
+&lt;meta name=&quot;author&quot; title=&quot;Ryosuke Niwa&quot; href=&quot;mailto:rniwa@webkit.org&quot;&gt;
+&lt;meta name=&quot;assert&quot; content=&quot;contentEditable of ElementContentEditable interface must have CEReactions&quot;&gt;
+&lt;meta name=&quot;help&quot; content=&quot;https://html.spec.whatwg.org/#elementcontenteditable&quot;&gt;
+&lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/custom-elements-helpers.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;./resources/reactions.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+
+testReflectAttribute('contentEditable', 'contenteditable', 'true', 'false', 'contentEditable on ElementContentEditable');
+
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsHTMLElementexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLElement-expected.txt (0 => 207520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLElement-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLElement-expected.txt        2016-10-19 05:03:11 UTC (rev 207520)
</span><span class="lines">@@ -0,0 +1,26 @@
</span><ins>+
+FAIL title on HTMLElement must enqueue an attributeChanged reaction when adding title content attribute assert_array_equals: lengths differ, expected 1 got 0
+FAIL title on HTMLElement must enqueue an attributeChanged reaction when replacing an existing attribute assert_array_equals: lengths differ, expected 2 got 1
+FAIL lang on HTMLElement must enqueue an attributeChanged reaction when adding lang content attribute assert_array_equals: lengths differ, expected 1 got 0
+FAIL lang on HTMLElement must enqueue an attributeChanged reaction when replacing an existing attribute assert_array_equals: lengths differ, expected 2 got 1
+FAIL translate on HTMLElement must enqueue an attributeChanged reaction when adding translate content attribute assert_array_equals: lengths differ, expected 1 got 0
+FAIL translate on HTMLElement must enqueue an attributeChanged reaction when replacing an existing attribute assert_array_equals: lengths differ, expected 2 got 1
+FAIL dir on HTMLElement must enqueue an attributeChanged reaction when adding dir content attribute assert_array_equals: lengths differ, expected 1 got 0
+FAIL dir on HTMLElement must enqueue an attributeChanged reaction when replacing an existing attribute assert_array_equals: lengths differ, expected 2 got 1
+FAIL hidden on HTMLElement must enqueue an attributeChanged reaction when adding hidden content attribute assert_array_equals: lengths differ, expected 1 got 0
+FAIL hidden on HTMLElement must enqueue an attributeChanged reaction when replacing an existing attribute assert_array_equals: lengths differ, expected 2 got 1
+FAIL tabIndex on HTMLElement must enqueue an attributeChanged reaction when adding tabindex content attribute assert_array_equals: lengths differ, expected 1 got 0
+FAIL tabIndex on HTMLElement must enqueue an attributeChanged reaction when replacing an existing attribute assert_array_equals: lengths differ, expected 2 got 1
+FAIL accessKey on HTMLElement must enqueue an attributeChanged reaction when adding accesskey content attribute assert_array_equals: lengths differ, expected 1 got 0
+FAIL accessKey on HTMLElement must enqueue an attributeChanged reaction when replacing an existing attribute assert_array_equals: lengths differ, expected 2 got 1
+FAIL draggable on HTMLElement must enqueue an attributeChanged reaction when adding draggable content attribute assert_array_equals: lengths differ, expected 1 got 0
+FAIL draggable on HTMLElement must enqueue an attributeChanged reaction when replacing an existing attribute assert_array_equals: lengths differ, expected 2 got 1
+FAIL dropzone on HTMLElement must enqueue an attributeChanged reaction when adding dropzone content attribute assert_array_equals: lengths differ, expected 1 got 0
+FAIL dropzone on HTMLElement must enqueue an attributeChanged reaction when replacing an existing attribute assert_array_equals: lengths differ, expected 2 got 1
+FAIL contextMenu on HTMLElement must enqueue an attributeChanged reaction when adding contextmenu content attribute assert_array_equals: lengths differ, expected 1 got 0
+FAIL contextMenu on HTMLElement must enqueue an attributeChanged reaction when replacing an existing attribute assert_array_equals: lengths differ, expected 2 got 1
+FAIL spellcheck on HTMLElement must enqueue an attributeChanged reaction when adding spellcheck content attribute assert_array_equals: lengths differ, expected 1 got 0
+FAIL spellcheck on HTMLElement must enqueue an attributeChanged reaction when replacing an existing attribute assert_array_equals: lengths differ, expected 2 got 1
+FAIL innerText on HTMLElement must enqueue a disconnected reaction assert_array_equals: lengths differ, expected 1 got 0
+FAIL outerText on HTMLElement must enqueue a disconnected reaction assert_array_equals: lengths differ, expected 1 got 0
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsHTMLElementhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLElement.html (0 => 207520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLElement.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLElement.html        2016-10-19 05:03:11 UTC (rev 207520)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;Custom Elements: CEReactions on HTMLElement interface&lt;/title&gt;
+&lt;meta name=&quot;author&quot; title=&quot;Ryosuke Niwa&quot; href=&quot;mailto:rniwa@webkit.org&quot;&gt;
+&lt;meta name=&quot;assert&quot; content=&quot;title, lang, translate, dir, hidden, tabIndex, accessKey, draggable, dropzone, contextMenu, spellcheck, innerText, and outerText of HTMLElement interface must have CEReactions&quot;&gt;
+&lt;meta name=&quot;help&quot; content=&quot;https://html.spec.whatwg.org/#htmlelement&quot;&gt;
+&lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/custom-elements-helpers.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;./resources/reactions.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+
+testReflectAttribute('title', 'title', 'foo', 'bar', 'title on HTMLElement');
+testReflectAttribute('lang', 'lang', 'en', 'zh', 'lang on HTMLElement');
+testReflectAttributeWithContentValues('translate', 'translate', true, 'yes', false, 'no', 'translate on HTMLElement');
+testReflectAttribute('dir', 'dir', 'ltr', 'rtl', 'dir on HTMLElement');
+testReflectBooleanAttribute('hidden', 'hidden', 'hidden on HTMLElement');
+testReflectAttribute('tabIndex', 'tabindex', '0', '1', 'tabIndex on HTMLElement');
+testReflectAttribute('accessKey', 'accesskey', 'a', 'b', 'accessKey on HTMLElement');
+testReflectAttributeWithContentValues('draggable', 'draggable', true, 'true', false, 'false', 'draggable on HTMLElement');
+testReflectAttribute('dropzone', 'dropzone', 'copy', 'move', 'dropzone on HTMLElement');
+testReflectAttribute('contextMenu', 'contextmenu', 'menu1', 'menu2', 'contextMenu on HTMLElement');
+testReflectAttributeWithContentValues('spellcheck', 'spellcheck', true, 'true', false, 'false', 'spellcheck on HTMLElement');
+
+testNodeDisconnector(function (customElement) {
+    customElement.parentNode.innerText = '';
+}, 'innerText on HTMLElement');
+
+if ('outerText' in HTMLElement.prototype) {
+    // Not yet to be in the standard but all but Gecko supports this property: https://github.com/whatwg/html/issues/668
+    testNodeDisconnector(function (customElement) {
+        customElement.outerText = '';
+    }, 'outerText on HTMLElement');
+}
+
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsNamedNodeMapexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/NamedNodeMap-expected.txt (207519 => 207520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/NamedNodeMap-expected.txt        2016-10-19 04:46:39 UTC (rev 207519)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/NamedNodeMap-expected.txt        2016-10-19 05:03:11 UTC (rev 207520)
</span><span class="lines">@@ -7,11 +7,9 @@
</span><span class="cx"> PASS setNamedItemNS on NamedNodeMap must not enqueue an attributeChanged reaction when adding an unobserved attribute 
</span><span class="cx"> PASS setNamedItemNS on NamedNodeMap must enqueue an attributeChanged reaction when replacing an existing attribute 
</span><span class="cx"> PASS setNamedItemNS on NamedNodeMap must enqueue an attributeChanged reaction when replacing an existing unobserved attribute 
</span><del>-FAIL removeNamedItem on NamedNodeMap must not enqueue an attributeChanged reaction when removing an attribute that does not exist The object can not be found here.
</del><span class="cx"> PASS removeNamedItem on NamedNodeMap must not enqueue an attributeChanged reaction when removing an unobserved attribute 
</span><span class="cx"> PASS removeNamedItem on NamedNodeMap must enqueue an attributeChanged reaction when removing an existing attribute 
</span><span class="cx"> PASS removeNamedItem on NamedNodeMap must not enqueue an attributeChanged reaction when removing an existing unobserved attribute 
</span><del>-FAIL removeNamedItemNS on NamedNodeMap must not enqueue an attributeChanged reaction when removing an attribute that does not exist The object can not be found here.
</del><span class="cx"> PASS removeNamedItemNS on NamedNodeMap must not enqueue an attributeChanged reaction when removing an unobserved attribute 
</span><span class="cx"> PASS removeNamedItemNS on NamedNodeMap must enqueue an attributeChanged reaction when removing an existing attribute 
</span><span class="cx"> PASS removeNamedItemNS on NamedNodeMap must not enqueue an attributeChanged reaction when removing an existing unobserved attribute 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsNamedNodeMaphtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/NamedNodeMap.html (207519 => 207520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/NamedNodeMap.html        2016-10-19 04:46:39 UTC (rev 207519)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/NamedNodeMap.html        2016-10-19 05:03:11 UTC (rev 207520)
</span><span class="lines">@@ -28,11 +28,11 @@
</span><span class="cx"> 
</span><span class="cx"> testAttributeRemover(function (element, name) {
</span><span class="cx">     element.attributes.removeNamedItem(name);
</span><del>-}, 'removeNamedItem on NamedNodeMap');
</del><ins>+}, 'removeNamedItem on NamedNodeMap', {onlyExistingAttribute: true});
</ins><span class="cx"> 
</span><span class="cx"> testAttributeRemover(function (element, name) {
</span><span class="cx">     element.attributes.removeNamedItemNS(null, name);
</span><del>-}, 'removeNamedItemNS on NamedNodeMap');
</del><ins>+}, 'removeNamedItemNS on NamedNodeMap', {onlyExistingAttribute: true});
</ins><span class="cx"> 
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsRangeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Range-expected.txt (207519 => 207520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Range-expected.txt        2016-10-19 04:46:39 UTC (rev 207519)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Range-expected.txt        2016-10-19 05:03:11 UTC (rev 207520)
</span><span class="lines">@@ -6,6 +6,8 @@
</span><span class="cx"> FAIL cloneContents on Range must enqueue an attributeChanged reaction when cloning an element only for observed attributes assert_array_equals: lengths differ, expected 3 got 1
</span><span class="cx"> PASS insertNode on Range must enqueue a connected reaction 
</span><span class="cx"> PASS insertNode on Range must enqueue a disconnected reaction, an adopted reaction, and a connected reaction when the custom element was in another document 
</span><del>-PASS insertNode on Range must enqueue a connected reaction 
-PASS insertNode on Range must enqueue a disconnected reaction, an adopted reaction, and a connected reaction when the custom element was in another document 
</del><ins>+PASS surroundContents on Range must enqueue a connected reaction 
+PASS surroundContents on Range must enqueue a disconnected reaction, an adopted reaction, and a connected reaction when the custom element was in another document 
+FAIL createContextualFragment on Range must construct a custom element assert_equals: expected (function) function &quot;class CustomElement extends HTMLElement {
+        constru...&quot; but got (object) object &quot;[object Object]&quot;
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsRangehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Range.html (207519 => 207520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Range.html        2016-10-19 04:46:39 UTC (rev 207519)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Range.html        2016-10-19 05:03:11 UTC (rev 207520)
</span><span class="lines">@@ -42,8 +42,13 @@
</span><span class="cx">     var range = document.createRange();
</span><span class="cx">     range.selectNodeContents(container);
</span><span class="cx">     range.surroundContents(customElement);
</span><del>-}, 'insertNode on Range');
</del><ins>+}, 'surroundContents on Range');
</ins><span class="cx"> 
</span><ins>+testParsingMarkup(function (document, markup) {
+    var range = document.createRange();
+    return range.createContextualFragment(markup);
+}, 'createContextualFragment on Range');
+
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsSelectionexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Selection-expected.txt (0 => 207520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Selection-expected.txt                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Selection-expected.txt        2016-10-19 05:03:11 UTC (rev 207520)
</span><span class="lines">@@ -0,0 +1,3 @@
</span><ins>+
+FAIL deleteFromDocument on Selection must enqueue a disconnected reaction assert_array_equals: lengths differ, expected 1 got 0
+
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsSelectionhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Selection.html (0 => 207520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Selection.html                                (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Selection.html        2016-10-19 05:03:11 UTC (rev 207520)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;Custom Elements: CEReactions on Selection interface&lt;/title&gt;
+&lt;meta name=&quot;author&quot; title=&quot;Ryosuke Niwa&quot; href=&quot;mailto:rniwa@webkit.org&quot;&gt;
+&lt;meta name=&quot;assert&quot; content=&quot;deleteFromDocument of Selection interface must have CEReactions&quot;&gt;
+&lt;meta name=&quot;help&quot; content=&quot;http://w3c.github.io/selection-api/#selection-interface&quot;&gt;
+&lt;script src=&quot;/resources/testharness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;/resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;../resources/custom-elements-helpers.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;./resources/reactions.js&quot;&gt;&lt;/script&gt;
+&lt;/head&gt;
+&lt;body&gt;
+&lt;div id=&quot;log&quot;&gt;&lt;/div&gt;
+&lt;script&gt;
+
+testNodeDisconnector(function (customElement, window) {
+    let selection = window.getSelection();
+    let parent = customElement.parentNode;
+
+    // WebKit and Blink &quot;normalizes&quot; selection in selectAllChildren and not select the empty customElement.
+    // Workaround this orthogonal non-standard behavior by inserting text nodes around the custom element.
+    parent.prepend(document.createTextNode('start'));
+    parent.append(document.createTextNode('end'));
+
+    selection.selectAllChildren(parent);
+    selection.deleteFromDocument();
+}, 'deleteFromDocument on Selection');
+
+&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsresourcesreactionsjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/resources/reactions.js (207519 => 207520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/resources/reactions.js        2016-10-19 04:46:39 UTC (rev 207519)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/resources/reactions.js        2016-10-19 05:03:11 UTC (rev 207520)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx">         assert_array_equals(element.takeLog().types(), ['constructed']);
</span><span class="cx">         container.appendChild(instance);
</span><span class="cx">         assert_array_equals(element.takeLog().types(), ['connected']);
</span><del>-        testFunction(instance);
</del><ins>+        testFunction(instance, window);
</ins><span class="cx">         assert_array_equals(element.takeLog().types(), ['disconnected']);
</span><span class="cx">     }, name + ' must enqueue a disconnected reaction');
</span><span class="cx"> 
</span><span class="lines">@@ -46,6 +46,40 @@
</span><span class="cx">     container.parentNode.removeChild(container);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+function testInsertingMarkup(testFunction, name) {
+    let container = document.createElement('div');
+    container.appendChild(document.createElement('div'));
+    document.body.appendChild(container);
+
+    test(function () {
+        var element = define_new_custom_element();
+        testFunction(container, `&lt;${element.name}&gt;&lt;/${element.name}&gt;`);
+        assert_array_equals(element.takeLog().types(), ['constructed', 'connected']);
+    }, name + ' must enqueue a connected reaction for a newly constructed custom element');
+
+    test(function () {
+        var element = define_new_custom_element(['title']);
+        testFunction(container, `&lt;${element.name} id=&quot;hello&quot; title=&quot;hi&quot;&gt;&lt;/${element.name}&gt;`);
+        var logEntries = element.takeLog();
+        assert_array_equals(logEntries.types(), ['constructed', 'attributeChanged', 'connected']);
+        assert_attribute_log_entry(logEntries[1], {name: 'title', oldValue: null, newValue: 'hi', namespace: null});
+    }, name + ' must enqueue a attributeChanged reaction for a newly constructed custom element');
+
+    container.parentNode.removeChild(container);
+}
+
+function testParsingMarkup(testFunction, name) {
+    test(function () {
+        var element = define_new_custom_element(['id']);
+        assert_array_equals(element.takeLog().types(), []);
+        var instance = testFunction(document, `&lt;${element.name} id=&quot;hello&quot; class=&quot;foo&quot;&gt;&lt;/${element.name}&gt;`);
+        assert_equals(Object.getPrototypeOf(instance.querySelector(element.name)), element.class);
+        var logEntries = element.takeLog();
+        assert_array_equals(logEntries.types(), ['constructed', 'attributeChanged']);
+        assert_attribute_log_entry(logEntries[1], {name: 'id', oldValue: null, newValue: 'hello', namespace: null});
+    }, name + ' must construct a custom element');
+}
+
</ins><span class="cx"> function testCloner(testFunction, name) {
</span><span class="cx">     let container = document.createElement('div');
</span><span class="cx">     container.appendChild(document.createElement('div'));
</span><span class="lines">@@ -92,7 +126,7 @@
</span><span class="cx">     }, name + ' must enqueue an attributeChanged reaction when cloning an element only for observed attributes');
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function testReflectAttribute(jsAttributeName, contentAttributeName, validValue1, validValue2, name) {
</del><ins>+function testReflectAttributeWithContentValues(jsAttributeName, contentAttributeName, validValue1, contentValue1, validValue2, contentValue2, name) {
</ins><span class="cx">     test(function () {
</span><span class="cx">         var element = define_new_custom_element([contentAttributeName]);
</span><span class="cx">         var instance = document.createElement(element.name);
</span><span class="lines">@@ -100,7 +134,8 @@
</span><span class="cx">         instance[jsAttributeName] = validValue1;
</span><span class="cx">         var logEntries = element.takeLog();
</span><span class="cx">         assert_array_equals(logEntries.types(), ['attributeChanged']);
</span><del>-        assert_attribute_log_entry(logEntries.last(), {name: contentAttributeName, oldValue: null, newValue: validValue1, namespace: null});
</del><ins>+
+        assert_attribute_log_entry(logEntries.last(), {name: contentAttributeName, oldValue: null, newValue: contentValue1, namespace: null});
</ins><span class="cx">     }, name + ' must enqueue an attributeChanged reaction when adding ' + contentAttributeName + ' content attribute');
</span><span class="cx"> 
</span><span class="cx">     test(function () {
</span><span class="lines">@@ -111,10 +146,18 @@
</span><span class="cx">         instance[jsAttributeName] = validValue2;
</span><span class="cx">         var logEntries = element.takeLog();
</span><span class="cx">         assert_array_equals(logEntries.types(), ['attributeChanged']);
</span><del>-        assert_attribute_log_entry(logEntries.last(), {name: contentAttributeName, oldValue: validValue1, newValue: validValue2, namespace: null});
</del><ins>+        assert_attribute_log_entry(logEntries.last(), {name: contentAttributeName, oldValue: contentValue1, newValue: contentValue2, namespace: null});
</ins><span class="cx">     }, name + ' must enqueue an attributeChanged reaction when replacing an existing attribute');
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+function testReflectAttribute(jsAttributeName, contentAttributeName, validValue1, validValue2, name) {
+    testReflectAttributeWithContentValues(jsAttributeName, contentAttributeName, validValue1, validValue1, validValue2, validValue2, name);
+}
+
+function testReflectBooleanAttribute(jsAttributeName, contentAttributeName, name) {
+    testReflectAttributeWithContentValues(jsAttributeName, contentAttributeName, true, '', false, null, name);
+}
+
</ins><span class="cx"> function testAttributeAdder(testFunction, name) {
</span><span class="cx">     test(function () {
</span><span class="cx">         var element = define_new_custom_element(['id']);
</span><span class="lines">@@ -177,14 +220,16 @@
</span><span class="cx">     }, name + ' must not enqueue an attributeChanged reaction when replacing an existing unobserved attribute');
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function testAttributeRemover(testFunction, name) {
-    test(function () {
-        var element = define_new_custom_element(['title']);
-        var instance = document.createElement(element.name);
-        assert_array_equals(element.takeLog().types(), ['constructed']);
-        testFunction(instance, 'title');
-        assert_array_equals(element.takeLog().types(), []);
-    }, name + ' must not enqueue an attributeChanged reaction when removing an attribute that does not exist');
</del><ins>+function testAttributeRemover(testFunction, name, options) {
+    if (options &amp;&amp; !options.onlyExistingAttribute) {
+        test(function () {
+            var element = define_new_custom_element(['title']);
+            var instance = document.createElement(element.name);
+            assert_array_equals(element.takeLog().types(), ['constructed']);
+            testFunction(instance, 'title');
+            assert_array_equals(element.takeLog().types(), []);
+        }, name + ' must not enqueue an attributeChanged reaction when removing an attribute that does not exist');
+    }
</ins><span class="cx"> 
</span><span class="cx">     test(function () {
</span><span class="cx">         var element = define_new_custom_element([]);
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestscustomelementsreactionsw3cimportlog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/w3c-import.log (207519 => 207520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/w3c-import.log        2016-10-19 04:46:39 UTC (rev 207519)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/w3c-import.log        2016-10-19 05:03:11 UTC (rev 207520)
</span><span class="lines">@@ -17,10 +17,14 @@
</span><span class="cx"> List of files:
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Attr.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/ChildNode.html
</span><ins>+/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/DOMStringMap.html
</ins><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/DOMTokenList.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Document.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Element.html
</span><ins>+/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/ElementContentEditable.html
+/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/HTMLElement.html
</ins><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/NamedNodeMap.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Node.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/ParentNode.html
</span><span class="cx"> /LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Range.html
</span><ins>+/LayoutTests/imported/w3c/web-platform-tests/custom-elements/reactions/Selection.html
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestscustomelementsresourcescustomelementshelpersjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js (207519 => 207520)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js        2016-10-19 04:46:39 UTC (rev 207519)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/custom-elements/resources/custom-elements-helpers.js        2016-10-19 05:03:11 UTC (rev 207520)
</span><span class="lines">@@ -65,6 +65,7 @@
</span><span class="cx"> 
</span><span class="cx">     return {
</span><span class="cx">         name: name,
</span><ins>+        class: CustomElement,
</ins><span class="cx">         takeLog: function () {
</span><span class="cx">             let currentLog = log; log = [];
</span><span class="cx">             currentLog.types = () =&gt; currentLog.map((entry) =&gt; entry.type);
</span></span></pre>
</div>
</div>

</body>
</html>