<!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>[163615] trunk/LayoutTests</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/163615">163615</a></dd>
<dt>Author</dt> <dd>g.czajkowski@samsung.com</dd>
<dt>Date</dt> <dd>2014-02-07 01:20:03 -0800 (Fri, 07 Feb 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Verify misspellings after lines merge/split asynchronously
https://bugs.webkit.org/show_bug.cgi?id=128305

Reviewed by Ryosuke Niwa.

Adapt two spelling tests to use asynchronous spellchecking.

* editing/spelling/script-tests/spelling-backspace-between-lines.js:
(testTwoLinesMisspellings):
(testMisspellingsAfterLineMergeUsingDelete):
(testMisspellingsAfterLineMergeUsingForwardDelete):
Group test cases into separated methods.
Use shouldBeEqualToString to compare strings.
Add newly created div elements instead of overriding
the previous one in order that non DumpRenderTree users
can see what has been tested.

* editing/spelling/spelling-backspace-between-lines-expected.txt:
* editing/spelling/spelling-linebreak-expected.txt:
* editing/spelling/spelling-linebreak.html:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestseditingspellingscripttestsspellingbackspacebetweenlinesjs">trunk/LayoutTests/editing/spelling/script-tests/spelling-backspace-between-lines.js</a></li>
<li><a href="#trunkLayoutTestseditingspellingspellingbackspacebetweenlinesexpectedtxt">trunk/LayoutTests/editing/spelling/spelling-backspace-between-lines-expected.txt</a></li>
<li><a href="#trunkLayoutTestseditingspellingspellinglinebreakexpectedtxt">trunk/LayoutTests/editing/spelling/spelling-linebreak-expected.txt</a></li>
<li><a href="#trunkLayoutTestseditingspellingspellinglinebreakhtml">trunk/LayoutTests/editing/spelling/spelling-linebreak.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (163614 => 163615)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-02-07 08:32:30 UTC (rev 163614)
+++ trunk/LayoutTests/ChangeLog        2014-02-07 09:20:03 UTC (rev 163615)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2014-02-07  Grzegorz Czajkowski  &lt;g.czajkowski@samsung.com&gt;
+
+        Verify misspellings after lines merge/split asynchronously
+        https://bugs.webkit.org/show_bug.cgi?id=128305
+
+        Reviewed by Ryosuke Niwa.
+
+        Adapt two spelling tests to use asynchronous spellchecking.
+
+        * editing/spelling/script-tests/spelling-backspace-between-lines.js:
+        (testTwoLinesMisspellings):
+        (testMisspellingsAfterLineMergeUsingDelete):
+        (testMisspellingsAfterLineMergeUsingForwardDelete):
+        Group test cases into separated methods.
+        Use shouldBeEqualToString to compare strings.
+        Add newly created div elements instead of overriding
+        the previous one in order that non DumpRenderTree users
+        can see what has been tested.
+
+        * editing/spelling/spelling-backspace-between-lines-expected.txt:
+        * editing/spelling/spelling-linebreak-expected.txt:
+        * editing/spelling/spelling-linebreak.html:
+
</ins><span class="cx"> 2014-02-06  Gyuyoung Kim  &lt;gyuyoung.kim@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add a test case for navigator.isProtocolHandlerRegistered
</span></span></pre></div>
<a id="trunkLayoutTestseditingspellingscripttestsspellingbackspacebetweenlinesjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/editing/spelling/script-tests/spelling-backspace-between-lines.js (163614 => 163615)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/spelling/script-tests/spelling-backspace-between-lines.js        2014-02-07 08:32:30 UTC (rev 163614)
+++ trunk/LayoutTests/editing/spelling/script-tests/spelling-backspace-between-lines.js        2014-02-07 09:20:03 UTC (rev 163615)
</span><span class="lines">@@ -1,65 +1,97 @@
</span><ins>+description('Spelling markers should remain while merging two lines.');
</ins><span class="cx"> 
</span><del>-description('For Bug 41423: Spelling marker should remain after hitting a backspace key.');
</del><ins>+jsTestIsAsync = true;
</ins><span class="cx"> 
</span><ins>+if (window.internals) {
+    internals.settings.setUnifiedTextCheckerEnabled(true);
+    internals.settings.setAsynchronousSpellCheckingEnabled(true);
+}
+
</ins><span class="cx"> var testRoot = document.createElement(&quot;div&quot;);
</span><span class="cx"> document.body.insertBefore(testRoot, document.body.firstChild);
</span><span class="cx"> 
</span><span class="cx"> function setup(targetName)
</span><span class="cx"> {
</span><del>-    testRoot.innerHTML = &quot;&lt;div id='&quot; + targetName + &quot;' contentEditable&gt;&lt;div&gt;OK&lt;/div&gt;&lt;div&gt;OK zz OK&lt;/div&gt;&lt;/div&gt;&quot;;
-    document.getElementById(targetName).focus();
</del><ins>+    var div = document.createElement(&quot;div&quot;);
+    div.id = targetName;
+    div.contentEditable = true;
+    div.innerHTML = &quot;&lt;div&gt;OK&lt;/div&gt;&lt;div&gt;OK zz OK&lt;/div&gt;&quot;;
+    testRoot.appendChild(div);
+
+    div.focus();
</ins><span class="cx">     return document.getSelection();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-function firstLineText()
</del><ins>+function firstLineText(targetName)
</ins><span class="cx"> {
</span><del>-    return testRoot.firstChild.firstChild.innerText.trim();
</del><ins>+    var div = document.getElementById(targetName);
+    return div.firstChild.innerText.trim();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-function testWithDelete()
</del><ins>+function testTwoLinesMisspellings()
</ins><span class="cx"> {
</span><del>-    window.sel = setup(&quot;target1&quot;);
</del><ins>+    window.sel = setup(&quot;target1&quot;); // ^OK
</ins><span class="cx"> 
</span><del>-    sel.modify(&quot;move&quot;, &quot;forward&quot;, &quot;line&quot;);
-    for (var i = 0; i &lt; 3; i++) // 3 for [&quot;OK, &quot;zz&quot;, &quot;OK&quot;].length
</del><ins>+    sel.modify(&quot;move&quot;, &quot;forward&quot;, &quot;line&quot;); // ^OK zz OK
+    for (var i = 0; i &lt; 3; i++)
</ins><span class="cx">         sel.modify(&quot;move&quot;, &quot;forward&quot;, &quot;word&quot;);
</span><span class="cx"> 
</span><del>-    shouldBe(&quot;firstLineText()&quot;, &quot;'OK'&quot;);
-    shouldBe(&quot;sel.anchorNode.data&quot;, &quot;'OK zz OK'&quot;);
-    shouldBeTrue(&quot;internals.hasSpellingMarker(3, 2)&quot;);
</del><ins>+    shouldBeEqualToString(&quot;firstLineText('target1')&quot;, &quot;OK&quot;);
+    shouldBeEqualToString(&quot;sel.anchorNode.data&quot;, &quot;OK zz OK&quot;);
+    if (window.internals)
+        shouldBecomeEqual(&quot;internals.hasSpellingMarker(3, 2)&quot;, &quot;true&quot;, done);
+    else
+        done();
+}
</ins><span class="cx"> 
</span><del>-    sel.modify(&quot;move&quot;, &quot;left&quot;, &quot;lineboundary&quot;);
-    document.execCommand(&quot;Delete&quot;, false);
-    sel.modify(&quot;move&quot;, &quot;right&quot;, &quot;line&quot;); // Moves to the line ending to focus the &quot;OK zz OK&quot; text.
</del><ins>+function testMisspellingsAfterLineMergeUsingDelete()
+{
+    window.sel = setup(&quot;target2&quot;); // ^OK
</ins><span class="cx"> 
</span><del>-    shouldBe(&quot;sel.anchorNode.data&quot;, &quot;'OKOK zz OK'&quot;);
-    shouldBe(&quot;firstLineText()&quot;, &quot;'OKOK zz OK'&quot;);
-    shouldBeTrue(&quot;internals.hasSpellingMarker(5, 2)&quot;);
</del><ins>+    sel.modify(&quot;move&quot;, &quot;forward&quot;, &quot;line&quot;); // ^OK zz OK
+    document.execCommand(&quot;Delete&quot;, false); // OK^OK zz OK
+    sel.modify(&quot;move&quot;, &quot;right&quot;, &quot;line&quot;); // OKOK zz OK^
+
+    shouldBeEqualToString(&quot;firstLineText('target2')&quot;, &quot;OKOK zz OK&quot;);
+    shouldBeEqualToString(&quot;sel.anchorNode.data&quot;, &quot;OKOK zz OK&quot;);
+    if (window.internals)
+        shouldBecomeEqual(&quot;internals.hasSpellingMarker(5, 2)&quot;, &quot;true&quot;, done);
+    else
+        done();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-function testWithForwardDelete()
</del><ins>+function testMisspellingsAfterLineMergeUsingForwardDelete()
</ins><span class="cx"> {
</span><del>-    window.sel = setup(&quot;target1&quot;);
</del><ins>+    window.sel = setup(&quot;target3&quot;); // ^OK
</ins><span class="cx"> 
</span><del>-    sel.modify(&quot;move&quot;, &quot;forward&quot;, &quot;line&quot;);
-    for (var i = 0; i &lt; 3; i++) // 3 for [&quot;OK, &quot;zz&quot;, &quot;OK&quot;].length
-        sel.modify(&quot;move&quot;, &quot;forward&quot;, &quot;word&quot;);
</del><ins>+    sel.modify(&quot;move&quot;, &quot;forward&quot;, &quot;word&quot;); // OK^
+    document.execCommand(&quot;ForwardDelete&quot;, false); // OK^OK zz OK
+    sel.modify(&quot;move&quot;, &quot;right&quot;, &quot;line&quot;); // OKOK zz OK^
</ins><span class="cx"> 
</span><del>-    shouldBe(&quot;firstLineText()&quot;, &quot;'OK'&quot;);
-    shouldBe(&quot;sel.anchorNode.data&quot;, &quot;'OK zz OK'&quot;);
-    shouldBeTrue(&quot;internals.hasSpellingMarker(3, 2)&quot;);
</del><ins>+    shouldBeEqualToString(&quot;firstLineText('target3')&quot;, &quot;OKOK zz OK&quot;);
+    shouldBeEqualToString(&quot;sel.anchorNode.data&quot;, &quot;OKOK zz OK&quot;);
+    if (window.internals)
+        shouldBecomeEqual(&quot;internals.hasSpellingMarker(5, 2)&quot;, &quot;true&quot;, done);
+    else
+        done();
+}
</ins><span class="cx"> 
</span><del>-    sel.modify(&quot;move&quot;, &quot;left&quot;, &quot;line&quot;);
-    document.execCommand(&quot;ForwardDelete&quot;, false);
-    sel.modify(&quot;move&quot;, &quot;right&quot;, &quot;line&quot;); // Moves to the line ending to focus the &quot;OK zz OK&quot; text.
</del><ins>+var tests = [ function() { testTwoLinesMisspellings(); },
+              function() { testMisspellingsAfterLineMergeUsingDelete(); },
+              function() { testMisspellingsAfterLineMergeUsingForwardDelete(); }
+];
</ins><span class="cx"> 
</span><del>-    shouldBe(&quot;firstLineText()&quot;, &quot;'OKOK zz OK'&quot;);
-    shouldBe(&quot;sel.anchorNode.data&quot;, &quot;'OKOK zz OK'&quot;);
-    shouldBeTrue(&quot;internals.hasSpellingMarker(5, 2)&quot;);
</del><ins>+function done()
+{
+    var next = tests.shift();
+    if (next)
+        return window.setTimeout(next, 0);
+
+    if (window.internals)
+        testRoot.style.display = &quot;none&quot;;
+
+    finishJSTest();
</ins><span class="cx"> }
</span><ins>+done();
</ins><span class="cx"> 
</span><del>-testWithDelete();
-testWithForwardDelete();
-testRoot.style.display = &quot;none&quot;;
-
</del><span class="cx"> var successfullyParsed = true;
</span></span></pre></div>
<a id="trunkLayoutTestseditingspellingspellingbackspacebetweenlinesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/editing/spelling/spelling-backspace-between-lines-expected.txt (163614 => 163615)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/spelling/spelling-backspace-between-lines-expected.txt        2014-02-07 08:32:30 UTC (rev 163614)
+++ trunk/LayoutTests/editing/spelling/spelling-backspace-between-lines-expected.txt        2014-02-07 09:20:03 UTC (rev 163615)
</span><span class="lines">@@ -1,20 +1,17 @@
</span><del>-For Bug 41423: Spelling marker should remain after hitting a backspace key.
</del><ins>+Spelling markers should remain while merging two lines.
</ins><span class="cx"> 
</span><span class="cx"> On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-PASS firstLineText() is 'OK'
-PASS sel.anchorNode.data is 'OK zz OK'
-PASS internals.hasSpellingMarker(3, 2) is true
-PASS sel.anchorNode.data is 'OKOK zz OK'
-PASS firstLineText() is 'OKOK zz OK'
-PASS internals.hasSpellingMarker(5, 2) is true
-PASS firstLineText() is 'OK'
-PASS sel.anchorNode.data is 'OK zz OK'
-PASS internals.hasSpellingMarker(3, 2) is true
-PASS firstLineText() is 'OKOK zz OK'
-PASS sel.anchorNode.data is 'OKOK zz OK'
-PASS internals.hasSpellingMarker(5, 2) is true
</del><ins>+PASS firstLineText('target1') is &quot;OK&quot;
+PASS sel.anchorNode.data is &quot;OK zz OK&quot;
+PASS internals.hasSpellingMarker(3, 2) became true
+PASS firstLineText('target2') is &quot;OKOK zz OK&quot;
+PASS sel.anchorNode.data is &quot;OKOK zz OK&quot;
+PASS internals.hasSpellingMarker(5, 2) became true
+PASS firstLineText('target3') is &quot;OKOK zz OK&quot;
+PASS sel.anchorNode.data is &quot;OKOK zz OK&quot;
+PASS internals.hasSpellingMarker(5, 2) became true
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestseditingspellingspellinglinebreakexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/editing/spelling/spelling-linebreak-expected.txt (163614 => 163615)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/spelling/spelling-linebreak-expected.txt        2014-02-07 08:32:30 UTC (rev 163614)
+++ trunk/LayoutTests/editing/spelling/spelling-linebreak-expected.txt        2014-02-07 09:20:03 UTC (rev 163615)
</span><span class="lines">@@ -1,3 +1,10 @@
</span><del>-You should see 'zz a' on the first line below, and 'a' on the second line. 'zz' (and only 'zz') should be marked as misspelled.
-PASS
</del><ins>+Misspellings should be preserved when a line-break command splits a text node. You should see 'Hello,zz a' on the first line below, and 'a' on the second line. This test succeeds when 'zz' (and only 'zz') is marked as misspelled.
</ins><span class="cx"> 
</span><ins>+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS internals.hasSpellingMarker(6, 2) became true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestseditingspellingspellinglinebreakhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/editing/spelling/spelling-linebreak.html (163614 => 163615)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/spelling/spelling-linebreak.html        2014-02-07 08:32:30 UTC (rev 163614)
+++ trunk/LayoutTests/editing/spelling/spelling-linebreak.html        2014-02-07 09:20:03 UTC (rev 163615)
</span><span class="lines">@@ -8,17 +8,20 @@
</span><span class="cx">     font-size: 24px; 
</span><span class="cx"> }
</span><span class="cx"> &lt;/style&gt;
</span><ins>+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script src=../editing.js language=&quot;JavaScript&quot; type=&quot;text/JavaScript&quot; &gt;&lt;/script&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;script&gt;
</span><del>-function log(msg) {
-    document.getElementById(&quot;console&quot;).innerHTML += (msg + &quot;\n&quot;);
</del><ins>+
+jsTestIsAsync = true;
+
+if (window.internals) {
+    internals.settings.setUnifiedTextCheckerEnabled(true);
+    internals.settings.setAsynchronousSpellCheckingEnabled(true);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function editingTest() {
</span><span class="cx"> 
</span><del>-    if (window.testRunner)
-        testRunner.dumpAsText();
</del><span class="cx">     var elem = document.getElementById(&quot;test&quot;);
</span><span class="cx">     var selection = window.getSelection();
</span><span class="cx">     selection.setPosition(elem, 6);
</span><span class="lines">@@ -34,11 +37,10 @@
</span><span class="cx"> 
</span><span class="cx">     if (window.testRunner) {
</span><span class="cx">         selection.setPosition(elem, 0);
</span><del>-        if (internals.hasSpellingMarker(6, 2))
-           log(&quot;PASS&quot;);
-        else
-           log(&quot;FAIL&quot;);
-        document.getElementById(&quot;root&quot;).style.display = &quot;none&quot;;
</del><ins>+        shouldBecomeEqual(&quot;internals.hasSpellingMarker(6, 2)&quot;, &quot;true&quot;, function() {
+            document.getElementById(&quot;root&quot;).style.display = &quot;none&quot;;
+            finishJSTest();
+        });
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> }
</span><span class="lines">@@ -48,15 +50,19 @@
</span><span class="cx"> &lt;title&gt;Editing Test&lt;/title&gt; 
</span><span class="cx"> &lt;/head&gt; 
</span><span class="cx"> &lt;body&gt;
</span><del>-&lt;div&gt;You should see 'zz a' on the first line below, and 'a' on the second line. 'zz' (and only 'zz') should be marked as misspelled.&lt;/div&gt;
</del><ins>+&lt;script&gt;
+description(&quot;Misspellings should be preserved when a line-break command &quot;
+    + &quot;splits a text node. You should see 'Hello,zz a' on the first line below, &quot;
+    + &quot;and 'a' on the second line. &quot;
+    + &quot;This test succeeds when 'zz' (and only 'zz') is marked as misspelled.&quot;);
+&lt;/script&gt;
</ins><span class="cx"> &lt;div contenteditable id=&quot;root&quot; class=&quot;editing&quot;&gt;
</span><span class="cx"> &lt;!-- wee need leading &quot;Hello,&quot; to preserve the marker even after setPosition() --&gt;
</span><span class="cx"> &lt;span id=&quot;test&quot;&gt;Hello,&lt;/span&gt;
</span><span class="cx"> &lt;/div&gt;
</span><del>-&lt;pre id=&quot;console&quot;&gt;&lt;/pre&gt;
</del><span class="cx"> &lt;script&gt;
</span><span class="cx"> editingTest();
</span><span class="cx"> &lt;/script&gt;
</span><del>-
</del><ins>+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;/body&gt;
</span><span class="cx"> &lt;/html&gt;
</span></span></pre>
</div>
</div>

</body>
</html>