<!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>[204390] trunk</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/204390">204390</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-08-11 15:27:17 -0700 (Thu, 11 Aug 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Align Range.surroundContents() with the latest DOM specification
https://bugs.webkit.org/show_bug.cgi?id=160777

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline W3C test now that all checks are passing.

* web-platform-tests/dom/ranges/Range-surroundContents-expected.txt:

Source/WebCore:

Align Range.surroundContents() with the latest DOM specification:
- https://dom.spec.whatwg.org/#dom-range-surroundcontents

In particular, the following changes were made:
1. Drop early check to see if startContainer() accepts children like
   newParent. This check is not in the specification. Let the later
   call to Range.insertNode() take care of doing the check and
   throwing.
2. Drop early check to see if newParent contains the range's start
   node, for the same reasons as above.
3. Move extractContents() call *before* removing newParent's children
   to match the order in the specification (steps 3 &amp; 4).

This makes our behavior much closer to Firefox's as well.

No new tests, rebaselined existing W3C test.

* dom/Range.cpp:
(WebCore::Range::surroundContents):

LayoutTests:

Rebaseline existing due to behavior change.

* fast/dom/Range/surroundContents-1-expected.txt:
* fast/dom/Range/surroundContents-1.html:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastdomRangesurroundContents1html">trunk/LayoutTests/fast/dom/Range/surroundContents-1.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdomrangesRangesurroundContentsexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/ranges/Range-surroundContents-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoredomRangecpp">trunk/Source/WebCore/dom/Range.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastdomRangesurroundContents1expectedtxt">trunk/LayoutTests/fast/dom/Range/surroundContents-1-expected.txt</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsplatformeflfastdomRangesurroundContents1expectedtxt">trunk/LayoutTests/platform/efl/fast/dom/Range/surroundContents-1-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformgtkfastdomRangesurroundContents1expectedtxt">trunk/LayoutTests/platform/gtk/fast/dom/Range/surroundContents-1-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorfastdomRangesurroundContents1expectedtxt">trunk/LayoutTests/platform/ios-simulator/fast/dom/Range/surroundContents-1-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformmacfastdomRangesurroundContents1expectedtxt">trunk/LayoutTests/platform/mac/fast/dom/Range/surroundContents-1-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformwinfastdomRangesurroundContents1expectedtxt">trunk/LayoutTests/platform/win/fast/dom/Range/surroundContents-1-expected.txt</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (204389 => 204390)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-08-11 21:25:08 UTC (rev 204389)
+++ trunk/LayoutTests/ChangeLog        2016-08-11 22:27:17 UTC (rev 204390)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-08-11  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Align Range.surroundContents() with the latest DOM specification
+        https://bugs.webkit.org/show_bug.cgi?id=160777
+
+        Reviewed by Ryosuke Niwa.
+
+        Rebaseline existing due to behavior change.
+
+        * fast/dom/Range/surroundContents-1-expected.txt:
+        * fast/dom/Range/surroundContents-1.html:
+
</ins><span class="cx"> 2016-08-11  Ryan Haddad  &lt;ryanhaddad@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Rebaseline more iOS tests after r204363.
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomRangesurroundContents1expectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/Range/surroundContents-1-expected.txt (0 => 204390)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Range/surroundContents-1-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/dom/Range/surroundContents-1-expected.txt        2016-08-11 22:27:17 UTC (rev 204390)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+This tests for HIERARCHY_REQUEST_ERRs when calling Range.surroundContents().
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS range.surroundContents(select) threw exception HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree..
+PASS range.surroundContents(insert) did not throw exception.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastdomRangesurroundContents1html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/Range/surroundContents-1.html (204389 => 204390)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Range/surroundContents-1.html        2016-08-11 21:25:08 UTC (rev 204389)
+++ trunk/LayoutTests/fast/dom/Range/surroundContents-1.html        2016-08-11 22:27:17 UTC (rev 204390)
</span><span class="lines">@@ -1,35 +1,22 @@
</span><del>-&lt;p&gt;This tests for HIERARCHY_REQUEST_ERRs when calling Range::surroundContents.&lt;/p&gt;
-&lt;div id=&quot;select&quot; style=&quot;border: 1px solid blue;&quot;&gt;Hello world.&lt;/div&gt;
-&lt;div id=&quot;insert&quot; style=&quot;border: 1px solid red;&quot;&gt;&lt;/div&gt;
</del><ins>+&lt;!DOCTYPE html&gt;
+&lt;body&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;div id=&quot;select&quot;&gt;Hello world.&lt;/div&gt;
+&lt;div id=&quot;insert&quot;&gt;&lt;/div&gt;
</ins><span class="cx"> &lt;ul id=&quot;console&quot;&gt;&lt;/ul&gt;
</span><span class="cx"> &lt;script&gt;
</span><del>-function log(str) {
-    var li = document.createElement(&quot;li&quot;);
-    li.appendChild(document.createTextNode(str));
-    var console = document.getElementById(&quot;console&quot;);
-    console.appendChild(li);
-}
</del><ins>+description(&quot;This tests for HIERARCHY_REQUEST_ERRs when calling Range.surroundContents().&quot;);
</ins><span class="cx"> 
</span><del>-var range = document.createRange();
</del><span class="cx"> var select = document.getElementById(&quot;select&quot;);
</span><span class="cx"> var text = select.firstChild;
</span><del>-
</del><span class="cx"> var insert = document.getElementById(&quot;insert&quot;);
</span><span class="cx"> 
</span><ins>+var range = document.createRange();
</ins><span class="cx"> range.setStart(text, 0);
</span><span class="cx"> range.setEnd(text, text.length);
</span><span class="cx"> 
</span><del>-try {
-    range.surroundContents(select);    
-} catch (e) {
-    var error = &quot;HierarchyRequestError (DOM Exception 3): The operation would yield an incorrect node tree.&quot;;
-    if (e != error)
-        log (&quot;Failure, expected: &quot; + error);
-}
-
-try {
-    range.surroundContents(insert); 
-} catch (e) {
-    log (&quot;Failure: &quot; + error);
-}
</del><ins>+shouldThrowErrorName(&quot;range.surroundContents(select)&quot;, &quot;HierarchyRequestError&quot;);
+shouldNotThrow(&quot;range.surroundContents(insert)&quot;);
</ins><span class="cx"> &lt;/script&gt;
</span><ins>+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (204389 => 204390)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2016-08-11 21:25:08 UTC (rev 204389)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2016-08-11 22:27:17 UTC (rev 204390)
</span><span class="lines">@@ -1,5 +1,16 @@
</span><span class="cx"> 2016-08-11  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Align Range.surroundContents() with the latest DOM specification
+        https://bugs.webkit.org/show_bug.cgi?id=160777
+
+        Reviewed by Ryosuke Niwa.
+
+        Rebaseline W3C test now that all checks are passing.
+
+        * web-platform-tests/dom/ranges/Range-surroundContents-expected.txt:
+
+2016-08-11  Chris Dumez  &lt;cdumez@apple.com&gt;
+
</ins><span class="cx">         Move dataset attribute from Element to HTMLElement / SVGElement
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=160766
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdomrangesRangesurroundContentsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/ranges/Range-surroundContents-expected.txt (204389 => 204390)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/ranges/Range-surroundContents-expected.txt        2016-08-11 21:25:08 UTC (rev 204389)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/ranges/Range-surroundContents-expected.txt        2016-08-11 22:27:17 UTC (rev 204390)
</span><span class="lines">@@ -1,12 +1,8 @@
</span><span class="cx"> To debug test failures, add a query parameter &quot;subtest&quot; with the test id (like &quot;?subtest=5,16&quot;). Only that test will be run. Then you can look at the resulting iframes in the DOM.
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-FAIL 0,0: resulting DOM for range [paras[0].firstChild, 0, paras[0].firstChild, 0], node paras[0] assert_true: First differing node: expected Element node &lt;p id=&quot;b&quot; style=&quot;display:none&quot;&gt;Ijklmnop
-&lt;/p&gt;, got Text node &quot;Äb̈c̈d̈ëf̈g̈ḧ
-&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 0,0: resulting range position for range [paras[0].firstChild, 0, paras[0].firstChild, 0], node paras[0] assert_true: First differing node: expected Element node &lt;p id=&quot;b&quot; style=&quot;display:none&quot;&gt;Ijklmnop
-&lt;/p&gt;, got Text node &quot;Äb̈c̈d̈ëf̈g̈ḧ
-&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 0,0: resulting DOM for range [paras[0].firstChild, 0, paras[0].firstChild, 0], node paras[0] 
+PASS 0,0: resulting range position for range [paras[0].firstChild, 0, paras[0].firstChild, 0], node paras[0] 
</ins><span class="cx"> PASS 0,1: resulting DOM for range [paras[0].firstChild, 0, paras[0].firstChild, 0], node paras[0].firstChild 
</span><span class="cx"> PASS 0,1: resulting range position for range [paras[0].firstChild, 0, paras[0].firstChild, 0], node paras[0].firstChild 
</span><span class="cx"> PASS 0,2: resulting DOM for range [paras[0].firstChild, 0, paras[0].firstChild, 0], node paras[1].firstChild 
</span><span class="lines">@@ -49,18 +45,10 @@
</span><span class="cx"> PASS 0,20: resulting range position for range [paras[0].firstChild, 0, paras[0].firstChild, 0], node doctype 
</span><span class="cx"> PASS 0,21: resulting DOM for range [paras[0].firstChild, 0, paras[0].firstChild, 0], node foreignDoctype 
</span><span class="cx"> PASS 0,21: resulting range position for range [paras[0].firstChild, 0, paras[0].firstChild, 0], node foreignDoctype 
</span><del>-FAIL 1,0: resulting DOM for range [paras[0].firstChild, 0, paras[0].firstChild, 1], node paras[0] assert_true: First differing node: expected Element node &lt;p id=&quot;b&quot; style=&quot;display:none&quot;&gt;Ijklmnop
-&lt;/p&gt;, got Text node &quot;Äb̈c̈d̈ëf̈g̈ḧ
-&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 1,0: resulting range position for range [paras[0].firstChild, 0, paras[0].firstChild, 1], node paras[0] assert_true: First differing node: expected Element node &lt;p id=&quot;b&quot; style=&quot;display:none&quot;&gt;Ijklmnop
-&lt;/p&gt;, got Text node &quot;Äb̈c̈d̈ëf̈g̈ḧ
-&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 1,1: resulting DOM for range [paras[0].firstChild, 0, paras[0].firstChild, 1], node paras[0].firstChild assert_true: First differing node: expected Text node &quot;̈b̈c̈d̈ëf̈g̈ḧ
-&quot;, got Text node &quot;Äb̈c̈d̈ëf̈g̈ḧ
-&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 1,1: resulting range position for range [paras[0].firstChild, 0, paras[0].firstChild, 1], node paras[0].firstChild assert_true: First differing node: expected Text node &quot;̈b̈c̈d̈ëf̈g̈ḧ
-&quot;, got Text node &quot;Äb̈c̈d̈ëf̈g̈ḧ
-&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 1,0: resulting DOM for range [paras[0].firstChild, 0, paras[0].firstChild, 1], node paras[0] 
+PASS 1,0: resulting range position for range [paras[0].firstChild, 0, paras[0].firstChild, 1], node paras[0] 
+PASS 1,1: resulting DOM for range [paras[0].firstChild, 0, paras[0].firstChild, 1], node paras[0].firstChild 
+PASS 1,1: resulting range position for range [paras[0].firstChild, 0, paras[0].firstChild, 1], node paras[0].firstChild 
</ins><span class="cx"> PASS 1,2: resulting DOM for range [paras[0].firstChild, 0, paras[0].firstChild, 1], node paras[1].firstChild 
</span><span class="cx"> PASS 1,2: resulting range position for range [paras[0].firstChild, 0, paras[0].firstChild, 1], node paras[1].firstChild 
</span><span class="cx"> PASS 1,3: resulting DOM for range [paras[0].firstChild, 0, paras[0].firstChild, 1], node foreignPara1 
</span><span class="lines">@@ -101,18 +89,10 @@
</span><span class="cx"> PASS 1,20: resulting range position for range [paras[0].firstChild, 0, paras[0].firstChild, 1], node doctype 
</span><span class="cx"> PASS 1,21: resulting DOM for range [paras[0].firstChild, 0, paras[0].firstChild, 1], node foreignDoctype 
</span><span class="cx"> PASS 1,21: resulting range position for range [paras[0].firstChild, 0, paras[0].firstChild, 1], node foreignDoctype 
</span><del>-FAIL 2,0: resulting DOM for range [paras[0].firstChild, 2, paras[0].firstChild, 8], node paras[0] assert_true: First differing node: expected Element node &lt;p id=&quot;b&quot; style=&quot;display:none&quot;&gt;Ijklmnop
-&lt;/p&gt;, got Text node &quot;Äb̈c̈d̈ëf̈g̈ḧ
-&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 2,0: resulting range position for range [paras[0].firstChild, 2, paras[0].firstChild, 8], node paras[0] assert_true: First differing node: expected Element node &lt;p id=&quot;b&quot; style=&quot;display:none&quot;&gt;Ijklmnop
-&lt;/p&gt;, got Text node &quot;Äb̈c̈d̈ëf̈g̈ḧ
-&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 2,1: resulting DOM for range [paras[0].firstChild, 2, paras[0].firstChild, 8], node paras[0].firstChild assert_true: First differing node: expected Text node &quot;Äëf̈g̈ḧ
-&quot;, got Text node &quot;Äb̈c̈d̈ëf̈g̈ḧ
-&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 2,1: resulting range position for range [paras[0].firstChild, 2, paras[0].firstChild, 8], node paras[0].firstChild assert_true: First differing node: expected Text node &quot;Äëf̈g̈ḧ
-&quot;, got Text node &quot;Äb̈c̈d̈ëf̈g̈ḧ
-&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 2,0: resulting DOM for range [paras[0].firstChild, 2, paras[0].firstChild, 8], node paras[0] 
+PASS 2,0: resulting range position for range [paras[0].firstChild, 2, paras[0].firstChild, 8], node paras[0] 
+PASS 2,1: resulting DOM for range [paras[0].firstChild, 2, paras[0].firstChild, 8], node paras[0].firstChild 
+PASS 2,1: resulting range position for range [paras[0].firstChild, 2, paras[0].firstChild, 8], node paras[0].firstChild 
</ins><span class="cx"> PASS 2,2: resulting DOM for range [paras[0].firstChild, 2, paras[0].firstChild, 8], node paras[1].firstChild 
</span><span class="cx"> PASS 2,2: resulting range position for range [paras[0].firstChild, 2, paras[0].firstChild, 8], node paras[1].firstChild 
</span><span class="cx"> PASS 2,3: resulting DOM for range [paras[0].firstChild, 2, paras[0].firstChild, 8], node foreignPara1 
</span><span class="lines">@@ -153,18 +133,10 @@
</span><span class="cx"> PASS 2,20: resulting range position for range [paras[0].firstChild, 2, paras[0].firstChild, 8], node doctype 
</span><span class="cx"> PASS 2,21: resulting DOM for range [paras[0].firstChild, 2, paras[0].firstChild, 8], node foreignDoctype 
</span><span class="cx"> PASS 2,21: resulting range position for range [paras[0].firstChild, 2, paras[0].firstChild, 8], node foreignDoctype 
</span><del>-FAIL 3,0: resulting DOM for range [paras[0].firstChild, 2, paras[0].firstChild, 9], node paras[0] assert_true: First differing node: expected Element node &lt;p id=&quot;b&quot; style=&quot;display:none&quot;&gt;Ijklmnop
-&lt;/p&gt;, got Text node &quot;Äb̈c̈d̈ëf̈g̈ḧ
-&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 3,0: resulting range position for range [paras[0].firstChild, 2, paras[0].firstChild, 9], node paras[0] assert_true: First differing node: expected Element node &lt;p id=&quot;b&quot; style=&quot;display:none&quot;&gt;Ijklmnop
-&lt;/p&gt;, got Text node &quot;Äb̈c̈d̈ëf̈g̈ḧ
-&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 3,1: resulting DOM for range [paras[0].firstChild, 2, paras[0].firstChild, 9], node paras[0].firstChild assert_true: First differing node: expected Text node &quot;Ä̈f̈g̈ḧ
-&quot;, got Text node &quot;Äb̈c̈d̈ëf̈g̈ḧ
-&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 3,1: resulting range position for range [paras[0].firstChild, 2, paras[0].firstChild, 9], node paras[0].firstChild assert_true: First differing node: expected Text node &quot;Ä̈f̈g̈ḧ
-&quot;, got Text node &quot;Äb̈c̈d̈ëf̈g̈ḧ
-&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 3,0: resulting DOM for range [paras[0].firstChild, 2, paras[0].firstChild, 9], node paras[0] 
+PASS 3,0: resulting range position for range [paras[0].firstChild, 2, paras[0].firstChild, 9], node paras[0] 
+PASS 3,1: resulting DOM for range [paras[0].firstChild, 2, paras[0].firstChild, 9], node paras[0].firstChild 
+PASS 3,1: resulting range position for range [paras[0].firstChild, 2, paras[0].firstChild, 9], node paras[0].firstChild 
</ins><span class="cx"> PASS 3,2: resulting DOM for range [paras[0].firstChild, 2, paras[0].firstChild, 9], node paras[1].firstChild 
</span><span class="cx"> PASS 3,2: resulting range position for range [paras[0].firstChild, 2, paras[0].firstChild, 9], node paras[1].firstChild 
</span><span class="cx"> PASS 3,3: resulting DOM for range [paras[0].firstChild, 2, paras[0].firstChild, 9], node foreignPara1 
</span><span class="lines">@@ -253,10 +225,8 @@
</span><span class="cx"> PASS 5,0: resulting range position for range [paras[1].firstChild, 2, paras[1].firstChild, 9], node paras[0] 
</span><span class="cx"> PASS 5,1: resulting DOM for range [paras[1].firstChild, 2, paras[1].firstChild, 9], node paras[0].firstChild 
</span><span class="cx"> PASS 5,1: resulting range position for range [paras[1].firstChild, 2, paras[1].firstChild, 9], node paras[0].firstChild 
</span><del>-FAIL 5,2: resulting DOM for range [paras[1].firstChild, 2, paras[1].firstChild, 9], node paras[1].firstChild assert_true: First differing node: expected Text node &quot;Ij&quot;, got Text node &quot;Ijklmnop
-&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 5,2: resulting range position for range [paras[1].firstChild, 2, paras[1].firstChild, 9], node paras[1].firstChild assert_true: First differing node: expected Text node &quot;Ij&quot;, got Text node &quot;Ijklmnop
-&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 5,2: resulting DOM for range [paras[1].firstChild, 2, paras[1].firstChild, 9], node paras[1].firstChild 
+PASS 5,2: resulting range position for range [paras[1].firstChild, 2, paras[1].firstChild, 9], node paras[1].firstChild 
</ins><span class="cx"> PASS 5,3: resulting DOM for range [paras[1].firstChild, 2, paras[1].firstChild, 9], node foreignPara1 
</span><span class="cx"> PASS 5,3: resulting range position for range [paras[1].firstChild, 2, paras[1].firstChild, 9], node foreignPara1 
</span><span class="cx"> PASS 5,4: resulting DOM for range [paras[1].firstChild, 2, paras[1].firstChild, 9], node foreignPara1.firstChild 
</span><span class="lines">@@ -305,14 +275,14 @@
</span><span class="cx"> PASS 6,3: resulting range position for range [detachedPara1.firstChild, 0, detachedPara1.firstChild, 0], node foreignPara1 
</span><span class="cx"> PASS 6,4: resulting DOM for range [detachedPara1.firstChild, 0, detachedPara1.firstChild, 0], node foreignPara1.firstChild 
</span><span class="cx"> PASS 6,4: resulting range position for range [detachedPara1.firstChild, 0, detachedPara1.firstChild, 0], node foreignPara1.firstChild 
</span><del>-FAIL 6,5: resulting DOM for range [detachedPara1.firstChild, 0, detachedPara1.firstChild, 0], node detachedPara1 assert_true: First differing node: expected Element node &lt;p&gt;Wxyzabcd&lt;/p&gt;, got Text node &quot;Opqrstuv&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 6,5: resulting range position for range [detachedPara1.firstChild, 0, detachedPara1.firstChild, 0], node detachedPara1 assert_true: First differing node: expected Element node &lt;p&gt;Wxyzabcd&lt;/p&gt;, got Text node &quot;Opqrstuv&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 6,5: resulting DOM for range [detachedPara1.firstChild, 0, detachedPara1.firstChild, 0], node detachedPara1 
+PASS 6,5: resulting range position for range [detachedPara1.firstChild, 0, detachedPara1.firstChild, 0], node detachedPara1 
</ins><span class="cx"> PASS 6,6: resulting DOM for range [detachedPara1.firstChild, 0, detachedPara1.firstChild, 0], node detachedPara1.firstChild 
</span><span class="cx"> PASS 6,6: resulting range position for range [detachedPara1.firstChild, 0, detachedPara1.firstChild, 0], node detachedPara1.firstChild 
</span><span class="cx"> PASS 6,7: resulting DOM for range [detachedPara1.firstChild, 0, detachedPara1.firstChild, 0], node document 
</span><span class="cx"> PASS 6,7: resulting range position for range [detachedPara1.firstChild, 0, detachedPara1.firstChild, 0], node document 
</span><del>-FAIL 6,8: resulting DOM for range [detachedPara1.firstChild, 0, detachedPara1.firstChild, 0], node detachedDiv assert_unreached: DOMs were not equal but we couldn't figure out why Reached unreachable code
-FAIL 6,8: resulting range position for range [detachedPara1.firstChild, 0, detachedPara1.firstChild, 0], node detachedDiv assert_unreached: DOMs were not equal but we couldn't figure out why Reached unreachable code
</del><ins>+PASS 6,8: resulting DOM for range [detachedPara1.firstChild, 0, detachedPara1.firstChild, 0], node detachedDiv 
+PASS 6,8: resulting range position for range [detachedPara1.firstChild, 0, detachedPara1.firstChild, 0], node detachedDiv 
</ins><span class="cx"> PASS 6,9: resulting DOM for range [detachedPara1.firstChild, 0, detachedPara1.firstChild, 0], node foreignDoc 
</span><span class="cx"> PASS 6,9: resulting range position for range [detachedPara1.firstChild, 0, detachedPara1.firstChild, 0], node foreignDoc 
</span><span class="cx"> PASS 6,10: resulting DOM for range [detachedPara1.firstChild, 0, detachedPara1.firstChild, 0], node foreignPara2 
</span><span class="lines">@@ -349,14 +319,14 @@
</span><span class="cx"> PASS 7,3: resulting range position for range [detachedPara1.firstChild, 2, detachedPara1.firstChild, 8], node foreignPara1 
</span><span class="cx"> PASS 7,4: resulting DOM for range [detachedPara1.firstChild, 2, detachedPara1.firstChild, 8], node foreignPara1.firstChild 
</span><span class="cx"> PASS 7,4: resulting range position for range [detachedPara1.firstChild, 2, detachedPara1.firstChild, 8], node foreignPara1.firstChild 
</span><del>-FAIL 7,5: resulting DOM for range [detachedPara1.firstChild, 2, detachedPara1.firstChild, 8], node detachedPara1 assert_true: First differing node: expected Element node &lt;p&gt;Wxyzabcd&lt;/p&gt;, got Text node &quot;Opqrstuv&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 7,5: resulting range position for range [detachedPara1.firstChild, 2, detachedPara1.firstChild, 8], node detachedPara1 assert_true: First differing node: expected Element node &lt;p&gt;Wxyzabcd&lt;/p&gt;, got Text node &quot;Opqrstuv&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 7,6: resulting DOM for range [detachedPara1.firstChild, 2, detachedPara1.firstChild, 8], node detachedPara1.firstChild assert_true: First differing node: expected Text node &quot;Op&quot;, got Text node &quot;Opqrstuv&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 7,6: resulting range position for range [detachedPara1.firstChild, 2, detachedPara1.firstChild, 8], node detachedPara1.firstChild assert_true: First differing node: expected Text node &quot;Op&quot;, got Text node &quot;Opqrstuv&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 7,5: resulting DOM for range [detachedPara1.firstChild, 2, detachedPara1.firstChild, 8], node detachedPara1 
+PASS 7,5: resulting range position for range [detachedPara1.firstChild, 2, detachedPara1.firstChild, 8], node detachedPara1 
+PASS 7,6: resulting DOM for range [detachedPara1.firstChild, 2, detachedPara1.firstChild, 8], node detachedPara1.firstChild 
+PASS 7,6: resulting range position for range [detachedPara1.firstChild, 2, detachedPara1.firstChild, 8], node detachedPara1.firstChild 
</ins><span class="cx"> PASS 7,7: resulting DOM for range [detachedPara1.firstChild, 2, detachedPara1.firstChild, 8], node document 
</span><span class="cx"> PASS 7,7: resulting range position for range [detachedPara1.firstChild, 2, detachedPara1.firstChild, 8], node document 
</span><del>-FAIL 7,8: resulting DOM for range [detachedPara1.firstChild, 2, detachedPara1.firstChild, 8], node detachedDiv assert_unreached: DOMs were not equal but we couldn't figure out why Reached unreachable code
-FAIL 7,8: resulting range position for range [detachedPara1.firstChild, 2, detachedPara1.firstChild, 8], node detachedDiv assert_unreached: DOMs were not equal but we couldn't figure out why Reached unreachable code
</del><ins>+PASS 7,8: resulting DOM for range [detachedPara1.firstChild, 2, detachedPara1.firstChild, 8], node detachedDiv 
+PASS 7,8: resulting range position for range [detachedPara1.firstChild, 2, detachedPara1.firstChild, 8], node detachedDiv 
</ins><span class="cx"> PASS 7,9: resulting DOM for range [detachedPara1.firstChild, 2, detachedPara1.firstChild, 8], node foreignDoc 
</span><span class="cx"> PASS 7,9: resulting range position for range [detachedPara1.firstChild, 2, detachedPara1.firstChild, 8], node foreignDoc 
</span><span class="cx"> PASS 7,10: resulting DOM for range [detachedPara1.firstChild, 2, detachedPara1.firstChild, 8], node foreignPara2 
</span><span class="lines">@@ -389,8 +359,8 @@
</span><span class="cx"> PASS 8,1: resulting range position for range [foreignPara1.firstChild, 0, foreignPara1.firstChild, 0], node paras[0].firstChild 
</span><span class="cx"> PASS 8,2: resulting DOM for range [foreignPara1.firstChild, 0, foreignPara1.firstChild, 0], node paras[1].firstChild 
</span><span class="cx"> PASS 8,2: resulting range position for range [foreignPara1.firstChild, 0, foreignPara1.firstChild, 0], node paras[1].firstChild 
</span><del>-FAIL 8,3: resulting DOM for range [foreignPara1.firstChild, 0, foreignPara1.firstChild, 0], node foreignPara1 assert_true: First differing node: expected Element node &lt;p&gt;Mnopqrst&lt;/p&gt;, got Text node &quot;Efghijkl&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 8,3: resulting range position for range [foreignPara1.firstChild, 0, foreignPara1.firstChild, 0], node foreignPara1 assert_true: First differing node: expected Element node &lt;p&gt;Mnopqrst&lt;/p&gt;, got Text node &quot;Efghijkl&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 8,3: resulting DOM for range [foreignPara1.firstChild, 0, foreignPara1.firstChild, 0], node foreignPara1 
+PASS 8,3: resulting range position for range [foreignPara1.firstChild, 0, foreignPara1.firstChild, 0], node foreignPara1 
</ins><span class="cx"> PASS 8,4: resulting DOM for range [foreignPara1.firstChild, 0, foreignPara1.firstChild, 0], node foreignPara1.firstChild 
</span><span class="cx"> PASS 8,4: resulting range position for range [foreignPara1.firstChild, 0, foreignPara1.firstChild, 0], node foreignPara1.firstChild 
</span><span class="cx"> PASS 8,5: resulting DOM for range [foreignPara1.firstChild, 0, foreignPara1.firstChild, 0], node detachedPara1 
</span><span class="lines">@@ -433,10 +403,10 @@
</span><span class="cx"> PASS 9,1: resulting range position for range [foreignPara1.firstChild, 2, foreignPara1.firstChild, 8], node paras[0].firstChild 
</span><span class="cx"> PASS 9,2: resulting DOM for range [foreignPara1.firstChild, 2, foreignPara1.firstChild, 8], node paras[1].firstChild 
</span><span class="cx"> PASS 9,2: resulting range position for range [foreignPara1.firstChild, 2, foreignPara1.firstChild, 8], node paras[1].firstChild 
</span><del>-FAIL 9,3: resulting DOM for range [foreignPara1.firstChild, 2, foreignPara1.firstChild, 8], node foreignPara1 assert_true: First differing node: expected Element node &lt;p&gt;Mnopqrst&lt;/p&gt;, got Text node &quot;Efghijkl&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 9,3: resulting range position for range [foreignPara1.firstChild, 2, foreignPara1.firstChild, 8], node foreignPara1 assert_true: First differing node: expected Element node &lt;p&gt;Mnopqrst&lt;/p&gt;, got Text node &quot;Efghijkl&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 9,4: resulting DOM for range [foreignPara1.firstChild, 2, foreignPara1.firstChild, 8], node foreignPara1.firstChild assert_true: First differing node: expected Text node &quot;Ef&quot;, got Text node &quot;Efghijkl&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 9,4: resulting range position for range [foreignPara1.firstChild, 2, foreignPara1.firstChild, 8], node foreignPara1.firstChild assert_true: First differing node: expected Text node &quot;Ef&quot;, got Text node &quot;Efghijkl&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 9,3: resulting DOM for range [foreignPara1.firstChild, 2, foreignPara1.firstChild, 8], node foreignPara1 
+PASS 9,3: resulting range position for range [foreignPara1.firstChild, 2, foreignPara1.firstChild, 8], node foreignPara1 
+PASS 9,4: resulting DOM for range [foreignPara1.firstChild, 2, foreignPara1.firstChild, 8], node foreignPara1.firstChild 
+PASS 9,4: resulting range position for range [foreignPara1.firstChild, 2, foreignPara1.firstChild, 8], node foreignPara1.firstChild 
</ins><span class="cx"> PASS 9,5: resulting DOM for range [foreignPara1.firstChild, 2, foreignPara1.firstChild, 8], node detachedPara1 
</span><span class="cx"> PASS 9,5: resulting range position for range [foreignPara1.firstChild, 2, foreignPara1.firstChild, 8], node detachedPara1 
</span><span class="cx"> PASS 9,6: resulting DOM for range [foreignPara1.firstChild, 2, foreignPara1.firstChild, 8], node detachedPara1.firstChild 
</span><span class="lines">@@ -735,12 +705,8 @@
</span><span class="cx"> PASS 15,20: resulting range position for range [foreignDoc.documentElement, 0, foreignDoc.documentElement, 1], node doctype 
</span><span class="cx"> PASS 15,21: resulting DOM for range [foreignDoc.documentElement, 0, foreignDoc.documentElement, 1], node foreignDoctype 
</span><span class="cx"> PASS 15,21: resulting range position for range [foreignDoc.documentElement, 0, foreignDoc.documentElement, 1], node foreignDoctype 
</span><del>-FAIL 16,0: resulting DOM for range [paras[0], 0, paras[0], 1], node paras[0] assert_true: First differing node: expected Element node &lt;p id=&quot;b&quot; style=&quot;display:none&quot;&gt;Ijklmnop
-&lt;/p&gt;, got Text node &quot;Äb̈c̈d̈ëf̈g̈ḧ
-&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 16,0: resulting range position for range [paras[0], 0, paras[0], 1], node paras[0] assert_true: First differing node: expected Element node &lt;p id=&quot;b&quot; style=&quot;display:none&quot;&gt;Ijklmnop
-&lt;/p&gt;, got Text node &quot;Äb̈c̈d̈ëf̈g̈ḧ
-&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 16,0: resulting DOM for range [paras[0], 0, paras[0], 1], node paras[0] 
+PASS 16,0: resulting range position for range [paras[0], 0, paras[0], 1], node paras[0] 
</ins><span class="cx"> PASS 16,1: resulting DOM for range [paras[0], 0, paras[0], 1], node paras[0].firstChild 
</span><span class="cx"> PASS 16,1: resulting range position for range [paras[0], 0, paras[0], 1], node paras[0].firstChild 
</span><span class="cx"> PASS 16,2: resulting DOM for range [paras[0], 0, paras[0], 1], node paras[1].firstChild 
</span><span class="lines">@@ -793,14 +759,14 @@
</span><span class="cx"> PASS 17,3: resulting range position for range [detachedPara1, 0, detachedPara1, 1], node foreignPara1 
</span><span class="cx"> PASS 17,4: resulting DOM for range [detachedPara1, 0, detachedPara1, 1], node foreignPara1.firstChild 
</span><span class="cx"> PASS 17,4: resulting range position for range [detachedPara1, 0, detachedPara1, 1], node foreignPara1.firstChild 
</span><del>-FAIL 17,5: resulting DOM for range [detachedPara1, 0, detachedPara1, 1], node detachedPara1 assert_true: First differing node: expected Element node &lt;p&gt;Wxyzabcd&lt;/p&gt;, got Text node &quot;Opqrstuv&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 17,5: resulting range position for range [detachedPara1, 0, detachedPara1, 1], node detachedPara1 assert_true: First differing node: expected Element node &lt;p&gt;Wxyzabcd&lt;/p&gt;, got Text node &quot;Opqrstuv&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 17,5: resulting DOM for range [detachedPara1, 0, detachedPara1, 1], node detachedPara1 
+PASS 17,5: resulting range position for range [detachedPara1, 0, detachedPara1, 1], node detachedPara1 
</ins><span class="cx"> PASS 17,6: resulting DOM for range [detachedPara1, 0, detachedPara1, 1], node detachedPara1.firstChild 
</span><span class="cx"> PASS 17,6: resulting range position for range [detachedPara1, 0, detachedPara1, 1], node detachedPara1.firstChild 
</span><span class="cx"> PASS 17,7: resulting DOM for range [detachedPara1, 0, detachedPara1, 1], node document 
</span><span class="cx"> PASS 17,7: resulting range position for range [detachedPara1, 0, detachedPara1, 1], node document 
</span><del>-FAIL 17,8: resulting DOM for range [detachedPara1, 0, detachedPara1, 1], node detachedDiv assert_unreached: DOMs were not equal but we couldn't figure out why Reached unreachable code
-FAIL 17,8: resulting range position for range [detachedPara1, 0, detachedPara1, 1], node detachedDiv assert_unreached: DOMs were not equal but we couldn't figure out why Reached unreachable code
</del><ins>+PASS 17,8: resulting DOM for range [detachedPara1, 0, detachedPara1, 1], node detachedDiv 
+PASS 17,8: resulting range position for range [detachedPara1, 0, detachedPara1, 1], node detachedDiv 
</ins><span class="cx"> PASS 17,9: resulting DOM for range [detachedPara1, 0, detachedPara1, 1], node foreignDoc 
</span><span class="cx"> PASS 17,9: resulting range position for range [detachedPara1, 0, detachedPara1, 1], node foreignDoc 
</span><span class="cx"> PASS 17,10: resulting DOM for range [detachedPara1, 0, detachedPara1, 1], node foreignPara2 
</span><span class="lines">@@ -959,12 +925,8 @@
</span><span class="cx"> PASS 20,20: resulting range position for range [paras[0].firstChild, 3, paras[3], 1], node doctype 
</span><span class="cx"> PASS 20,21: resulting DOM for range [paras[0].firstChild, 3, paras[3], 1], node foreignDoctype 
</span><span class="cx"> PASS 20,21: resulting range position for range [paras[0].firstChild, 3, paras[3], 1], node foreignDoctype 
</span><del>-FAIL 21,0: resulting DOM for range [paras[0], 0, paras[0].firstChild, 7], node paras[0] assert_true: First differing node: expected Element node &lt;p id=&quot;b&quot; style=&quot;display:none&quot;&gt;Ijklmnop
-&lt;/p&gt;, got Text node &quot;Äb̈c̈d̈ëf̈g̈ḧ
-&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 21,0: resulting range position for range [paras[0], 0, paras[0].firstChild, 7], node paras[0] assert_true: First differing node: expected Element node &lt;p id=&quot;b&quot; style=&quot;display:none&quot;&gt;Ijklmnop
-&lt;/p&gt;, got Text node &quot;Äb̈c̈d̈ëf̈g̈ḧ
-&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 21,0: resulting DOM for range [paras[0], 0, paras[0].firstChild, 7], node paras[0] 
+PASS 21,0: resulting range position for range [paras[0], 0, paras[0].firstChild, 7], node paras[0] 
</ins><span class="cx"> PASS 21,1: resulting DOM for range [paras[0], 0, paras[0].firstChild, 7], node paras[0].firstChild 
</span><span class="cx"> PASS 21,1: resulting range position for range [paras[0], 0, paras[0].firstChild, 7], node paras[0].firstChild 
</span><span class="cx"> PASS 21,2: resulting DOM for range [paras[0], 0, paras[0].firstChild, 7], node paras[1].firstChild 
</span><span class="lines">@@ -1173,8 +1135,8 @@
</span><span class="cx"> PASS 25,15: resulting range position for range [comment, 2, comment, 3], node processingInstruction 
</span><span class="cx"> PASS 25,16: resulting DOM for range [comment, 2, comment, 3], node detachedProcessingInstruction 
</span><span class="cx"> PASS 25,16: resulting range position for range [comment, 2, comment, 3], node detachedProcessingInstruction 
</span><del>-FAIL 25,17: resulting DOM for range [comment, 2, comment, 3], node comment assert_true: First differing node: expected Comment node &lt;!--Alhabet soup?--&gt;, got Comment node &lt;!--Alphabet soup?--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 25,17: resulting range position for range [comment, 2, comment, 3], node comment assert_true: First differing node: expected Comment node &lt;!--Alhabet soup?--&gt;, got Comment node &lt;!--Alphabet soup?--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 25,17: resulting DOM for range [comment, 2, comment, 3], node comment 
+PASS 25,17: resulting range position for range [comment, 2, comment, 3], node comment 
</ins><span class="cx"> PASS 25,18: resulting DOM for range [comment, 2, comment, 3], node detachedComment 
</span><span class="cx"> PASS 25,18: resulting range position for range [comment, 2, comment, 3], node detachedComment 
</span><span class="cx"> PASS 25,19: resulting DOM for range [comment, 2, comment, 3], node docfrag 
</span><span class="lines">@@ -1359,44 +1321,44 @@
</span><span class="cx"> PASS 29,20: resulting range position for range [xmlDoc, 1, xmlComment, 0], node doctype 
</span><span class="cx"> PASS 29,21: resulting DOM for range [xmlDoc, 1, xmlComment, 0], node foreignDoctype 
</span><span class="cx"> PASS 29,21: resulting range position for range [xmlDoc, 1, xmlComment, 0], node foreignDoctype 
</span><del>-FAIL 30,0: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node paras[0] assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Uvwxyzab&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 30,0: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node paras[0] assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Uvwxyzab&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 30,1: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node paras[0].firstChild assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Uvwxyzab&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 30,1: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node paras[0].firstChild assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Uvwxyzab&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 30,2: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node paras[1].firstChild assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Uvwxyzab&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 30,2: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node paras[1].firstChild assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Uvwxyzab&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 30,3: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node foreignPara1 assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Uvwxyzab&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 30,3: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node foreignPara1 assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Uvwxyzab&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 30,4: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node foreignPara1.firstChild assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Uvwxyzab&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 30,4: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node foreignPara1.firstChild assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Uvwxyzab&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 30,5: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node detachedPara1 assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Uvwxyzab&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 30,5: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node detachedPara1 assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Uvwxyzab&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 30,6: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node detachedPara1.firstChild assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Uvwxyzab&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 30,6: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node detachedPara1.firstChild assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Uvwxyzab&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 30,0: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node paras[0] 
+PASS 30,0: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node paras[0] 
+PASS 30,1: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node paras[0].firstChild 
+PASS 30,1: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node paras[0].firstChild 
+PASS 30,2: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node paras[1].firstChild 
+PASS 30,2: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node paras[1].firstChild 
+PASS 30,3: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node foreignPara1 
+PASS 30,3: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node foreignPara1 
+PASS 30,4: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node foreignPara1.firstChild 
+PASS 30,4: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node foreignPara1.firstChild 
+PASS 30,5: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node detachedPara1 
+PASS 30,5: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node detachedPara1 
+PASS 30,6: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node detachedPara1.firstChild 
+PASS 30,6: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node detachedPara1.firstChild 
</ins><span class="cx"> PASS 30,7: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node document 
</span><span class="cx"> PASS 30,7: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node document 
</span><del>-FAIL 30,8: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node detachedDiv assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Uvwxyzab&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 30,8: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node detachedDiv assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Uvwxyzab&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 30,8: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node detachedDiv 
+PASS 30,8: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node detachedDiv 
</ins><span class="cx"> PASS 30,9: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node foreignDoc 
</span><span class="cx"> PASS 30,9: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node foreignDoc 
</span><del>-FAIL 30,10: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node foreignPara2 assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Uvwxyzab&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 30,10: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node foreignPara2 assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Uvwxyzab&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 30,10: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node foreignPara2 
+PASS 30,10: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node foreignPara2 
</ins><span class="cx"> PASS 30,11: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node xmlDoc 
</span><span class="cx"> PASS 30,11: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node xmlDoc 
</span><del>-FAIL 30,12: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node xmlElement assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Uvwxyzab&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 30,12: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node xmlElement assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Uvwxyzab&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 30,13: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node detachedTextNode assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Uvwxyzab&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 30,13: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node detachedTextNode assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Uvwxyzab&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 30,14: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node foreignTextNode assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Uvwxyzab&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 30,14: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node foreignTextNode assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Uvwxyzab&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 30,15: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node processingInstruction assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Uvwxyzab&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 30,15: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node processingInstruction assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Uvwxyzab&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 30,16: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node detachedProcessingInstruction assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Uvwxyzab&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 30,16: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node detachedProcessingInstruction assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Uvwxyzab&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 30,17: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node comment assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Uvwxyzab&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 30,17: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node comment assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Uvwxyzab&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 30,18: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node detachedComment assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Uvwxyzab&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 30,18: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node detachedComment assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Uvwxyzab&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 30,12: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node xmlElement 
+PASS 30,12: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node xmlElement 
+PASS 30,13: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node detachedTextNode 
+PASS 30,13: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node detachedTextNode 
+PASS 30,14: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node foreignTextNode 
+PASS 30,14: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node foreignTextNode 
+PASS 30,15: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node processingInstruction 
+PASS 30,15: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node processingInstruction 
+PASS 30,16: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node detachedProcessingInstruction 
+PASS 30,16: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node detachedProcessingInstruction 
+PASS 30,17: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node comment 
+PASS 30,17: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node comment 
+PASS 30,18: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node detachedComment 
+PASS 30,18: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node detachedComment 
</ins><span class="cx"> PASS 30,19: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node docfrag 
</span><span class="cx"> PASS 30,19: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node docfrag 
</span><span class="cx"> PASS 30,20: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node doctype 
</span><span class="lines">@@ -1403,44 +1365,44 @@
</span><span class="cx"> PASS 30,20: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node doctype 
</span><span class="cx"> PASS 30,21: resulting DOM for range [detachedTextNode, 0, detachedTextNode, 8], node foreignDoctype 
</span><span class="cx"> PASS 30,21: resulting range position for range [detachedTextNode, 0, detachedTextNode, 8], node foreignDoctype 
</span><del>-FAIL 31,0: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node paras[0] assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Cdefghij&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 31,0: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node paras[0] assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Cdefghij&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 31,1: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node paras[0].firstChild assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Cdefghij&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 31,1: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node paras[0].firstChild assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Cdefghij&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 31,2: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node paras[1].firstChild assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Cdefghij&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 31,2: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node paras[1].firstChild assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Cdefghij&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 31,3: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node foreignPara1 assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Cdefghij&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 31,3: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node foreignPara1 assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Cdefghij&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 31,4: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node foreignPara1.firstChild assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Cdefghij&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 31,4: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node foreignPara1.firstChild assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Cdefghij&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 31,5: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node detachedPara1 assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Cdefghij&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 31,5: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node detachedPara1 assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Cdefghij&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 31,6: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node detachedPara1.firstChild assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Cdefghij&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 31,6: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node detachedPara1.firstChild assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Cdefghij&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 31,0: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node paras[0] 
+PASS 31,0: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node paras[0] 
+PASS 31,1: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node paras[0].firstChild 
+PASS 31,1: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node paras[0].firstChild 
+PASS 31,2: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node paras[1].firstChild 
+PASS 31,2: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node paras[1].firstChild 
+PASS 31,3: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node foreignPara1 
+PASS 31,3: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node foreignPara1 
+PASS 31,4: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node foreignPara1.firstChild 
+PASS 31,4: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node foreignPara1.firstChild 
+PASS 31,5: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node detachedPara1 
+PASS 31,5: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node detachedPara1 
+PASS 31,6: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node detachedPara1.firstChild 
+PASS 31,6: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node detachedPara1.firstChild 
</ins><span class="cx"> PASS 31,7: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node document 
</span><span class="cx"> PASS 31,7: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node document 
</span><del>-FAIL 31,8: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node detachedDiv assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Cdefghij&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 31,8: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node detachedDiv assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Cdefghij&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 31,8: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node detachedDiv 
+PASS 31,8: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node detachedDiv 
</ins><span class="cx"> PASS 31,9: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node foreignDoc 
</span><span class="cx"> PASS 31,9: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node foreignDoc 
</span><del>-FAIL 31,10: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node foreignPara2 assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Cdefghij&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 31,10: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node foreignPara2 assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Cdefghij&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 31,10: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node foreignPara2 
+PASS 31,10: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node foreignPara2 
</ins><span class="cx"> PASS 31,11: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node xmlDoc 
</span><span class="cx"> PASS 31,11: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node xmlDoc 
</span><del>-FAIL 31,12: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node xmlElement assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Cdefghij&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 31,12: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node xmlElement assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Cdefghij&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 31,13: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node detachedTextNode assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Cdefghij&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 31,13: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node detachedTextNode assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Cdefghij&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 31,14: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node foreignTextNode assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Cdefghij&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 31,14: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node foreignTextNode assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Cdefghij&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 31,15: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node processingInstruction assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Cdefghij&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 31,15: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node processingInstruction assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Cdefghij&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 31,16: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node detachedProcessingInstruction assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Cdefghij&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 31,16: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node detachedProcessingInstruction assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Cdefghij&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 31,17: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node comment assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Cdefghij&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 31,17: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node comment assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Cdefghij&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 31,18: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node detachedComment assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Cdefghij&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 31,18: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node detachedComment assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Cdefghij&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 31,12: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node xmlElement 
+PASS 31,12: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node xmlElement 
+PASS 31,13: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node detachedTextNode 
+PASS 31,13: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node detachedTextNode 
+PASS 31,14: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node foreignTextNode 
+PASS 31,14: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node foreignTextNode 
+PASS 31,15: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node processingInstruction 
+PASS 31,15: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node processingInstruction 
+PASS 31,16: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node detachedProcessingInstruction 
+PASS 31,16: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node detachedProcessingInstruction 
+PASS 31,17: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node comment 
+PASS 31,17: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node comment 
+PASS 31,18: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node detachedComment 
+PASS 31,18: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node detachedComment 
</ins><span class="cx"> PASS 31,19: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node docfrag 
</span><span class="cx"> PASS 31,19: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node docfrag 
</span><span class="cx"> PASS 31,20: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node doctype 
</span><span class="lines">@@ -1447,44 +1409,44 @@
</span><span class="cx"> PASS 31,20: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node doctype 
</span><span class="cx"> PASS 31,21: resulting DOM for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node foreignDoctype 
</span><span class="cx"> PASS 31,21: resulting range position for range [detachedForeignTextNode, 0, detachedForeignTextNode, 8], node foreignDoctype 
</span><del>-FAIL 32,0: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node paras[0] assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Klmnopqr&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 32,0: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node paras[0] assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Klmnopqr&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 32,1: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node paras[0].firstChild assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Klmnopqr&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 32,1: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node paras[0].firstChild assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Klmnopqr&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 32,2: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node paras[1].firstChild assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Klmnopqr&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 32,2: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node paras[1].firstChild assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Klmnopqr&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 32,3: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node foreignPara1 assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Klmnopqr&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 32,3: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node foreignPara1 assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Klmnopqr&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 32,4: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node foreignPara1.firstChild assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Klmnopqr&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 32,4: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node foreignPara1.firstChild assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Klmnopqr&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 32,5: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node detachedPara1 assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Klmnopqr&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 32,5: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node detachedPara1 assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Klmnopqr&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 32,6: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node detachedPara1.firstChild assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Klmnopqr&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 32,6: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node detachedPara1.firstChild assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Klmnopqr&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 32,0: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node paras[0] 
+PASS 32,0: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node paras[0] 
+PASS 32,1: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node paras[0].firstChild 
+PASS 32,1: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node paras[0].firstChild 
+PASS 32,2: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node paras[1].firstChild 
+PASS 32,2: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node paras[1].firstChild 
+PASS 32,3: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node foreignPara1 
+PASS 32,3: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node foreignPara1 
+PASS 32,4: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node foreignPara1.firstChild 
+PASS 32,4: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node foreignPara1.firstChild 
+PASS 32,5: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node detachedPara1 
+PASS 32,5: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node detachedPara1 
+PASS 32,6: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node detachedPara1.firstChild 
+PASS 32,6: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node detachedPara1.firstChild 
</ins><span class="cx"> PASS 32,7: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node document 
</span><span class="cx"> PASS 32,7: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node document 
</span><del>-FAIL 32,8: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node detachedDiv assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Klmnopqr&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 32,8: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node detachedDiv assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Klmnopqr&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 32,8: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node detachedDiv 
+PASS 32,8: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node detachedDiv 
</ins><span class="cx"> PASS 32,9: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node foreignDoc 
</span><span class="cx"> PASS 32,9: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node foreignDoc 
</span><del>-FAIL 32,10: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node foreignPara2 assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Klmnopqr&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 32,10: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node foreignPara2 assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Klmnopqr&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 32,10: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node foreignPara2 
+PASS 32,10: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node foreignPara2 
</ins><span class="cx"> PASS 32,11: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node xmlDoc 
</span><span class="cx"> PASS 32,11: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node xmlDoc 
</span><del>-FAIL 32,12: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node xmlElement assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Klmnopqr&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 32,12: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node xmlElement assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Klmnopqr&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 32,13: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node detachedTextNode assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Klmnopqr&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 32,13: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node detachedTextNode assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Klmnopqr&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 32,14: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node foreignTextNode assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Klmnopqr&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 32,14: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node foreignTextNode assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Klmnopqr&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 32,15: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node processingInstruction assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Klmnopqr&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 32,15: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node processingInstruction assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Klmnopqr&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 32,16: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node detachedProcessingInstruction assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Klmnopqr&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 32,16: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node detachedProcessingInstruction assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Klmnopqr&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 32,17: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node comment assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Klmnopqr&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 32,17: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node comment assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Klmnopqr&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 32,18: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node detachedComment assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Klmnopqr&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 32,18: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node detachedComment assert_true: First differing node: expected Text node &quot;&quot;, got Text node &quot;Klmnopqr&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 32,12: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node xmlElement 
+PASS 32,12: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node xmlElement 
+PASS 32,13: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node detachedTextNode 
+PASS 32,13: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node detachedTextNode 
+PASS 32,14: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node foreignTextNode 
+PASS 32,14: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node foreignTextNode 
+PASS 32,15: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node processingInstruction 
+PASS 32,15: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node processingInstruction 
+PASS 32,16: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node detachedProcessingInstruction 
+PASS 32,16: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node detachedProcessingInstruction 
+PASS 32,17: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node comment 
+PASS 32,17: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node comment 
+PASS 32,18: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node detachedComment 
+PASS 32,18: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node detachedComment 
</ins><span class="cx"> PASS 32,19: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node docfrag 
</span><span class="cx"> PASS 32,19: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node docfrag 
</span><span class="cx"> PASS 32,20: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node doctype 
</span><span class="lines">@@ -1491,44 +1453,44 @@
</span><span class="cx"> PASS 32,20: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node doctype 
</span><span class="cx"> PASS 32,21: resulting DOM for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node foreignDoctype 
</span><span class="cx"> PASS 32,21: resulting range position for range [detachedXmlTextNode, 0, detachedXmlTextNode, 8], node foreignDoctype 
</span><del>-FAIL 33,0: resulting DOM for range [detachedComment, 3, detachedComment, 4], node paras[0] assert_true: First differing node: expected Comment node &lt;!--Stuwxyz--&gt;, got Comment node &lt;!--Stuvwxyz--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 33,0: resulting range position for range [detachedComment, 3, detachedComment, 4], node paras[0] assert_true: First differing node: expected Comment node &lt;!--Stuwxyz--&gt;, got Comment node &lt;!--Stuvwxyz--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 33,1: resulting DOM for range [detachedComment, 3, detachedComment, 4], node paras[0].firstChild assert_true: First differing node: expected Comment node &lt;!--Stuwxyz--&gt;, got Comment node &lt;!--Stuvwxyz--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 33,1: resulting range position for range [detachedComment, 3, detachedComment, 4], node paras[0].firstChild assert_true: First differing node: expected Comment node &lt;!--Stuwxyz--&gt;, got Comment node &lt;!--Stuvwxyz--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 33,2: resulting DOM for range [detachedComment, 3, detachedComment, 4], node paras[1].firstChild assert_true: First differing node: expected Comment node &lt;!--Stuwxyz--&gt;, got Comment node &lt;!--Stuvwxyz--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 33,2: resulting range position for range [detachedComment, 3, detachedComment, 4], node paras[1].firstChild assert_true: First differing node: expected Comment node &lt;!--Stuwxyz--&gt;, got Comment node &lt;!--Stuvwxyz--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 33,3: resulting DOM for range [detachedComment, 3, detachedComment, 4], node foreignPara1 assert_true: First differing node: expected Comment node &lt;!--Stuwxyz--&gt;, got Comment node &lt;!--Stuvwxyz--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 33,3: resulting range position for range [detachedComment, 3, detachedComment, 4], node foreignPara1 assert_true: First differing node: expected Comment node &lt;!--Stuwxyz--&gt;, got Comment node &lt;!--Stuvwxyz--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 33,4: resulting DOM for range [detachedComment, 3, detachedComment, 4], node foreignPara1.firstChild assert_true: First differing node: expected Comment node &lt;!--Stuwxyz--&gt;, got Comment node &lt;!--Stuvwxyz--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 33,4: resulting range position for range [detachedComment, 3, detachedComment, 4], node foreignPara1.firstChild assert_true: First differing node: expected Comment node &lt;!--Stuwxyz--&gt;, got Comment node &lt;!--Stuvwxyz--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 33,5: resulting DOM for range [detachedComment, 3, detachedComment, 4], node detachedPara1 assert_true: First differing node: expected Comment node &lt;!--Stuwxyz--&gt;, got Comment node &lt;!--Stuvwxyz--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 33,5: resulting range position for range [detachedComment, 3, detachedComment, 4], node detachedPara1 assert_true: First differing node: expected Comment node &lt;!--Stuwxyz--&gt;, got Comment node &lt;!--Stuvwxyz--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 33,6: resulting DOM for range [detachedComment, 3, detachedComment, 4], node detachedPara1.firstChild assert_true: First differing node: expected Comment node &lt;!--Stuwxyz--&gt;, got Comment node &lt;!--Stuvwxyz--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 33,6: resulting range position for range [detachedComment, 3, detachedComment, 4], node detachedPara1.firstChild assert_true: First differing node: expected Comment node &lt;!--Stuwxyz--&gt;, got Comment node &lt;!--Stuvwxyz--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 33,0: resulting DOM for range [detachedComment, 3, detachedComment, 4], node paras[0] 
+PASS 33,0: resulting range position for range [detachedComment, 3, detachedComment, 4], node paras[0] 
+PASS 33,1: resulting DOM for range [detachedComment, 3, detachedComment, 4], node paras[0].firstChild 
+PASS 33,1: resulting range position for range [detachedComment, 3, detachedComment, 4], node paras[0].firstChild 
+PASS 33,2: resulting DOM for range [detachedComment, 3, detachedComment, 4], node paras[1].firstChild 
+PASS 33,2: resulting range position for range [detachedComment, 3, detachedComment, 4], node paras[1].firstChild 
+PASS 33,3: resulting DOM for range [detachedComment, 3, detachedComment, 4], node foreignPara1 
+PASS 33,3: resulting range position for range [detachedComment, 3, detachedComment, 4], node foreignPara1 
+PASS 33,4: resulting DOM for range [detachedComment, 3, detachedComment, 4], node foreignPara1.firstChild 
+PASS 33,4: resulting range position for range [detachedComment, 3, detachedComment, 4], node foreignPara1.firstChild 
+PASS 33,5: resulting DOM for range [detachedComment, 3, detachedComment, 4], node detachedPara1 
+PASS 33,5: resulting range position for range [detachedComment, 3, detachedComment, 4], node detachedPara1 
+PASS 33,6: resulting DOM for range [detachedComment, 3, detachedComment, 4], node detachedPara1.firstChild 
+PASS 33,6: resulting range position for range [detachedComment, 3, detachedComment, 4], node detachedPara1.firstChild 
</ins><span class="cx"> PASS 33,7: resulting DOM for range [detachedComment, 3, detachedComment, 4], node document 
</span><span class="cx"> PASS 33,7: resulting range position for range [detachedComment, 3, detachedComment, 4], node document 
</span><del>-FAIL 33,8: resulting DOM for range [detachedComment, 3, detachedComment, 4], node detachedDiv assert_true: First differing node: expected Comment node &lt;!--Stuwxyz--&gt;, got Comment node &lt;!--Stuvwxyz--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 33,8: resulting range position for range [detachedComment, 3, detachedComment, 4], node detachedDiv assert_true: First differing node: expected Comment node &lt;!--Stuwxyz--&gt;, got Comment node &lt;!--Stuvwxyz--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 33,8: resulting DOM for range [detachedComment, 3, detachedComment, 4], node detachedDiv 
+PASS 33,8: resulting range position for range [detachedComment, 3, detachedComment, 4], node detachedDiv 
</ins><span class="cx"> PASS 33,9: resulting DOM for range [detachedComment, 3, detachedComment, 4], node foreignDoc 
</span><span class="cx"> PASS 33,9: resulting range position for range [detachedComment, 3, detachedComment, 4], node foreignDoc 
</span><del>-FAIL 33,10: resulting DOM for range [detachedComment, 3, detachedComment, 4], node foreignPara2 assert_true: First differing node: expected Comment node &lt;!--Stuwxyz--&gt;, got Comment node &lt;!--Stuvwxyz--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 33,10: resulting range position for range [detachedComment, 3, detachedComment, 4], node foreignPara2 assert_true: First differing node: expected Comment node &lt;!--Stuwxyz--&gt;, got Comment node &lt;!--Stuvwxyz--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 33,10: resulting DOM for range [detachedComment, 3, detachedComment, 4], node foreignPara2 
+PASS 33,10: resulting range position for range [detachedComment, 3, detachedComment, 4], node foreignPara2 
</ins><span class="cx"> PASS 33,11: resulting DOM for range [detachedComment, 3, detachedComment, 4], node xmlDoc 
</span><span class="cx"> PASS 33,11: resulting range position for range [detachedComment, 3, detachedComment, 4], node xmlDoc 
</span><del>-FAIL 33,12: resulting DOM for range [detachedComment, 3, detachedComment, 4], node xmlElement assert_true: First differing node: expected Comment node &lt;!--Stuwxyz--&gt;, got Comment node &lt;!--Stuvwxyz--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 33,12: resulting range position for range [detachedComment, 3, detachedComment, 4], node xmlElement assert_true: First differing node: expected Comment node &lt;!--Stuwxyz--&gt;, got Comment node &lt;!--Stuvwxyz--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 33,13: resulting DOM for range [detachedComment, 3, detachedComment, 4], node detachedTextNode assert_true: First differing node: expected Comment node &lt;!--Stuwxyz--&gt;, got Comment node &lt;!--Stuvwxyz--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 33,13: resulting range position for range [detachedComment, 3, detachedComment, 4], node detachedTextNode assert_true: First differing node: expected Comment node &lt;!--Stuwxyz--&gt;, got Comment node &lt;!--Stuvwxyz--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 33,14: resulting DOM for range [detachedComment, 3, detachedComment, 4], node foreignTextNode assert_true: First differing node: expected Comment node &lt;!--Stuwxyz--&gt;, got Comment node &lt;!--Stuvwxyz--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 33,14: resulting range position for range [detachedComment, 3, detachedComment, 4], node foreignTextNode assert_true: First differing node: expected Comment node &lt;!--Stuwxyz--&gt;, got Comment node &lt;!--Stuvwxyz--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 33,15: resulting DOM for range [detachedComment, 3, detachedComment, 4], node processingInstruction assert_true: First differing node: expected Comment node &lt;!--Stuwxyz--&gt;, got Comment node &lt;!--Stuvwxyz--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 33,15: resulting range position for range [detachedComment, 3, detachedComment, 4], node processingInstruction assert_true: First differing node: expected Comment node &lt;!--Stuwxyz--&gt;, got Comment node &lt;!--Stuvwxyz--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 33,16: resulting DOM for range [detachedComment, 3, detachedComment, 4], node detachedProcessingInstruction assert_true: First differing node: expected Comment node &lt;!--Stuwxyz--&gt;, got Comment node &lt;!--Stuvwxyz--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 33,16: resulting range position for range [detachedComment, 3, detachedComment, 4], node detachedProcessingInstruction assert_true: First differing node: expected Comment node &lt;!--Stuwxyz--&gt;, got Comment node &lt;!--Stuvwxyz--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 33,17: resulting DOM for range [detachedComment, 3, detachedComment, 4], node comment assert_true: First differing node: expected Comment node &lt;!--Stuwxyz--&gt;, got Comment node &lt;!--Stuvwxyz--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 33,17: resulting range position for range [detachedComment, 3, detachedComment, 4], node comment assert_true: First differing node: expected Comment node &lt;!--Stuwxyz--&gt;, got Comment node &lt;!--Stuvwxyz--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 33,18: resulting DOM for range [detachedComment, 3, detachedComment, 4], node detachedComment assert_true: First differing node: expected Comment node &lt;!--Stuwxyz--&gt;, got Comment node &lt;!--Stuvwxyz--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 33,18: resulting range position for range [detachedComment, 3, detachedComment, 4], node detachedComment assert_true: First differing node: expected Comment node &lt;!--Stuwxyz--&gt;, got Comment node &lt;!--Stuvwxyz--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 33,12: resulting DOM for range [detachedComment, 3, detachedComment, 4], node xmlElement 
+PASS 33,12: resulting range position for range [detachedComment, 3, detachedComment, 4], node xmlElement 
+PASS 33,13: resulting DOM for range [detachedComment, 3, detachedComment, 4], node detachedTextNode 
+PASS 33,13: resulting range position for range [detachedComment, 3, detachedComment, 4], node detachedTextNode 
+PASS 33,14: resulting DOM for range [detachedComment, 3, detachedComment, 4], node foreignTextNode 
+PASS 33,14: resulting range position for range [detachedComment, 3, detachedComment, 4], node foreignTextNode 
+PASS 33,15: resulting DOM for range [detachedComment, 3, detachedComment, 4], node processingInstruction 
+PASS 33,15: resulting range position for range [detachedComment, 3, detachedComment, 4], node processingInstruction 
+PASS 33,16: resulting DOM for range [detachedComment, 3, detachedComment, 4], node detachedProcessingInstruction 
+PASS 33,16: resulting range position for range [detachedComment, 3, detachedComment, 4], node detachedProcessingInstruction 
+PASS 33,17: resulting DOM for range [detachedComment, 3, detachedComment, 4], node comment 
+PASS 33,17: resulting range position for range [detachedComment, 3, detachedComment, 4], node comment 
+PASS 33,18: resulting DOM for range [detachedComment, 3, detachedComment, 4], node detachedComment 
+PASS 33,18: resulting range position for range [detachedComment, 3, detachedComment, 4], node detachedComment 
</ins><span class="cx"> PASS 33,19: resulting DOM for range [detachedComment, 3, detachedComment, 4], node docfrag 
</span><span class="cx"> PASS 33,19: resulting range position for range [detachedComment, 3, detachedComment, 4], node docfrag 
</span><span class="cx"> PASS 33,20: resulting DOM for range [detachedComment, 3, detachedComment, 4], node doctype 
</span><span class="lines">@@ -1535,44 +1497,44 @@
</span><span class="cx"> PASS 33,20: resulting range position for range [detachedComment, 3, detachedComment, 4], node doctype 
</span><span class="cx"> PASS 33,21: resulting DOM for range [detachedComment, 3, detachedComment, 4], node foreignDoctype 
</span><span class="cx"> PASS 33,21: resulting range position for range [detachedComment, 3, detachedComment, 4], node foreignDoctype 
</span><del>-FAIL 34,0: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node paras[0] assert_true: First differing node: expected Comment node &lt;!--ריה יהודה--&gt;, got Comment node &lt;!--אריה יהודה--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 34,0: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node paras[0] assert_true: First differing node: expected Comment node &lt;!--ריה יהודה--&gt;, got Comment node &lt;!--אריה יהודה--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 34,1: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node paras[0].firstChild assert_true: First differing node: expected Comment node &lt;!--ריה יהודה--&gt;, got Comment node &lt;!--אריה יהודה--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 34,1: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node paras[0].firstChild assert_true: First differing node: expected Comment node &lt;!--ריה יהודה--&gt;, got Comment node &lt;!--אריה יהודה--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 34,2: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node paras[1].firstChild assert_true: First differing node: expected Comment node &lt;!--ריה יהודה--&gt;, got Comment node &lt;!--אריה יהודה--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 34,2: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node paras[1].firstChild assert_true: First differing node: expected Comment node &lt;!--ריה יהודה--&gt;, got Comment node &lt;!--אריה יהודה--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 34,3: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node foreignPara1 assert_true: First differing node: expected Comment node &lt;!--ריה יהודה--&gt;, got Comment node &lt;!--אריה יהודה--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 34,3: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node foreignPara1 assert_true: First differing node: expected Comment node &lt;!--ריה יהודה--&gt;, got Comment node &lt;!--אריה יהודה--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 34,4: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node foreignPara1.firstChild assert_true: First differing node: expected Comment node &lt;!--ריה יהודה--&gt;, got Comment node &lt;!--אריה יהודה--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 34,4: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node foreignPara1.firstChild assert_true: First differing node: expected Comment node &lt;!--ריה יהודה--&gt;, got Comment node &lt;!--אריה יהודה--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 34,5: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node detachedPara1 assert_true: First differing node: expected Comment node &lt;!--ריה יהודה--&gt;, got Comment node &lt;!--אריה יהודה--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 34,5: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node detachedPara1 assert_true: First differing node: expected Comment node &lt;!--ריה יהודה--&gt;, got Comment node &lt;!--אריה יהודה--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 34,6: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node detachedPara1.firstChild assert_true: First differing node: expected Comment node &lt;!--ריה יהודה--&gt;, got Comment node &lt;!--אריה יהודה--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 34,6: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node detachedPara1.firstChild assert_true: First differing node: expected Comment node &lt;!--ריה יהודה--&gt;, got Comment node &lt;!--אריה יהודה--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 34,0: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node paras[0] 
+PASS 34,0: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node paras[0] 
+PASS 34,1: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node paras[0].firstChild 
+PASS 34,1: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node paras[0].firstChild 
+PASS 34,2: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node paras[1].firstChild 
+PASS 34,2: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node paras[1].firstChild 
+PASS 34,3: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node foreignPara1 
+PASS 34,3: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node foreignPara1 
+PASS 34,4: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node foreignPara1.firstChild 
+PASS 34,4: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node foreignPara1.firstChild 
+PASS 34,5: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node detachedPara1 
+PASS 34,5: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node detachedPara1 
+PASS 34,6: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node detachedPara1.firstChild 
+PASS 34,6: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node detachedPara1.firstChild 
</ins><span class="cx"> PASS 34,7: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node document 
</span><span class="cx"> PASS 34,7: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node document 
</span><del>-FAIL 34,8: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node detachedDiv assert_true: First differing node: expected Comment node &lt;!--ריה יהודה--&gt;, got Comment node &lt;!--אריה יהודה--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 34,8: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node detachedDiv assert_true: First differing node: expected Comment node &lt;!--ריה יהודה--&gt;, got Comment node &lt;!--אריה יהודה--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 34,8: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node detachedDiv 
+PASS 34,8: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node detachedDiv 
</ins><span class="cx"> PASS 34,9: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node foreignDoc 
</span><span class="cx"> PASS 34,9: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node foreignDoc 
</span><del>-FAIL 34,10: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node foreignPara2 assert_true: First differing node: expected Comment node &lt;!--ריה יהודה--&gt;, got Comment node &lt;!--אריה יהודה--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 34,10: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node foreignPara2 assert_true: First differing node: expected Comment node &lt;!--ריה יהודה--&gt;, got Comment node &lt;!--אריה יהודה--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 34,10: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node foreignPara2 
+PASS 34,10: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node foreignPara2 
</ins><span class="cx"> PASS 34,11: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node xmlDoc 
</span><span class="cx"> PASS 34,11: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node xmlDoc 
</span><del>-FAIL 34,12: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node xmlElement assert_true: First differing node: expected Comment node &lt;!--ריה יהודה--&gt;, got Comment node &lt;!--אריה יהודה--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 34,12: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node xmlElement assert_true: First differing node: expected Comment node &lt;!--ריה יהודה--&gt;, got Comment node &lt;!--אריה יהודה--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 34,13: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node detachedTextNode assert_true: First differing node: expected Comment node &lt;!--ריה יהודה--&gt;, got Comment node &lt;!--אריה יהודה--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 34,13: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node detachedTextNode assert_true: First differing node: expected Comment node &lt;!--ריה יהודה--&gt;, got Comment node &lt;!--אריה יהודה--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 34,14: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node foreignTextNode assert_true: First differing node: expected Comment node &lt;!--ריה יהודה--&gt;, got Comment node &lt;!--אריה יהודה--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 34,14: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node foreignTextNode assert_true: First differing node: expected Comment node &lt;!--ריה יהודה--&gt;, got Comment node &lt;!--אריה יהודה--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 34,15: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node processingInstruction assert_true: First differing node: expected Comment node &lt;!--ריה יהודה--&gt;, got Comment node &lt;!--אריה יהודה--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 34,15: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node processingInstruction assert_true: First differing node: expected Comment node &lt;!--ריה יהודה--&gt;, got Comment node &lt;!--אריה יהודה--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 34,16: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node detachedProcessingInstruction assert_true: First differing node: expected Comment node &lt;!--ריה יהודה--&gt;, got Comment node &lt;!--אריה יהודה--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 34,16: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node detachedProcessingInstruction assert_true: First differing node: expected Comment node &lt;!--ריה יהודה--&gt;, got Comment node &lt;!--אריה יהודה--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 34,17: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node comment assert_true: First differing node: expected Comment node &lt;!--ריה יהודה--&gt;, got Comment node &lt;!--אריה יהודה--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 34,17: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node comment assert_true: First differing node: expected Comment node &lt;!--ריה יהודה--&gt;, got Comment node &lt;!--אריה יהודה--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 34,18: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node detachedComment assert_true: First differing node: expected Comment node &lt;!--ריה יהודה--&gt;, got Comment node &lt;!--אריה יהודה--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 34,18: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node detachedComment assert_true: First differing node: expected Comment node &lt;!--ריה יהודה--&gt;, got Comment node &lt;!--אריה יהודה--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 34,12: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node xmlElement 
+PASS 34,12: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node xmlElement 
+PASS 34,13: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node detachedTextNode 
+PASS 34,13: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node detachedTextNode 
+PASS 34,14: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node foreignTextNode 
+PASS 34,14: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node foreignTextNode 
+PASS 34,15: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node processingInstruction 
+PASS 34,15: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node processingInstruction 
+PASS 34,16: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node detachedProcessingInstruction 
+PASS 34,16: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node detachedProcessingInstruction 
+PASS 34,17: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node comment 
+PASS 34,17: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node comment 
+PASS 34,18: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node detachedComment 
+PASS 34,18: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node detachedComment 
</ins><span class="cx"> PASS 34,19: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node docfrag 
</span><span class="cx"> PASS 34,19: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node docfrag 
</span><span class="cx"> PASS 34,20: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node doctype 
</span><span class="lines">@@ -1579,44 +1541,44 @@
</span><span class="cx"> PASS 34,20: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node doctype 
</span><span class="cx"> PASS 34,21: resulting DOM for range [detachedForeignComment, 0, detachedForeignComment, 1], node foreignDoctype 
</span><span class="cx"> PASS 34,21: resulting range position for range [detachedForeignComment, 0, detachedForeignComment, 1], node foreignDoctype 
</span><del>-FAIL 35,0: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node paras[0] assert_true: First differing node: expected Comment node &lt;!--בןם אליעזר--&gt;, got Comment node &lt;!--בן חיים אליעזר--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 35,0: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node paras[0] assert_true: First differing node: expected Comment node &lt;!--בןם אליעזר--&gt;, got Comment node &lt;!--בן חיים אליעזר--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 35,1: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node paras[0].firstChild assert_true: First differing node: expected Comment node &lt;!--בןם אליעזר--&gt;, got Comment node &lt;!--בן חיים אליעזר--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 35,1: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node paras[0].firstChild assert_true: First differing node: expected Comment node &lt;!--בןם אליעזר--&gt;, got Comment node &lt;!--בן חיים אליעזר--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 35,2: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node paras[1].firstChild assert_true: First differing node: expected Comment node &lt;!--בןם אליעזר--&gt;, got Comment node &lt;!--בן חיים אליעזר--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 35,2: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node paras[1].firstChild assert_true: First differing node: expected Comment node &lt;!--בןם אליעזר--&gt;, got Comment node &lt;!--בן חיים אליעזר--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 35,3: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node foreignPara1 assert_true: First differing node: expected Comment node &lt;!--בןם אליעזר--&gt;, got Comment node &lt;!--בן חיים אליעזר--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 35,3: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node foreignPara1 assert_true: First differing node: expected Comment node &lt;!--בןם אליעזר--&gt;, got Comment node &lt;!--בן חיים אליעזר--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 35,4: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node foreignPara1.firstChild assert_true: First differing node: expected Comment node &lt;!--בןם אליעזר--&gt;, got Comment node &lt;!--בן חיים אליעזר--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 35,4: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node foreignPara1.firstChild assert_true: First differing node: expected Comment node &lt;!--בןם אליעזר--&gt;, got Comment node &lt;!--בן חיים אליעזר--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 35,5: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node detachedPara1 assert_true: First differing node: expected Comment node &lt;!--בןם אליעזר--&gt;, got Comment node &lt;!--בן חיים אליעזר--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 35,5: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node detachedPara1 assert_true: First differing node: expected Comment node &lt;!--בןם אליעזר--&gt;, got Comment node &lt;!--בן חיים אליעזר--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 35,6: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node detachedPara1.firstChild assert_true: First differing node: expected Comment node &lt;!--בןם אליעזר--&gt;, got Comment node &lt;!--בן חיים אליעזר--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 35,6: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node detachedPara1.firstChild assert_true: First differing node: expected Comment node &lt;!--בןם אליעזר--&gt;, got Comment node &lt;!--בן חיים אליעזר--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 35,0: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node paras[0] 
+PASS 35,0: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node paras[0] 
+PASS 35,1: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node paras[0].firstChild 
+PASS 35,1: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node paras[0].firstChild 
+PASS 35,2: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node paras[1].firstChild 
+PASS 35,2: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node paras[1].firstChild 
+PASS 35,3: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node foreignPara1 
+PASS 35,3: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node foreignPara1 
+PASS 35,4: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node foreignPara1.firstChild 
+PASS 35,4: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node foreignPara1.firstChild 
+PASS 35,5: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node detachedPara1 
+PASS 35,5: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node detachedPara1 
+PASS 35,6: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node detachedPara1.firstChild 
+PASS 35,6: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node detachedPara1.firstChild 
</ins><span class="cx"> PASS 35,7: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node document 
</span><span class="cx"> PASS 35,7: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node document 
</span><del>-FAIL 35,8: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node detachedDiv assert_true: First differing node: expected Comment node &lt;!--בןם אליעזר--&gt;, got Comment node &lt;!--בן חיים אליעזר--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 35,8: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node detachedDiv assert_true: First differing node: expected Comment node &lt;!--בןם אליעזר--&gt;, got Comment node &lt;!--בן חיים אליעזר--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 35,8: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node detachedDiv 
+PASS 35,8: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node detachedDiv 
</ins><span class="cx"> PASS 35,9: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node foreignDoc 
</span><span class="cx"> PASS 35,9: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node foreignDoc 
</span><del>-FAIL 35,10: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node foreignPara2 assert_true: First differing node: expected Comment node &lt;!--בןם אליעזר--&gt;, got Comment node &lt;!--בן חיים אליעזר--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 35,10: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node foreignPara2 assert_true: First differing node: expected Comment node &lt;!--בןם אליעזר--&gt;, got Comment node &lt;!--בן חיים אליעזר--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 35,10: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node foreignPara2 
+PASS 35,10: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node foreignPara2 
</ins><span class="cx"> PASS 35,11: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node xmlDoc 
</span><span class="cx"> PASS 35,11: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node xmlDoc 
</span><del>-FAIL 35,12: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node xmlElement assert_true: First differing node: expected Comment node &lt;!--בןם אליעזר--&gt;, got Comment node &lt;!--בן חיים אליעזר--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 35,12: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node xmlElement assert_true: First differing node: expected Comment node &lt;!--בןם אליעזר--&gt;, got Comment node &lt;!--בן חיים אליעזר--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 35,13: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node detachedTextNode assert_true: First differing node: expected Comment node &lt;!--בןם אליעזר--&gt;, got Comment node &lt;!--בן חיים אליעזר--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 35,13: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node detachedTextNode assert_true: First differing node: expected Comment node &lt;!--בןם אליעזר--&gt;, got Comment node &lt;!--בן חיים אליעזר--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 35,14: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node foreignTextNode assert_true: First differing node: expected Comment node &lt;!--בןם אליעזר--&gt;, got Comment node &lt;!--בן חיים אליעזר--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 35,14: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node foreignTextNode assert_true: First differing node: expected Comment node &lt;!--בןם אליעזר--&gt;, got Comment node &lt;!--בן חיים אליעזר--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 35,15: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node processingInstruction assert_true: First differing node: expected Comment node &lt;!--בןם אליעזר--&gt;, got Comment node &lt;!--בן חיים אליעזר--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 35,15: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node processingInstruction assert_true: First differing node: expected Comment node &lt;!--בןם אליעזר--&gt;, got Comment node &lt;!--בן חיים אליעזר--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 35,16: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node detachedProcessingInstruction assert_true: First differing node: expected Comment node &lt;!--בןם אליעזר--&gt;, got Comment node &lt;!--בן חיים אליעזר--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 35,16: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node detachedProcessingInstruction assert_true: First differing node: expected Comment node &lt;!--בןם אליעזר--&gt;, got Comment node &lt;!--בן חיים אליעזר--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 35,17: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node comment assert_true: First differing node: expected Comment node &lt;!--בןם אליעזר--&gt;, got Comment node &lt;!--בן חיים אליעזר--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 35,17: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node comment assert_true: First differing node: expected Comment node &lt;!--בןם אליעזר--&gt;, got Comment node &lt;!--בן חיים אליעזר--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 35,18: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node detachedComment assert_true: First differing node: expected Comment node &lt;!--בןם אליעזר--&gt;, got Comment node &lt;!--בן חיים אליעזר--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 35,18: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node detachedComment assert_true: First differing node: expected Comment node &lt;!--בןם אליעזר--&gt;, got Comment node &lt;!--בן חיים אליעזר--&gt; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 35,12: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node xmlElement 
+PASS 35,12: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node xmlElement 
+PASS 35,13: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node detachedTextNode 
+PASS 35,13: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node detachedTextNode 
+PASS 35,14: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node foreignTextNode 
+PASS 35,14: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node foreignTextNode 
+PASS 35,15: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node processingInstruction 
+PASS 35,15: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node processingInstruction 
+PASS 35,16: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node detachedProcessingInstruction 
+PASS 35,16: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node detachedProcessingInstruction 
+PASS 35,17: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node comment 
+PASS 35,17: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node comment 
+PASS 35,18: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node detachedComment 
+PASS 35,18: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node detachedComment 
</ins><span class="cx"> PASS 35,19: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node docfrag 
</span><span class="cx"> PASS 35,19: resulting range position for range [detachedXmlComment, 2, detachedXmlComment, 6], node docfrag 
</span><span class="cx"> PASS 35,20: resulting DOM for range [detachedXmlComment, 2, detachedXmlComment, 6], node doctype 
</span><span class="lines">@@ -1667,38 +1629,38 @@
</span><span class="cx"> PASS 36,20: resulting range position for range [docfrag, 0, docfrag, 0], node doctype 
</span><span class="cx"> PASS 36,21: resulting DOM for range [docfrag, 0, docfrag, 0], node foreignDoctype 
</span><span class="cx"> PASS 36,21: resulting range position for range [docfrag, 0, docfrag, 0], node foreignDoctype 
</span><del>-FAIL 37,0: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node paras[0] assert_true: First differing node: expected ProcessingInstruction node with target &quot;somePI&quot; and data &quot;you know that \&quot;:syn sync fromstart\&quot; is very useful when u...&quot;, got ProcessingInstruction node with target &quot;somePI&quot; and data &quot;Did you know that \&quot;:syn sync fromstart\&quot; is very useful wh...&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 37,0: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node paras[0] assert_true: First differing node: expected ProcessingInstruction node with target &quot;somePI&quot; and data &quot;you know that \&quot;:syn sync fromstart\&quot; is very useful when u...&quot;, got ProcessingInstruction node with target &quot;somePI&quot; and data &quot;Did you know that \&quot;:syn sync fromstart\&quot; is very useful wh...&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 37,1: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node paras[0].firstChild assert_true: First differing node: expected ProcessingInstruction node with target &quot;somePI&quot; and data &quot;you know that \&quot;:syn sync fromstart\&quot; is very useful when u...&quot;, got ProcessingInstruction node with target &quot;somePI&quot; and data &quot;Did you know that \&quot;:syn sync fromstart\&quot; is very useful wh...&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 37,1: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node paras[0].firstChild assert_true: First differing node: expected ProcessingInstruction node with target &quot;somePI&quot; and data &quot;you know that \&quot;:syn sync fromstart\&quot; is very useful when u...&quot;, got ProcessingInstruction node with target &quot;somePI&quot; and data &quot;Did you know that \&quot;:syn sync fromstart\&quot; is very useful wh...&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 37,2: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node paras[1].firstChild assert_true: First differing node: expected ProcessingInstruction node with target &quot;somePI&quot; and data &quot;you know that \&quot;:syn sync fromstart\&quot; is very useful when u...&quot;, got ProcessingInstruction node with target &quot;somePI&quot; and data &quot;Did you know that \&quot;:syn sync fromstart\&quot; is very useful wh...&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 37,2: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node paras[1].firstChild assert_true: First differing node: expected ProcessingInstruction node with target &quot;somePI&quot; and data &quot;you know that \&quot;:syn sync fromstart\&quot; is very useful when u...&quot;, got ProcessingInstruction node with target &quot;somePI&quot; and data &quot;Did you know that \&quot;:syn sync fromstart\&quot; is very useful wh...&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 37,3: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node foreignPara1 assert_true: First differing node: expected ProcessingInstruction node with target &quot;somePI&quot; and data &quot;you know that \&quot;:syn sync fromstart\&quot; is very useful when u...&quot;, got ProcessingInstruction node with target &quot;somePI&quot; and data &quot;Did you know that \&quot;:syn sync fromstart\&quot; is very useful wh...&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 37,3: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node foreignPara1 assert_true: First differing node: expected ProcessingInstruction node with target &quot;somePI&quot; and data &quot;you know that \&quot;:syn sync fromstart\&quot; is very useful when u...&quot;, got ProcessingInstruction node with target &quot;somePI&quot; and data &quot;Did you know that \&quot;:syn sync fromstart\&quot; is very useful wh...&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 37,4: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node foreignPara1.firstChild assert_true: First differing node: expected ProcessingInstruction node with target &quot;somePI&quot; and data &quot;you know that \&quot;:syn sync fromstart\&quot; is very useful when u...&quot;, got ProcessingInstruction node with target &quot;somePI&quot; and data &quot;Did you know that \&quot;:syn sync fromstart\&quot; is very useful wh...&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 37,4: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node foreignPara1.firstChild assert_true: First differing node: expected ProcessingInstruction node with target &quot;somePI&quot; and data &quot;you know that \&quot;:syn sync fromstart\&quot; is very useful when u...&quot;, got ProcessingInstruction node with target &quot;somePI&quot; and data &quot;Did you know that \&quot;:syn sync fromstart\&quot; is very useful wh...&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 37,5: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node detachedPara1 assert_true: First differing node: expected ProcessingInstruction node with target &quot;somePI&quot; and data &quot;you know that \&quot;:syn sync fromstart\&quot; is very useful when u...&quot;, got ProcessingInstruction node with target &quot;somePI&quot; and data &quot;Did you know that \&quot;:syn sync fromstart\&quot; is very useful wh...&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 37,5: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node detachedPara1 assert_true: First differing node: expected ProcessingInstruction node with target &quot;somePI&quot; and data &quot;you know that \&quot;:syn sync fromstart\&quot; is very useful when u...&quot;, got ProcessingInstruction node with target &quot;somePI&quot; and data &quot;Did you know that \&quot;:syn sync fromstart\&quot; is very useful wh...&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 37,6: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node detachedPara1.firstChild assert_true: First differing node: expected ProcessingInstruction node with target &quot;somePI&quot; and data &quot;you know that \&quot;:syn sync fromstart\&quot; is very useful when u...&quot;, got ProcessingInstruction node with target &quot;somePI&quot; and data &quot;Did you know that \&quot;:syn sync fromstart\&quot; is very useful wh...&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 37,6: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node detachedPara1.firstChild assert_true: First differing node: expected ProcessingInstruction node with target &quot;somePI&quot; and data &quot;you know that \&quot;:syn sync fromstart\&quot; is very useful when u...&quot;, got ProcessingInstruction node with target &quot;somePI&quot; and data &quot;Did you know that \&quot;:syn sync fromstart\&quot; is very useful wh...&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 37,0: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node paras[0] 
+PASS 37,0: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node paras[0] 
+PASS 37,1: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node paras[0].firstChild 
+PASS 37,1: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node paras[0].firstChild 
+PASS 37,2: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node paras[1].firstChild 
+PASS 37,2: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node paras[1].firstChild 
+PASS 37,3: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node foreignPara1 
+PASS 37,3: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node foreignPara1 
+PASS 37,4: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node foreignPara1.firstChild 
+PASS 37,4: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node foreignPara1.firstChild 
+PASS 37,5: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node detachedPara1 
+PASS 37,5: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node detachedPara1 
+PASS 37,6: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node detachedPara1.firstChild 
+PASS 37,6: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node detachedPara1.firstChild 
</ins><span class="cx"> PASS 37,7: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node document 
</span><span class="cx"> PASS 37,7: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node document 
</span><del>-FAIL 37,8: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node detachedDiv assert_true: First differing node: expected ProcessingInstruction node with target &quot;somePI&quot; and data &quot;you know that \&quot;:syn sync fromstart\&quot; is very useful when u...&quot;, got ProcessingInstruction node with target &quot;somePI&quot; and data &quot;Did you know that \&quot;:syn sync fromstart\&quot; is very useful wh...&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 37,8: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node detachedDiv assert_true: First differing node: expected ProcessingInstruction node with target &quot;somePI&quot; and data &quot;you know that \&quot;:syn sync fromstart\&quot; is very useful when u...&quot;, got ProcessingInstruction node with target &quot;somePI&quot; and data &quot;Did you know that \&quot;:syn sync fromstart\&quot; is very useful wh...&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 37,8: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node detachedDiv 
+PASS 37,8: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node detachedDiv 
</ins><span class="cx"> PASS 37,9: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node foreignDoc 
</span><span class="cx"> PASS 37,9: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node foreignDoc 
</span><del>-FAIL 37,10: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node foreignPara2 assert_true: First differing node: expected ProcessingInstruction node with target &quot;somePI&quot; and data &quot;you know that \&quot;:syn sync fromstart\&quot; is very useful when u...&quot;, got ProcessingInstruction node with target &quot;somePI&quot; and data &quot;Did you know that \&quot;:syn sync fromstart\&quot; is very useful wh...&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 37,10: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node foreignPara2 assert_true: First differing node: expected ProcessingInstruction node with target &quot;somePI&quot; and data &quot;you know that \&quot;:syn sync fromstart\&quot; is very useful when u...&quot;, got ProcessingInstruction node with target &quot;somePI&quot; and data &quot;Did you know that \&quot;:syn sync fromstart\&quot; is very useful wh...&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 37,10: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node foreignPara2 
+PASS 37,10: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node foreignPara2 
</ins><span class="cx"> PASS 37,11: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node xmlDoc 
</span><span class="cx"> PASS 37,11: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node xmlDoc 
</span><del>-FAIL 37,12: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node xmlElement assert_true: First differing node: expected ProcessingInstruction node with target &quot;somePI&quot; and data &quot;you know that \&quot;:syn sync fromstart\&quot; is very useful when u...&quot;, got Text node &quot;do re mi fa so la ti&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 37,12: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node xmlElement assert_true: First differing node: expected ProcessingInstruction node with target &quot;somePI&quot; and data &quot;you know that \&quot;:syn sync fromstart\&quot; is very useful when u...&quot;, got Text node &quot;do re mi fa so la ti&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 37,13: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node detachedTextNode assert_true: First differing node: expected ProcessingInstruction node with target &quot;somePI&quot; and data &quot;you know that \&quot;:syn sync fromstart\&quot; is very useful when u...&quot;, got ProcessingInstruction node with target &quot;somePI&quot; and data &quot;Did you know that \&quot;:syn sync fromstart\&quot; is very useful wh...&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 37,13: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node detachedTextNode assert_true: First differing node: expected ProcessingInstruction node with target &quot;somePI&quot; and data &quot;you know that \&quot;:syn sync fromstart\&quot; is very useful when u...&quot;, got ProcessingInstruction node with target &quot;somePI&quot; and data &quot;Did you know that \&quot;:syn sync fromstart\&quot; is very useful wh...&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 37,14: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node foreignTextNode assert_true: First differing node: expected ProcessingInstruction node with target &quot;somePI&quot; and data &quot;you know that \&quot;:syn sync fromstart\&quot; is very useful when u...&quot;, got ProcessingInstruction node with target &quot;somePI&quot; and data &quot;Did you know that \&quot;:syn sync fromstart\&quot; is very useful wh...&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 37,14: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node foreignTextNode assert_true: First differing node: expected ProcessingInstruction node with target &quot;somePI&quot; and data &quot;you know that \&quot;:syn sync fromstart\&quot; is very useful when u...&quot;, got ProcessingInstruction node with target &quot;somePI&quot; and data &quot;Did you know that \&quot;:syn sync fromstart\&quot; is very useful wh...&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 37,15: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node processingInstruction assert_true: First differing node: expected ProcessingInstruction node with target &quot;somePI&quot; and data &quot;you know that \&quot;:syn sync fromstart\&quot; is very useful when u...&quot;, got ProcessingInstruction node with target &quot;somePI&quot; and data &quot;Did you know that \&quot;:syn sync fromstart\&quot; is very useful wh...&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
-FAIL 37,15: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node processingInstruction assert_true: First differing node: expected ProcessingInstruction node with target &quot;somePI&quot; and data &quot;you know that \&quot;:syn sync fromstart\&quot; is very useful when u...&quot;, got ProcessingInstruction node with target &quot;somePI&quot; and data &quot;Did you know that \&quot;:syn sync fromstart\&quot; is very useful wh...&quot; [Actual and expected mismatch for range's tree root.  ] expected true got false
</del><ins>+PASS 37,12: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node xmlElement 
+PASS 37,12: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node xmlElement 
+PASS 37,13: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node detachedTextNode 
+PASS 37,13: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node detachedTextNode 
+PASS 37,14: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node foreignTextNode 
+PASS 37,14: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node foreignTextNode 
+PASS 37,15: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node processingInstruction 
+PASS 37,15: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node processingInstruction 
</ins><span class="cx"> PASS 37,16: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node detachedProcessingInstruction 
</span><span class="cx"> PASS 37,16: resulting range position for range [processingInstruction, 0, processingInstruction, 4], node detachedProcessingInstruction 
</span><span class="cx"> PASS 37,17: resulting DOM for range [processingInstruction, 0, processingInstruction, 4], node comment 
</span></span></pre></div>
<a id="trunkLayoutTestsplatformeflfastdomRangesurroundContents1expectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/platform/efl/fast/dom/Range/surroundContents-1-expected.txt (204389 => 204390)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/efl/fast/dom/Range/surroundContents-1-expected.txt        2016-08-11 21:25:08 UTC (rev 204389)
+++ trunk/LayoutTests/platform/efl/fast/dom/Range/surroundContents-1-expected.txt        2016-08-11 22:27:17 UTC (rev 204390)
</span><span class="lines">@@ -1,13 +0,0 @@
</span><del>-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x576
-      RenderBlock {P} at (0,0) size 784x18
-        RenderText {#text} at (0,0) size 563x17
-          text run at (0,0) width 563: &quot;This tests for HIERARCHY_REQUEST_ERRs when calling Range::surroundContents.&quot;
-      RenderBlock {DIV} at (0,34) size 784x22 [border: (1px solid #0000FF)]
-        RenderBlock {DIV} at (1,1) size 782x20 [border: (1px solid #FF0000)]
-          RenderText {#text} at (1,1) size 80x17
-            text run at (1,1) width 80: &quot;Hello world.&quot;
-      RenderBlock {UL} at (0,72) size 784x0
</del></span></pre></div>
<a id="trunkLayoutTestsplatformgtkfastdomRangesurroundContents1expectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/platform/gtk/fast/dom/Range/surroundContents-1-expected.txt (204389 => 204390)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/gtk/fast/dom/Range/surroundContents-1-expected.txt        2016-08-11 21:25:08 UTC (rev 204389)
+++ trunk/LayoutTests/platform/gtk/fast/dom/Range/surroundContents-1-expected.txt        2016-08-11 22:27:17 UTC (rev 204390)
</span><span class="lines">@@ -1,13 +0,0 @@
</span><del>-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x576
-      RenderBlock {P} at (0,0) size 784x17
-        RenderText {#text} at (0,0) size 563x17
-          text run at (0,0) width 563: &quot;This tests for HIERARCHY_REQUEST_ERRs when calling Range::surroundContents.&quot;
-      RenderBlock {DIV} at (0,33) size 784x21 [border: (1px solid #0000FF)]
-        RenderBlock {DIV} at (1,1) size 782x19 [border: (1px solid #FF0000)]
-          RenderText {#text} at (1,1) size 80x17
-            text run at (1,1) width 80: &quot;Hello world.&quot;
-      RenderBlock {UL} at (0,70) size 784x0
</del></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorfastdomRangesurroundContents1expectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/platform/ios-simulator/fast/dom/Range/surroundContents-1-expected.txt (204389 => 204390)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/fast/dom/Range/surroundContents-1-expected.txt        2016-08-11 21:25:08 UTC (rev 204389)
+++ trunk/LayoutTests/platform/ios-simulator/fast/dom/Range/surroundContents-1-expected.txt        2016-08-11 22:27:17 UTC (rev 204390)
</span><span class="lines">@@ -1,13 +0,0 @@
</span><del>-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x576
-      RenderBlock {P} at (0,0) size 784x20
-        RenderText {#text} at (0,0) size 564x19
-          text run at (0,0) width 564: &quot;This tests for HIERARCHY_REQUEST_ERRs when calling Range::surroundContents.&quot;
-      RenderBlock {DIV} at (0,36) size 784x24 [border: (1px solid #0000FF)]
-        RenderBlock {DIV} at (1,1) size 782x22 [border: (1px solid #FF0000)]
-          RenderText {#text} at (1,1) size 81x19
-            text run at (1,1) width 81: &quot;Hello world.&quot;
-      RenderBlock {UL} at (0,76) size 784x0
</del></span></pre></div>
<a id="trunkLayoutTestsplatformmacfastdomRangesurroundContents1expectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/platform/mac/fast/dom/Range/surroundContents-1-expected.txt (204389 => 204390)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/fast/dom/Range/surroundContents-1-expected.txt        2016-08-11 21:25:08 UTC (rev 204389)
+++ trunk/LayoutTests/platform/mac/fast/dom/Range/surroundContents-1-expected.txt        2016-08-11 22:27:17 UTC (rev 204390)
</span><span class="lines">@@ -1,13 +0,0 @@
</span><del>-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x576
-      RenderBlock {P} at (0,0) size 784x18
-        RenderText {#text} at (0,0) size 564x18
-          text run at (0,0) width 564: &quot;This tests for HIERARCHY_REQUEST_ERRs when calling Range::surroundContents.&quot;
-      RenderBlock {DIV} at (0,34) size 784x22 [border: (1px solid #0000FF)]
-        RenderBlock {DIV} at (1,1) size 782x20 [border: (1px solid #FF0000)]
-          RenderText {#text} at (1,1) size 81x18
-            text run at (1,1) width 81: &quot;Hello world.&quot;
-      RenderBlock {UL} at (0,72) size 784x0
</del></span></pre></div>
<a id="trunkLayoutTestsplatformwinfastdomRangesurroundContents1expectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/platform/win/fast/dom/Range/surroundContents-1-expected.txt (204389 => 204390)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/win/fast/dom/Range/surroundContents-1-expected.txt        2016-08-11 21:25:08 UTC (rev 204389)
+++ trunk/LayoutTests/platform/win/fast/dom/Range/surroundContents-1-expected.txt        2016-08-11 22:27:17 UTC (rev 204390)
</span><span class="lines">@@ -1,13 +0,0 @@
</span><del>-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderBlock {HTML} at (0,0) size 800x600
-    RenderBody {BODY} at (8,8) size 784x576
-      RenderBlock {P} at (0,0) size 784x18
-        RenderText {#text} at (0,0) size 563x18
-          text run at (0,0) width 563: &quot;This tests for HIERARCHY_REQUEST_ERRs when calling Range::surroundContents.&quot;
-      RenderBlock {DIV} at (0,34) size 784x22 [border: (1px solid #0000FF)]
-        RenderBlock {DIV} at (1,1) size 782x20 [border: (1px solid #FF0000)]
-          RenderText {#text} at (1,1) size 80x18
-            text run at (1,1) width 80: &quot;Hello world.&quot;
-      RenderBlock {UL} at (0,72) size 784x0
</del></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (204389 => 204390)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-08-11 21:25:08 UTC (rev 204389)
+++ trunk/Source/WebCore/ChangeLog        2016-08-11 22:27:17 UTC (rev 204390)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2016-08-11  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Align Range.surroundContents() with the latest DOM specification
+        https://bugs.webkit.org/show_bug.cgi?id=160777
+
+        Reviewed by Ryosuke Niwa.
+
+        Align Range.surroundContents() with the latest DOM specification:
+        - https://dom.spec.whatwg.org/#dom-range-surroundcontents
+
+        In particular, the following changes were made:
+        1. Drop early check to see if startContainer() accepts children like
+           newParent. This check is not in the specification. Let the later
+           call to Range.insertNode() take care of doing the check and
+           throwing.
+        2. Drop early check to see if newParent contains the range's start
+           node, for the same reasons as above.
+        3. Move extractContents() call *before* removing newParent's children
+           to match the order in the specification (steps 3 &amp; 4).
+
+        This makes our behavior much closer to Firefox's as well.
+
+        No new tests, rebaselined existing W3C test.
+
+        * dom/Range.cpp:
+        (WebCore::Range::surroundContents):
+
</ins><span class="cx"> 2016-08-11  Alex Christensen  &lt;achristensen@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Add URLParser stub
</span></span></pre></div>
<a id="trunkSourceWebCoredomRangecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Range.cpp (204389 => 204390)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Range.cpp        2016-08-11 21:25:08 UTC (rev 204389)
+++ trunk/Source/WebCore/dom/Range.cpp        2016-08-11 22:27:17 UTC (rev 204390)
</span><span class="lines">@@ -1022,12 +1022,12 @@
</span><span class="cx">     m_end.setToEndOfNode(refNode);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Range::surroundContents(Node&amp; passNewParent, ExceptionCode&amp; ec)
</del><ins>+// https://dom.spec.whatwg.org/#dom-range-surroundcontents
+void Range::surroundContents(Node&amp; newParent, ExceptionCode&amp; ec)
</ins><span class="cx"> {
</span><del>-    Ref&lt;Node&gt; newParent = passNewParent;
</del><ins>+    Ref&lt;Node&gt; protectedNewParent(newParent);
</ins><span class="cx"> 
</span><del>-    // INVALID_STATE_ERR: Raised if the Range partially selects a non-Text node.
-    // https://dom.spec.whatwg.org/#dom-range-surroundcontents (step 1).
</del><ins>+    // Step 1: If a non-Text node is partially contained in the context object, then throw an InvalidStateError.
</ins><span class="cx">     Node* startNonTextContainer = &amp;startContainer();
</span><span class="cx">     if (startNonTextContainer-&gt;nodeType() == Node::TEXT_NODE)
</span><span class="cx">         startNonTextContainer = startNonTextContainer-&gt;parentNode();
</span><span class="lines">@@ -1039,9 +1039,8 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    // INVALID_NODE_TYPE_ERR: Raised if node is an Attr, Entity, DocumentType,
-    // Document, or DocumentFragment node.
-    switch (newParent-&gt;nodeType()) {
</del><ins>+    // Step 2: If newParent is a Document, DocumentType, or DocumentFragment node, then throw an InvalidNodeTypeError.
+    switch (newParent.nodeType()) {
</ins><span class="cx">         case Node::ATTRIBUTE_NODE:
</span><span class="cx">         case Node::DOCUMENT_FRAGMENT_NODE:
</span><span class="cx">         case Node::DOCUMENT_NODE:
</span><span class="lines">@@ -1056,42 +1055,31 @@
</span><span class="cx">             break;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    // Raise a HIERARCHY_REQUEST_ERR if startContainer() doesn't accept children like newParent.
-    Node* parentOfNewParent = &amp;startContainer();
</del><ins>+    ec = 0;
</ins><span class="cx"> 
</span><del>-    // If startContainer() is a character data node, it will be split and it will be its parent that will
-    // need to accept newParent (or in the case of a comment, it logically &quot;would&quot; be inserted into the parent,
-    // although this will fail below for another reason).
-    if (parentOfNewParent-&gt;isCharacterDataNode())
-        parentOfNewParent = parentOfNewParent-&gt;parentNode();
-    if (!parentOfNewParent || !parentOfNewParent-&gt;childTypeAllowed(newParent-&gt;nodeType())) {
-        ec = HIERARCHY_REQUEST_ERR;
</del><ins>+    // Step 3: Let fragment be the result of extracting context object.
+    RefPtr&lt;DocumentFragment&gt; fragment = extractContents(ec);
+    if (ec)
</ins><span class="cx">         return;
</span><del>-    }
-    
-    if (newParent-&gt;contains(&amp;startContainer())) {
-        ec = HIERARCHY_REQUEST_ERR;
-        return;
-    }
</del><span class="cx"> 
</span><del>-    // FIXME: Do we need a check if the node would end up with a child node of a type not
-    // allowed by the type of node?
-
-    ec = 0;
-    while (Node* n = newParent-&gt;firstChild()) {
-        downcast&lt;ContainerNode&gt;(newParent.get()).removeChild(*n, ec);
</del><ins>+    // Step 4: If newParent has children, replace all with null within newParent.
+    while (Node* n = newParent.firstChild()) {
+        downcast&lt;ContainerNode&gt;(newParent).removeChild(*n, ec);
</ins><span class="cx">         if (ec)
</span><span class="cx">             return;
</span><span class="cx">     }
</span><del>-    RefPtr&lt;DocumentFragment&gt; fragment = extractContents(ec);
</del><ins>+
+    // Step 5: Insert newParent into context object.
+    insertNode(newParent, ec);
</ins><span class="cx">     if (ec)
</span><span class="cx">         return;
</span><del>-    insertNode(newParent.copyRef(), ec);
</del><ins>+
+    // Step 6: Append fragment to newParent.
+    newParent.appendChild(*fragment, ec);
</ins><span class="cx">     if (ec)
</span><span class="cx">         return;
</span><del>-    newParent-&gt;appendChild(*fragment, ec);
-    if (ec)
-        return;
</del><ins>+
+    // Step 7: Select newParent within context object.
</ins><span class="cx">     selectNode(newParent, ec);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>