<!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>[163432] 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/163432">163432</a></dd>
<dt>Author</dt> <dd>g.czajkowski@samsung.com</dd>
<dt>Date</dt> <dd>2014-02-05 01:02:43 -0800 (Wed, 05 Feb 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Verify spellcheck attribute asynchronously
https://bugs.webkit.org/show_bug.cgi?id=128174

Reviewed by Sam Weinig.

Refactoring spelling tests that verify spellcheck attribute to use
asynchronous text checking.

* editing/spelling/spelling-attribute-at-child-expected.txt:
* editing/spelling/script-tests/spelling-attribute-at-child.js:
Do not use getElementById if more than one element has the same
id ('child'). Although we defined a bunch of elements with id
'child', however only first one was retrieved and tested.
Additionally, dump current markup so that user is able to see
which element is being tested.

* editing/spelling/spelling-attribute-change-expected.txt:
* editing/spelling/script-tests/spelling-attribute-change.js:

* editing/spelling/spellcheck-attribute-expected.txt:
* editing/spelling/spellcheck-attribute.html:
Dump markup to increase readability of test expectation.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestseditingspellingscripttestsspellingattributeatchildjs">trunk/LayoutTests/editing/spelling/script-tests/spelling-attribute-at-child.js</a></li>
<li><a href="#trunkLayoutTestseditingspellingscripttestsspellingattributechangejs">trunk/LayoutTests/editing/spelling/script-tests/spelling-attribute-change.js</a></li>
<li><a href="#trunkLayoutTestseditingspellingspellcheckattributeexpectedtxt">trunk/LayoutTests/editing/spelling/spellcheck-attribute-expected.txt</a></li>
<li><a href="#trunkLayoutTestseditingspellingspellcheckattributehtml">trunk/LayoutTests/editing/spelling/spellcheck-attribute.html</a></li>
<li><a href="#trunkLayoutTestseditingspellingspellingattributeatchildexpectedtxt">trunk/LayoutTests/editing/spelling/spelling-attribute-at-child-expected.txt</a></li>
<li><a href="#trunkLayoutTestseditingspellingspellingattributechangeexpectedtxt">trunk/LayoutTests/editing/spelling/spelling-attribute-change-expected.txt</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (163431 => 163432)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-02-05 07:11:57 UTC (rev 163431)
+++ trunk/LayoutTests/ChangeLog        2014-02-05 09:02:43 UTC (rev 163432)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+2014-02-05  Grzegorz Czajkowski  &lt;g.czajkowski@samsung.com&gt;
+
+        Verify spellcheck attribute asynchronously
+        https://bugs.webkit.org/show_bug.cgi?id=128174
+
+        Reviewed by Sam Weinig.
+
+        Refactoring spelling tests that verify spellcheck attribute to use
+        asynchronous text checking.
+
+        * editing/spelling/spelling-attribute-at-child-expected.txt:
+        * editing/spelling/script-tests/spelling-attribute-at-child.js:
+        Do not use getElementById if more than one element has the same
+        id ('child'). Although we defined a bunch of elements with id
+        'child', however only first one was retrieved and tested.
+        Additionally, dump current markup so that user is able to see
+        which element is being tested.
+
+        * editing/spelling/spelling-attribute-change-expected.txt:
+        * editing/spelling/script-tests/spelling-attribute-change.js:
+
+        * editing/spelling/spellcheck-attribute-expected.txt:
+        * editing/spelling/spellcheck-attribute.html:
+        Dump markup to increase readability of test expectation.
+
</ins><span class="cx"> 2014-02-04  Ryosuke Niwa  &lt;rniwa@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Undelete the &quot;build&quot; directories erroneously removed in r163427.
</span></span></pre></div>
<a id="trunkLayoutTestseditingspellingscripttestsspellingattributeatchildjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/editing/spelling/script-tests/spelling-attribute-at-child.js (163431 => 163432)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/spelling/script-tests/spelling-attribute-at-child.js        2014-02-05 07:11:57 UTC (rev 163431)
+++ trunk/LayoutTests/editing/spelling/script-tests/spelling-attribute-at-child.js        2014-02-05 09:02:43 UTC (rev 163432)
</span><span class="lines">@@ -1,29 +1,50 @@
</span><span class="cx"> description('Tests if the spellchecker behavior change after the spellcheck attribute changed by the script.');
</span><span class="cx"> 
</span><ins>+jsTestIsAsync = true;
+
+if (window.internals) {
+    internals.settings.setUnifiedTextCheckerEnabled(true);
+    internals.settings.setAsynchronousSpellCheckingEnabled(true);
+}
+
</ins><span class="cx"> var root = document.createElement(&quot;div&quot;);
</span><span class="cx"> document.body.appendChild(root);
</span><span class="cx"> 
</span><del>-function childHasSpellingMarker(markup)
</del><ins>+function verifyChildSpellingMarker(markup, expectation)
</ins><span class="cx"> {
</span><span class="cx">     root.innerHTML = markup;
</span><del>-    var text = document.getElementById(&quot;child&quot;).firstChild;
-    document.getSelection().setPosition(text, 1);
</del><ins>+    var childText = root.firstChild.childNodes[1].firstChild;
+    document.getSelection().setPosition(childText, 1);  // [^]
</ins><span class="cx">     document.execCommand(&quot;InsertText&quot;, false, 'z');
</span><span class="cx">     document.execCommand(&quot;InsertText&quot;, false, 'z');
</span><span class="cx">     document.execCommand(&quot;InsertText&quot;, false, ' ');
</span><del>-    var marked = internals.hasSpellingMarker(1, 2);
-    root.innerHTML = &quot;&quot;;
-    return marked;
</del><ins>+    debug(escapeHTML(root.innerHTML));
+    shouldBecomeEqual('internals.hasSpellingMarker(1, 2)', expectation ? &quot;true&quot; : &quot;false&quot;, function() {
+        root.innerHTML = &quot;&quot;;
+        debug(&quot;&quot;);
+        done();
+    });
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-shouldBeFalse(&quot;childHasSpellingMarker(\&quot;&lt;div contentEditable&gt;Foo &lt;span spellcheck='false' id='child'&gt;[]&lt;/span&gt; Baz&lt;/div&gt;\&quot;)&quot;);
-shouldBeTrue(&quot;childHasSpellingMarker(\&quot;&lt;div contentEditable&gt;Foo &lt;span id='child'&gt;[]&lt;/span&gt; Baz&lt;/div&gt;\&quot;)&quot;);
-shouldBeTrue(&quot;childHasSpellingMarker(\&quot;&lt;div contentEditable&gt;Foo &lt;span spellcheck='true' id='child'&gt;[]&lt;/span&gt; Baz&lt;/div&gt;\&quot;)&quot;);
-shouldBeFalse(&quot;childHasSpellingMarker(\&quot;&lt;div spellcheck='false' contentEditable&gt;Foo &lt;span spellcheck='false' id='child'&gt;[]&lt;/span&gt; Baz&lt;/div&gt;\&quot;)&quot;);
-shouldBeFalse(&quot;childHasSpellingMarker(\&quot;&lt;div spellcheck='false' contentEditable&gt;Foo &lt;span id='child'&gt;[]&lt;/span&gt; Baz&lt;/div&gt;\&quot;)&quot;);
-shouldBeTrue(&quot;childHasSpellingMarker(\&quot;&lt;div spellcheck='false' contentEditable&gt;Foo &lt;span spellcheck='true' id='child'&gt;[]&lt;/span&gt; Baz&lt;/div&gt;\&quot;)&quot;);
-shouldBeFalse(&quot;childHasSpellingMarker(\&quot;&lt;div spellcheck='true' contentEditable&gt;Foo &lt;span spellcheck='false' id='child'&gt;[]&lt;/span&gt; Baz&lt;/div&gt;\&quot;)&quot;);
-shouldBeTrue(&quot;childHasSpellingMarker(\&quot;&lt;div spellcheck='true' contentEditable&gt;Foo &lt;span id='child'&gt;[]&lt;/span&gt; Baz&lt;/div&gt;\&quot;)&quot;);
-shouldBeTrue(&quot;childHasSpellingMarker(\&quot;&lt;div spellcheck='true' contentEditable&gt;Foo &lt;span spellcheck='true' id='child'&gt;[]&lt;/span&gt; Baz&lt;/div&gt;\&quot;)&quot;);
</del><ins>+var tests = [ function() { verifyChildSpellingMarker(&quot;&lt;div contentEditable&gt;Foo &lt;span spellcheck='false' id='child'&gt;[]&lt;/span&gt; Baz&lt;/div&gt;&quot;, false); },
+              function() { verifyChildSpellingMarker(&quot;&lt;div contentEditable&gt;Foo &lt;span id='child'&gt;[]&lt;/span&gt; Baz&lt;/div&gt;&quot;, true); },
+              function() { verifyChildSpellingMarker(&quot;&lt;div contentEditable&gt;Foo &lt;span spellcheck='true' id='child'&gt;[]&lt;/span&gt; Baz&lt;/div&gt;&quot;, true); },
+              function() { verifyChildSpellingMarker(&quot;&lt;div spellcheck='false' contentEditable&gt;Foo &lt;span spellcheck='false' id='child'&gt;[]&lt;/span&gt; Baz&lt;/div&gt;&quot;, false); },
+              function() { verifyChildSpellingMarker(&quot;&lt;div spellcheck='false' contentEditable&gt;Foo &lt;span id='child'&gt;[]&lt;/span&gt; Baz&lt;/div&gt;&quot;, false); },
+              function() { verifyChildSpellingMarker(&quot;&lt;div spellcheck='false' contentEditable&gt;Foo &lt;span spellcheck='true' id='child'&gt;[]&lt;/span&gt; Baz&lt;/div&gt;&quot;, true); },
+              function() { verifyChildSpellingMarker(&quot;&lt;div spellcheck='true' contentEditable&gt;Foo &lt;span spellcheck='false' id='child'&gt;[]&lt;/span&gt; Baz&lt;/div&gt;&quot;, false); },
+              function() { verifyChildSpellingMarker(&quot;&lt;div spellcheck='true' contentEditable&gt;Foo &lt;span id='child'&gt;[]&lt;/span&gt; Baz&lt;/div&gt;&quot;, true); },
+              function() { verifyChildSpellingMarker(&quot;&lt;div spellcheck='true' contentEditable&gt;Foo &lt;span spellcheck='true' id='child'&gt;[]&lt;/span&gt; Baz&lt;/div&gt;&quot;, true); }
+];
</ins><span class="cx"> 
</span><ins>+function done()
+{
+    var next = tests.shift();
+    if (next)
+        return window.setTimeout(next, 0);
+
+    finishJSTest();
+}
+done();
+
</ins><span class="cx"> var successfullyParsed = true;
</span></span></pre></div>
<a id="trunkLayoutTestseditingspellingscripttestsspellingattributechangejs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/editing/spelling/script-tests/spelling-attribute-change.js (163431 => 163432)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/spelling/script-tests/spelling-attribute-change.js        2014-02-05 07:11:57 UTC (rev 163431)
+++ trunk/LayoutTests/editing/spelling/script-tests/spelling-attribute-change.js        2014-02-05 09:02:43 UTC (rev 163432)
</span><span class="lines">@@ -1,5 +1,12 @@
</span><span class="cx"> description('Tests if the spellchecker behavior change after the spellcheck attribute changed by the script.');
</span><span class="cx"> 
</span><ins>+jsTestIsAsync = true;
+
+if (window.internals) {
+    internals.settings.setUnifiedTextCheckerEnabled(true);
+    internals.settings.setAsynchronousSpellCheckingEnabled(true);
+}
+
</ins><span class="cx"> var parent = document.createElement(&quot;div&quot;);
</span><span class="cx"> document.body.appendChild(parent);
</span><span class="cx"> var sel = document.getSelection();
</span><span class="lines">@@ -22,7 +29,7 @@
</span><span class="cx"> 
</span><span class="cx">     window.target = target;
</span><span class="cx">     shouldBe(&quot;target.spellcheck&quot;, enabled ? &quot;true&quot; : &quot;false&quot;);
</span><del>-    shouldBe(&quot;internals.hasSpellingMarker(6, 2)&quot;, enabled ? &quot;true&quot; : &quot;false&quot;);
</del><ins>+    shouldBecomeEqual(&quot;internals.hasSpellingMarker(6, 2)&quot;, enabled ? &quot;true&quot; : &quot;false&quot;, done);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> function createElement(tagName, spellcheck)
</span><span class="lines">@@ -41,46 +48,41 @@
</span><span class="cx">     parent.appendChild(target);
</span><span class="cx"> 
</span><span class="cx">     testSpellCheckingEnabled(target, expectation);
</span><del>-    parent.innerHTML = &quot;&quot;;
</del><span class="cx"> }
</span><span class="cx"> 
</span><del>-// default -&gt; true
-testFor(&quot;SPAN&quot;, undefined, true);
-// default -&gt; false
-testFor(&quot;SPAN&quot;, undefined, false);
-// true -&gt; true
-testFor(&quot;SPAN&quot;, true, true);
-// true -&gt; false
-testFor(&quot;SPAN&quot;, true, false);
-// false -&gt; true
-testFor(&quot;SPAN&quot;, false, true);
-// false -&gt; false
-testFor(&quot;SPAN&quot;, false, false);
</del><ins>+var tests = [ function() { testFor(&quot;SPAN&quot;, undefined, true); }, // default -&gt; true
+              function() { testFor(&quot;SPAN&quot;, undefined, false); }, // default -&gt; false
+              function() { testFor(&quot;SPAN&quot;, true, true); }, // true -&gt; true
+              function() { testFor(&quot;SPAN&quot;, true, false); }, // true -&gt; false
+              function() { testFor(&quot;SPAN&quot;, false, true); }, // false -&gt; true
+              function() { testFor(&quot;SPAN&quot;, false, false); }, // false -&gt; false
</ins><span class="cx"> 
</span><del>-// default -&gt; true
-testFor(&quot;INPUT&quot;, undefined, true);
-// default -&gt; false
-testFor(&quot;INPUT&quot;, undefined, false);
-// true -&gt; true
-testFor(&quot;INPUT&quot;, true, true);
-// true -&gt; false
-testFor(&quot;INPUT&quot;, true, false);
-// false -&gt; true
-testFor(&quot;INPUT&quot;, false, true);
-// false -&gt; false
-testFor(&quot;INPUT&quot;, false, false);
</del><ins>+              function() { testFor(&quot;INPUT&quot;, undefined, true); }, // default -&gt; true
+              function() { testFor(&quot;INPUT&quot;, undefined, false); }, // default -&gt; false
+              function() { testFor(&quot;INPUT&quot;, true, true); }, // true -&gt; true
+              function() { testFor(&quot;INPUT&quot;, true, false); }, // true -&gt; false
+              function() { testFor(&quot;INPUT&quot;, false, true); }, // false -&gt; true
+              function() { testFor(&quot;INPUT&quot;, false, false); }, // false -&gt; false
</ins><span class="cx"> 
</span><del>-// default -&gt; true
-testFor(&quot;TEXTAREA&quot;, undefined, true);
-// default -&gt; false
-testFor(&quot;TEXTAREA&quot;, undefined, false);
-// true -&gt; true
-testFor(&quot;TEXTAREA&quot;, true, true);
-// true -&gt; false
-testFor(&quot;TEXTAREA&quot;, true, false);
-// false -&gt; true
-testFor(&quot;TEXTAREA&quot;, false, true);
-// false -&gt; false
-testFor(&quot;TEXTAREA&quot;, false, false);
</del><ins>+              function() { testFor(&quot;TEXTAREA&quot;, undefined, true); }, // default -&gt; true
+              function() { testFor(&quot;TEXTAREA&quot;, undefined, false); }, // default -&gt; false
+              function() { testFor(&quot;TEXTAREA&quot;, true, true); }, // true -&gt; true
+              function() { testFor(&quot;TEXTAREA&quot;, true, false); }, // true -&gt; false
+              function() { testFor(&quot;TEXTAREA&quot;, false, true); }, // false -&gt; true
+              function() { testFor(&quot;TEXTAREA&quot;, false, false); }, // false -&gt; false
+            ];
</ins><span class="cx"> 
</span><ins>+function done()
+{
+    if (window.internals) {
+        var next = tests.shift();
+        if (next)
+            return window.setTimeout(next, 0);
+
+        parent.innerHTML = &quot;&quot;;
+    }
+    finishJSTest();
+}
+done();
+
</ins><span class="cx"> var successfullyParsed = true;
</span></span></pre></div>
<a id="trunkLayoutTestseditingspellingspellcheckattributeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/editing/spelling/spellcheck-attribute-expected.txt (163431 => 163432)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/spelling/spellcheck-attribute-expected.txt        2014-02-05 07:11:57 UTC (rev 163431)
+++ trunk/LayoutTests/editing/spelling/spellcheck-attribute-expected.txt        2014-02-05 09:02:43 UTC (rev 163432)
</span><span class="lines">@@ -1,56 +1,60 @@
</span><del>-This tests if the &quot;spellcheck&quot; attribute is implemented as written in its specification. If this test succeeds, you can see forms filled with an invalid word 'zz '. Nevertheless, the 'zz ' is not marked as misspelled in all of them.
</del><ins>+This tests if the &quot;spellcheck&quot; attribute is implemented as written in its specification. If this test succeeds, you can see forms filled with an invalid word &quot;zz&quot;. Nevertheless, the &quot;zz&quot; is not marked as misspelled in all of them.
</ins><span class="cx"> 
</span><del>-id=test1_1 type=text spellcheck=true parent's spellcheck=true
-PASS internals.hasSpellingMarker(0, 2) is true
-id=test1_2 type=text spellcheck=true parent's spellcheck=true
-PASS internals.hasSpellingMarker(0, 2) is true
-id=test1_3 type=text spellcheck=false parent's spellcheck=true
-PASS internals.hasSpellingMarker(0, 2) is false
-id=test1_4 type=text spellcheck=true parent's spellcheck=true
-PASS internals.hasSpellingMarker(0, 2) is true
-id=test1_5 type=text spellcheck=true parent's spellcheck=true
-PASS internals.hasSpellingMarker(0, 2) is true
-id=test1_6 type=text spellcheck=true parent's spellcheck=true
-PASS internals.hasSpellingMarker(0, 2) is true
</del><ins>+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
</ins><span class="cx"> 
</span><del>-id=test2_1 type=text spellcheck=false parent's spellcheck=false
-PASS internals.hasSpellingMarker(0, 2) is false
-id=test2_2 type=text spellcheck=true parent's spellcheck=false
-PASS internals.hasSpellingMarker(0, 2) is true
-id=test2_3 type=text spellcheck=false parent's spellcheck=false
-PASS internals.hasSpellingMarker(0, 2) is false
-id=test2_4 type=text spellcheck=false parent's spellcheck=false
-PASS internals.hasSpellingMarker(0, 2) is false
-id=test2_5 type=text spellcheck=true parent's spellcheck=false
-PASS internals.hasSpellingMarker(0, 2) is true
-id=test2_6 type=text spellcheck=false parent's spellcheck=false
-PASS internals.hasSpellingMarker(0, 2) is false
</del><span class="cx"> 
</span><del>-id=test3_1 type=search spellcheck=true parent's spellcheck=true
-PASS internals.hasSpellingMarker(0, 2) is true
-id=test3_2 type=search spellcheck=true parent's spellcheck=true
-PASS internals.hasSpellingMarker(0, 2) is true
-id=test3_3 type=search spellcheck=false parent's spellcheck=true
-PASS internals.hasSpellingMarker(0, 2) is false
-id=test3_4 type=search spellcheck=true parent's spellcheck=true
-PASS internals.hasSpellingMarker(0, 2) is true
-id=test3_5 type=search spellcheck=true parent's spellcheck=true
-PASS internals.hasSpellingMarker(0, 2) is true
-id=test3_6 type=search spellcheck=true parent's spellcheck=true
-PASS internals.hasSpellingMarker(0, 2) is true
</del><ins>+&lt;DIV id=div1 spellcheck=true&gt;
+&lt;INPUT id=test1_1 type=text&gt;zz &lt;/INPUT&gt;
+PASS internals.hasSpellingMarker(0, 2) became true
+&lt;INPUT id=test1_2 type=text spellcheck=true&gt;zz &lt;/INPUT&gt;
+PASS internals.hasSpellingMarker(0, 2) became true
+&lt;INPUT id=test1_3 type=text spellcheck=false&gt;zz &lt;/INPUT&gt;
+PASS internals.hasSpellingMarker(0, 2) became false
+&lt;INPUT id=test1_4 type=text spellcheck=InvalidValue&gt;zz &lt;/INPUT&gt;
+PASS internals.hasSpellingMarker(0, 2) became true
+&lt;INPUT id=test1_5 type=text spellcheck&gt;zz &lt;/INPUT&gt;
+PASS internals.hasSpellingMarker(0, 2) became true
+&lt;/DIV&gt;
</ins><span class="cx"> 
</span><del>-id=test4_1 type=search spellcheck=false parent's spellcheck=false
-PASS internals.hasSpellingMarker(0, 2) is false
-id=test4_2 type=search spellcheck=true parent's spellcheck=false
-PASS internals.hasSpellingMarker(0, 2) is true
-id=test4_3 type=search spellcheck=false parent's spellcheck=false
-PASS internals.hasSpellingMarker(0, 2) is false
-id=test4_4 type=search spellcheck=false parent's spellcheck=false
-PASS internals.hasSpellingMarker(0, 2) is false
-id=test4_5 type=search spellcheck=true parent's spellcheck=false
-PASS internals.hasSpellingMarker(0, 2) is true
-id=test4_6 type=search spellcheck=false parent's spellcheck=false
-PASS internals.hasSpellingMarker(0, 2) is false
</del><ins>+&lt;DIV id=div2 spellcheck=false&gt;
+&lt;INPUT id=test2_1 type=text&gt;zz &lt;/INPUT&gt;
+PASS internals.hasSpellingMarker(0, 2) became false
+&lt;INPUT id=test2_2 type=text spellcheck=true&gt;zz &lt;/INPUT&gt;
+PASS internals.hasSpellingMarker(0, 2) became true
+&lt;INPUT id=test2_3 type=text spellcheck=false&gt;zz &lt;/INPUT&gt;
+PASS internals.hasSpellingMarker(0, 2) became false
+&lt;INPUT id=test2_4 type=text spellcheck=InvalidValue&gt;zz &lt;/INPUT&gt;
+PASS internals.hasSpellingMarker(0, 2) became false
+&lt;INPUT id=test2_5 type=text spellcheck&gt;zz &lt;/INPUT&gt;
+PASS internals.hasSpellingMarker(0, 2) became true
+&lt;/DIV&gt;
+
+&lt;DIV id=div3 spellcheck=true&gt;
+&lt;INPUT id=test3_1 type=search&gt;zz &lt;/INPUT&gt;
+PASS internals.hasSpellingMarker(0, 2) became true
+&lt;INPUT id=test3_2 type=search spellcheck=true&gt;zz &lt;/INPUT&gt;
+PASS internals.hasSpellingMarker(0, 2) became true
+&lt;INPUT id=test3_3 type=search spellcheck=false&gt;zz &lt;/INPUT&gt;
+PASS internals.hasSpellingMarker(0, 2) became false
+&lt;INPUT id=test3_4 type=search spellcheck=InvalidValue&gt;zz &lt;/INPUT&gt;
+PASS internals.hasSpellingMarker(0, 2) became true
+&lt;INPUT id=test3_5 type=search spellcheck&gt;zz &lt;/INPUT&gt;
+PASS internals.hasSpellingMarker(0, 2) became true
+&lt;/DIV&gt;
+
+&lt;DIV id=div4 spellcheck=false&gt;
+&lt;INPUT id=test4_1 type=search&gt;zz &lt;/INPUT&gt;
+PASS internals.hasSpellingMarker(0, 2) became false
+&lt;INPUT id=test4_2 type=search spellcheck=true&gt;zz &lt;/INPUT&gt;
+PASS internals.hasSpellingMarker(0, 2) became true
+&lt;INPUT id=test4_3 type=search spellcheck=false&gt;zz &lt;/INPUT&gt;
+PASS internals.hasSpellingMarker(0, 2) became false
+&lt;INPUT id=test4_4 type=search spellcheck=InvalidValue&gt;zz &lt;/INPUT&gt;
+PASS internals.hasSpellingMarker(0, 2) became false
+&lt;INPUT id=test4_5 type=search spellcheck&gt;zz &lt;/INPUT&gt;
+PASS internals.hasSpellingMarker(0, 2) became true
+&lt;/DIV&gt;
+
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestseditingspellingspellcheckattributehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/editing/spelling/spellcheck-attribute.html (163431 => 163432)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/spelling/spellcheck-attribute.html        2014-02-05 07:11:57 UTC (rev 163431)
+++ trunk/LayoutTests/editing/spelling/spellcheck-attribute.html        2014-02-05 09:02:43 UTC (rev 163432)
</span><span class="lines">@@ -2,101 +2,151 @@
</span><span class="cx"> &lt;head&gt;
</span><span class="cx"> &lt;title&gt;Spellcheck Attribute Test&lt;/title&gt;
</span><span class="cx"> &lt;link rel=&quot;help&quot; href=&quot;http://damowmow.com/playground/spellcheck.txt&quot;&gt;
</span><ins>+&lt;script src=&quot;../editing.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;resources/util.js&quot;&gt;&lt;/script&gt;
</ins><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;/head&gt;
</span><span class="cx"> &lt;body&gt;
</span><del>-&lt;p&gt;This tests if the &quot;spellcheck&quot; attribute is implemented as written in its specification. If this test succeeds, you can see forms filled with an invalid word 'zz '. Nevertheless, the 'zz ' is not marked as misspelled in all of them.
</del><span class="cx"> &lt;div id=&quot;testRoot&quot;&gt;
</span><del>-
-&lt;div spellcheck=&quot;true&quot;&gt;
-&lt;label&gt;1.1.&lt;/label&gt;&lt;input id=&quot;test1_1&quot; type=&quot;text&quot;&gt;&lt;/input&gt;&lt;br/&gt;
-&lt;label&gt;1.2.&lt;/label&gt;&lt;input id=&quot;test1_2&quot; type=&quot;text&quot; spellcheck=&quot;true&quot;&gt;&lt;/input&gt;&lt;br/&gt;
-&lt;label&gt;1.3.&lt;/label&gt;&lt;input id=&quot;test1_3&quot; type=&quot;text&quot; spellcheck=&quot;false&quot;&gt;&lt;/input&gt;&lt;br/&gt;
-&lt;label&gt;1.4.&lt;/label&gt;&lt;input id=&quot;test1_4&quot; type=&quot;text&quot; spellcheck=&quot;InvalidValue&quot;&gt;&lt;/input&gt;&lt;br/&gt;
-&lt;label&gt;1.5.&lt;/label&gt;&lt;input id=&quot;test1_5&quot; type=&quot;text&quot; spellcheck&gt;&lt;/input&gt;&lt;br/&gt;
-&lt;label&gt;1.6.&lt;/label&gt;&lt;input id=&quot;test1_6&quot; type=&quot;text&quot;&gt;&lt;/input&gt;&lt;br/&gt;
</del><ins>+&lt;div id=&quot;div1&quot; spellcheck=&quot;true&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;div2&quot; spellcheck=&quot;false&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;div3&quot; spellcheck=&quot;true&quot;&gt;&lt;/div&gt;
+&lt;div id=&quot;div4&quot; spellcheck=&quot;false&quot;&gt;&lt;/div&gt;
</ins><span class="cx"> &lt;/div&gt;
</span><del>-&lt;div spellcheck=&quot;false&quot;&gt;
-&lt;label&gt;2.1.&lt;/label&gt;&lt;input id=&quot;test2_1&quot; type=&quot;text&quot;&gt;&lt;/input&gt;&lt;br/&gt;
-&lt;label&gt;2.2.&lt;/label&gt;&lt;input id=&quot;test2_2&quot; type=&quot;text&quot; spellcheck=&quot;true&quot;&gt;&lt;/input&gt;&lt;br/&gt;
-&lt;label&gt;2.3.&lt;/label&gt;&lt;input id=&quot;test2_3&quot; type=&quot;text&quot; spellcheck=&quot;false&quot;&gt;&lt;/input&gt;&lt;br/&gt;
-&lt;label&gt;2.4.&lt;/label&gt;&lt;input id=&quot;test2_4&quot; type=&quot;text&quot; spellcheck=&quot;InvalidValue&quot;&gt;&lt;/input&gt;&lt;br/&gt;
-&lt;label&gt;2.5.&lt;/label&gt;&lt;input id=&quot;test2_5&quot; type=&quot;text&quot; spellcheck&gt;&lt;/input&gt;&lt;br/&gt;
-&lt;label&gt;2.6.&lt;/label&gt;&lt;input id=&quot;test2_6&quot; type=&quot;text&quot;&gt;&lt;/input&gt;&lt;br/&gt;
-&lt;/div&gt;
</del><ins>+&lt;script&gt;
+description('This tests if the &quot;spellcheck&quot; attribute is implemented '
+    + 'as written in its specification. If this test succeeds, you can see '
+    + 'forms filled with an invalid word &quot;zz&quot;. Nevertheless, the &quot;zz&quot; is not '
+    + 'marked as misspelled in all of them.');
</ins><span class="cx"> 
</span><del>-&lt;div spellcheck=&quot;true&quot;&gt;
-&lt;label&gt;3.1.&lt;/label&gt;&lt;input id=&quot;test3_1&quot; type=&quot;search&quot;&gt;&lt;/input&gt;&lt;br/&gt;
-&lt;label&gt;3.2.&lt;/label&gt;&lt;input id=&quot;test3_2&quot; type=&quot;search&quot; spellcheck=&quot;true&quot;&gt;&lt;/input&gt;&lt;br/&gt;
-&lt;label&gt;3.3.&lt;/label&gt;&lt;input id=&quot;test3_3&quot; type=&quot;search&quot; spellcheck=&quot;false&quot;&gt;&lt;/input&gt;&lt;br/&gt;
-&lt;label&gt;3.4.&lt;/label&gt;&lt;input id=&quot;test3_4&quot; type=&quot;search&quot; spellcheck=&quot;InvalidValue&quot;&gt;&lt;/input&gt;&lt;br/&gt;
-&lt;label&gt;3.5.&lt;/label&gt;&lt;input id=&quot;test3_5&quot; type=&quot;search&quot; spellcheck&gt;&lt;/input&gt;&lt;br/&gt;
-&lt;label&gt;3.6.&lt;/label&gt;&lt;input id=&quot;test3_6&quot; type=&quot;search&quot;&gt;&lt;/input&gt;&lt;br/&gt;
-&lt;/div&gt;
-&lt;div spellcheck=&quot;false&quot;&gt;
-&lt;label&gt;4.1.&lt;/label&gt;&lt;input id=&quot;test4_1&quot; type=&quot;search&quot;&gt;&lt;/input&gt;&lt;br/&gt;
-&lt;label&gt;4.2.&lt;/label&gt;&lt;input id=&quot;test4_2&quot; type=&quot;search&quot; spellcheck=&quot;true&quot;&gt;&lt;/input&gt;&lt;br/&gt;
-&lt;label&gt;4.3.&lt;/label&gt;&lt;input id=&quot;test4_3&quot; type=&quot;search&quot; spellcheck=&quot;false&quot;&gt;&lt;/input&gt;&lt;br/&gt;
-&lt;label&gt;4.4.&lt;/label&gt;&lt;input id=&quot;test4_4&quot; type=&quot;search&quot; spellcheck=&quot;InvalidValue&quot;&gt;&lt;/input&gt;&lt;br/&gt;
-&lt;label&gt;4.5.&lt;/label&gt;&lt;input id=&quot;test4_5&quot; type=&quot;search&quot; spellcheck&gt;&lt;/input&gt;&lt;br/&gt;
-&lt;label&gt;4.6.&lt;/label&gt;&lt;input id=&quot;test4_6&quot; type=&quot;search&quot;&gt;&lt;/input&gt;&lt;br/&gt;
-&lt;/div&gt;
</del><ins>+jsTestIsAsync = true;
</ins><span class="cx"> 
</span><del>-&lt;/div&gt;
-&lt;pre id=&quot;console&quot;&gt;&lt;/pre&gt;
-&lt;script&gt;
-function log(msg) {
-    document.getElementById(&quot;console&quot;).innerHTML += (msg + &quot;\n&quot;);
</del><ins>+if (window.internals) {
+    internals.settings.setUnifiedTextCheckerEnabled(true);
+    internals.settings.setAsynchronousSpellCheckingEnabled(true);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-function testMarkerForMisspelledWord(id, shouldBeMarked) {
-    var inputElement = document.getElementById(id);
-    inputElement.focus();
-    document.execCommand(&quot;InsertText&quot;, false, 'z');
-    document.execCommand(&quot;InsertText&quot;, false, 'z');
-    document.execCommand(&quot;InsertText&quot;, false, ' ');
</del><ins>+function addInputElement(parentId, id, type, spellcheck)
+{
+    var input = document.createElement('input');
+    input.setAttribute('type', type);
+    input.setAttribute('id', id);
+    input.setAttribute('value', 'zz ');
+    if (spellcheck !== undefined)
+        input.setAttribute('spellcheck', spellcheck);
</ins><span class="cx"> 
</span><del>-    log(&quot;id=&quot; + id + &quot; type=&quot; + inputElement.type + &quot; spellcheck=&quot; + inputElement.spellcheck
-        + &quot; parent's spellcheck=&quot; + inputElement.parentNode.spellcheck);
</del><ins>+    var div = document.getElementById(parentId);
+    div.appendChild(document.createTextNode(id));
+    div.appendChild(input);
+    div.appendChild(document.createElement('br'));
</ins><span class="cx"> 
</span><del>-    shouldBe(&quot;internals.hasSpellingMarker(0, 2)&quot;, shouldBeMarked ? &quot;true&quot; : &quot;false&quot;)
</del><ins>+    return input;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-// For type=&quot;text&quot;.
-testMarkerForMisspelledWord('test1_1', true);
-testMarkerForMisspelledWord('test1_2', true);
-testMarkerForMisspelledWord('test1_3', false);
-testMarkerForMisspelledWord('test1_4', true);
-testMarkerForMisspelledWord('test1_5', true);
-testMarkerForMisspelledWord('test1_6', true);
-log(&quot;&quot;);
-testMarkerForMisspelledWord('test2_1', false);
-testMarkerForMisspelledWord('test2_2', true);
-testMarkerForMisspelledWord('test2_3', false);
-testMarkerForMisspelledWord('test2_4', false);
-testMarkerForMisspelledWord('test2_5', true);
-testMarkerForMisspelledWord('test2_6', false);
-log(&quot;&quot;);
</del><ins>+function testMarkerForMisspelledWord(parentId, shouldBeMisspelled, id, type, spellcheck)
+{
+    var input = addInputElement(parentId, id, type, spellcheck);
+    input.focus();
+    // Activate spellchecking.
+    moveSelectionForwardByWordCommand();
</ins><span class="cx"> 
</span><del>-// For type=&quot;search&quot;.
-testMarkerForMisspelledWord('test3_1', true);
-testMarkerForMisspelledWord('test3_2', true);
-testMarkerForMisspelledWord('test3_3', false);
-testMarkerForMisspelledWord('test3_4', true);
-testMarkerForMisspelledWord('test3_5', true);
-testMarkerForMisspelledWord('test3_6', true);
-log(&quot;&quot;);
-testMarkerForMisspelledWord('test4_1', false);
-testMarkerForMisspelledWord('test4_2', true);
-testMarkerForMisspelledWord('test4_3', false);
-testMarkerForMisspelledWord('test4_4', false);
-testMarkerForMisspelledWord('test4_5', true);
-testMarkerForMisspelledWord('test4_6', false);
</del><ins>+    logMarkup(id, spellcheck, true);
</ins><span class="cx"> 
</span><del>-if (window.testRunner) {
-    // Cleaning up for expeation text if running on DRT.
-    document.getElementById(&quot;testRoot&quot;).style.display = &quot;none&quot;;
</del><ins>+    if (window.internals)
+        shouldBecomeEqual('internals.hasSpellingMarker(0, 2)', shouldBeMisspelled ? 'true' : 'false', done);
+    else
+        done();
</ins><span class="cx"> }
</span><ins>+
+function logMarkup(id, spellcheckValue, shouldCloseTag)
+{
+    var element = document.getElementById(id);
+    var elementMarkup =  '&amp;lt;' + element.tagName;
+    elementMarkup += ' id=' + element.id;
+
+    if (element.type)
+        elementMarkup += ' type=' + element.type;
+
+    var spellcheckAttrString = '';
+    if (spellcheckValue !== undefined) {
+        if (spellcheckValue != '')
+            spellcheckAttrString = ' spellcheck=' + spellcheckValue;
+        else
+            spellcheckAttrString = ' spellcheck';
+    }
+    elementMarkup += spellcheckAttrString;
+    elementMarkup += '&gt;';
+
+    if (element.value)
+        elementMarkup += element.value;
+
+    if (shouldCloseTag)
+        elementMarkup += '&amp;lt;/' + element.tagName + '&gt;';
+
+    debug(elementMarkup);
+}
+
+function encloseTag(id)
+{
+    var element = document.getElementById(id);
+    logMarkup(id, element.spellcheck ? &quot;true&quot; : &quot;false&quot;, false);
+    done();
+}
+
+function closeTag(id)
+{
+    var element = document.getElementById(id);
+    debug('&amp;lt;/' + element.tagName + '&gt;' + '\n');
+    done();
+}
+
+var tests = [
+    function() { encloseTag('div1'); },
+    function() { testMarkerForMisspelledWord('div1', true, 'test1_1', 'text' /*, undefined */); },
+    function() { testMarkerForMisspelledWord('div1', true, 'test1_2', 'text', 'true'); },
+    function() { testMarkerForMisspelledWord('div1', false, 'test1_3', 'text', 'false'); },
+    function() { testMarkerForMisspelledWord('div1', true, 'test1_4', 'text', 'InvalidValue'); },
+    function() { testMarkerForMisspelledWord('div1', true, 'test1_5', 'text', ''); },
+    function() { closeTag('div1'); },
+
+    function() { encloseTag('div2'); },
+    function() { testMarkerForMisspelledWord('div2', false, 'test2_1', 'text' /*, undefined */); },
+    function() { testMarkerForMisspelledWord('div2', true, 'test2_2', 'text', 'true'); },
+    function() { testMarkerForMisspelledWord('div2', false, 'test2_3', 'text', 'false'); },
+    function() { testMarkerForMisspelledWord('div2', false, 'test2_4', 'text', 'InvalidValue'); },
+    function() { testMarkerForMisspelledWord('div2', true, 'test2_5', 'text', ''); },
+    function() { closeTag('div2'); },
+
+    function() { encloseTag('div3'); },
+    function() { testMarkerForMisspelledWord('div3', true, 'test3_1', 'search' /*, undefined */); },
+    function() { testMarkerForMisspelledWord('div3', true, 'test3_2', 'search', 'true'); },
+    function() { testMarkerForMisspelledWord('div3', false, 'test3_3', 'search', 'false'); },
+    function() { testMarkerForMisspelledWord('div3', true, 'test3_4', 'search', 'InvalidValue'); },
+    function() { testMarkerForMisspelledWord('div3', true, 'test3_5', 'search', ''); },
+    function() { closeTag('div3'); },
+
+    function() { encloseTag('div4'); },
+    function() { testMarkerForMisspelledWord('div4', false, 'test4_1', 'search' /*, undefined */); },
+    function() { testMarkerForMisspelledWord('div4', true, 'test4_2', 'search', 'true'); },
+    function() { testMarkerForMisspelledWord('div4', false, 'test4_3', 'search', 'false'); },
+    function() { testMarkerForMisspelledWord('div4', false, 'test4_4', 'search', 'InvalidValue'); },
+    function() { testMarkerForMisspelledWord('div4', true, 'test4_5', 'search', ''); },
+    function() { closeTag('div4'); }
+];
+
+function done()
+{
+    var next = tests.shift();
+    if (next)
+        return window.setTimeout(next, 0);
+
+    if (window.testRunner) {
+        // Cleaning up for expectation text if running on DRT.
+        document.getElementById(&quot;testRoot&quot;).style.display = &quot;none&quot;;
+    }
+    finishJSTest();
+}
+done();
</ins><span class="cx"> &lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;/body&gt;
</span></span></pre></div>
<a id="trunkLayoutTestseditingspellingspellingattributeatchildexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/editing/spelling/spelling-attribute-at-child-expected.txt (163431 => 163432)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/spelling/spelling-attribute-at-child-expected.txt        2014-02-05 07:11:57 UTC (rev 163431)
+++ trunk/LayoutTests/editing/spelling/spelling-attribute-at-child-expected.txt        2014-02-05 09:02:43 UTC (rev 163432)
</span><span class="lines">@@ -3,15 +3,33 @@
</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 childHasSpellingMarker(&quot;&lt;div contentEditable&gt;Foo &lt;span spellcheck='false' id='child'&gt;[]&lt;/span&gt; Baz&lt;/div&gt;&quot;) is false
-PASS childHasSpellingMarker(&quot;&lt;div contentEditable&gt;Foo &lt;span id='child'&gt;[]&lt;/span&gt; Baz&lt;/div&gt;&quot;) is true
-PASS childHasSpellingMarker(&quot;&lt;div contentEditable&gt;Foo &lt;span spellcheck='true' id='child'&gt;[]&lt;/span&gt; Baz&lt;/div&gt;&quot;) is true
-PASS childHasSpellingMarker(&quot;&lt;div spellcheck='false' contentEditable&gt;Foo &lt;span spellcheck='false' id='child'&gt;[]&lt;/span&gt; Baz&lt;/div&gt;&quot;) is false
-PASS childHasSpellingMarker(&quot;&lt;div spellcheck='false' contentEditable&gt;Foo &lt;span id='child'&gt;[]&lt;/span&gt; Baz&lt;/div&gt;&quot;) is false
-PASS childHasSpellingMarker(&quot;&lt;div spellcheck='false' contentEditable&gt;Foo &lt;span spellcheck='true' id='child'&gt;[]&lt;/span&gt; Baz&lt;/div&gt;&quot;) is true
-PASS childHasSpellingMarker(&quot;&lt;div spellcheck='true' contentEditable&gt;Foo &lt;span spellcheck='false' id='child'&gt;[]&lt;/span&gt; Baz&lt;/div&gt;&quot;) is false
-PASS childHasSpellingMarker(&quot;&lt;div spellcheck='true' contentEditable&gt;Foo &lt;span id='child'&gt;[]&lt;/span&gt; Baz&lt;/div&gt;&quot;) is true
-PASS childHasSpellingMarker(&quot;&lt;div spellcheck='true' contentEditable&gt;Foo &lt;span spellcheck='true' id='child'&gt;[]&lt;/span&gt; Baz&lt;/div&gt;&quot;) is true
</del><ins>+&lt;div contenteditable=&quot;&quot;&gt;Foo &lt;span spellcheck=&quot;false&quot; id=&quot;child&quot;&gt;[zz ]&lt;/span&gt; Baz&lt;/div&gt;
+PASS internals.hasSpellingMarker(1, 2) became false
+
+&lt;div contenteditable=&quot;&quot;&gt;Foo &lt;span id=&quot;child&quot;&gt;[zz ]&lt;/span&gt; Baz&lt;/div&gt;
+PASS internals.hasSpellingMarker(1, 2) became true
+
+&lt;div contenteditable=&quot;&quot;&gt;Foo &lt;span spellcheck=&quot;true&quot; id=&quot;child&quot;&gt;[zz ]&lt;/span&gt; Baz&lt;/div&gt;
+PASS internals.hasSpellingMarker(1, 2) became true
+
+&lt;div spellcheck=&quot;false&quot; contenteditable=&quot;&quot;&gt;Foo &lt;span spellcheck=&quot;false&quot; id=&quot;child&quot;&gt;[zz ]&lt;/span&gt; Baz&lt;/div&gt;
+PASS internals.hasSpellingMarker(1, 2) became false
+
+&lt;div spellcheck=&quot;false&quot; contenteditable=&quot;&quot;&gt;Foo &lt;span id=&quot;child&quot;&gt;[zz ]&lt;/span&gt; Baz&lt;/div&gt;
+PASS internals.hasSpellingMarker(1, 2) became false
+
+&lt;div spellcheck=&quot;false&quot; contenteditable=&quot;&quot;&gt;Foo &lt;span spellcheck=&quot;true&quot; id=&quot;child&quot;&gt;[zz ]&lt;/span&gt; Baz&lt;/div&gt;
+PASS internals.hasSpellingMarker(1, 2) became true
+
+&lt;div spellcheck=&quot;true&quot; contenteditable=&quot;&quot;&gt;Foo &lt;span spellcheck=&quot;false&quot; id=&quot;child&quot;&gt;[zz ]&lt;/span&gt; Baz&lt;/div&gt;
+PASS internals.hasSpellingMarker(1, 2) became false
+
+&lt;div spellcheck=&quot;true&quot; contenteditable=&quot;&quot;&gt;Foo &lt;span id=&quot;child&quot;&gt;[zz ]&lt;/span&gt; Baz&lt;/div&gt;
+PASS internals.hasSpellingMarker(1, 2) became true
+
+&lt;div spellcheck=&quot;true&quot; contenteditable=&quot;&quot;&gt;Foo &lt;span spellcheck=&quot;true&quot; id=&quot;child&quot;&gt;[zz ]&lt;/span&gt; Baz&lt;/div&gt;
+PASS internals.hasSpellingMarker(1, 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="trunkLayoutTestseditingspellingspellingattributechangeexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/editing/spelling/spelling-attribute-change-expected.txt (163431 => 163432)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/spelling/spelling-attribute-change-expected.txt        2014-02-05 07:11:57 UTC (rev 163431)
+++ trunk/LayoutTests/editing/spelling/spelling-attribute-change-expected.txt        2014-02-05 09:02:43 UTC (rev 163432)
</span><span class="lines">@@ -4,41 +4,41 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> PASS target.spellcheck is true
</span><del>-PASS internals.hasSpellingMarker(6, 2) is true
</del><ins>+PASS internals.hasSpellingMarker(6, 2) became true
</ins><span class="cx"> PASS target.spellcheck is false
</span><del>-PASS internals.hasSpellingMarker(6, 2) is false
</del><ins>+PASS internals.hasSpellingMarker(6, 2) became false
</ins><span class="cx"> PASS target.spellcheck is true
</span><del>-PASS internals.hasSpellingMarker(6, 2) is true
</del><ins>+PASS internals.hasSpellingMarker(6, 2) became true
</ins><span class="cx"> PASS target.spellcheck is false
</span><del>-PASS internals.hasSpellingMarker(6, 2) is false
</del><ins>+PASS internals.hasSpellingMarker(6, 2) became false
</ins><span class="cx"> PASS target.spellcheck is true
</span><del>-PASS internals.hasSpellingMarker(6, 2) is true
</del><ins>+PASS internals.hasSpellingMarker(6, 2) became true
</ins><span class="cx"> PASS target.spellcheck is false
</span><del>-PASS internals.hasSpellingMarker(6, 2) is false
</del><ins>+PASS internals.hasSpellingMarker(6, 2) became false
</ins><span class="cx"> PASS target.spellcheck is true
</span><del>-PASS internals.hasSpellingMarker(6, 2) is true
</del><ins>+PASS internals.hasSpellingMarker(6, 2) became true
</ins><span class="cx"> PASS target.spellcheck is false
</span><del>-PASS internals.hasSpellingMarker(6, 2) is false
</del><ins>+PASS internals.hasSpellingMarker(6, 2) became false
</ins><span class="cx"> PASS target.spellcheck is true
</span><del>-PASS internals.hasSpellingMarker(6, 2) is true
</del><ins>+PASS internals.hasSpellingMarker(6, 2) became true
</ins><span class="cx"> PASS target.spellcheck is false
</span><del>-PASS internals.hasSpellingMarker(6, 2) is false
</del><ins>+PASS internals.hasSpellingMarker(6, 2) became false
</ins><span class="cx"> PASS target.spellcheck is true
</span><del>-PASS internals.hasSpellingMarker(6, 2) is true
</del><ins>+PASS internals.hasSpellingMarker(6, 2) became true
</ins><span class="cx"> PASS target.spellcheck is false
</span><del>-PASS internals.hasSpellingMarker(6, 2) is false
</del><ins>+PASS internals.hasSpellingMarker(6, 2) became false
</ins><span class="cx"> PASS target.spellcheck is true
</span><del>-PASS internals.hasSpellingMarker(6, 2) is true
</del><ins>+PASS internals.hasSpellingMarker(6, 2) became true
</ins><span class="cx"> PASS target.spellcheck is false
</span><del>-PASS internals.hasSpellingMarker(6, 2) is false
</del><ins>+PASS internals.hasSpellingMarker(6, 2) became false
</ins><span class="cx"> PASS target.spellcheck is true
</span><del>-PASS internals.hasSpellingMarker(6, 2) is true
</del><ins>+PASS internals.hasSpellingMarker(6, 2) became true
</ins><span class="cx"> PASS target.spellcheck is false
</span><del>-PASS internals.hasSpellingMarker(6, 2) is false
</del><ins>+PASS internals.hasSpellingMarker(6, 2) became false
</ins><span class="cx"> PASS target.spellcheck is true
</span><del>-PASS internals.hasSpellingMarker(6, 2) is true
</del><ins>+PASS internals.hasSpellingMarker(6, 2) became true
</ins><span class="cx"> PASS target.spellcheck is false
</span><del>-PASS internals.hasSpellingMarker(6, 2) is false
</del><ins>+PASS internals.hasSpellingMarker(6, 2) became false
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre>
</div>
</div>

</body>
</html>