Modified: trunk/LayoutTests/editing/spelling/spellcheck-attribute-expected.txt (153931 => 153932)
--- trunk/LayoutTests/editing/spelling/spellcheck-attribute-expected.txt 2013-08-12 07:12:32 UTC (rev 153931)
+++ trunk/LayoutTests/editing/spelling/spellcheck-attribute-expected.txt 2013-08-12 07:57:15 UTC (rev 153932)
@@ -1,27 +1,54 @@
-This tests if the "spellcheck" attribute is implemented as written in its specification. If this test succeeds, you can see six forms filled with an invalid word 'zz '. Nevertheless, the 'zz ' only in the line 1.1, 1.2, and 2.2 are marked as misspelled.
+This tests if the "spellcheck" 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.
-PASS:test1_1
-PASS:test1_2
-PASS:test1_3
-PASS:test1_4
-PASS:test1_5
-PASS:test1_6
-PASS:test2_1
-PASS:test2_2
-PASS:test2_3
-PASS:test2_4
-PASS:test2_5
-PASS:test2_6
-PASS:test3_1
-PASS:test3_2
-PASS:test3_3
-PASS:test3_4
-PASS:test3_5
-PASS:test3_6
-PASS:test4_1
-PASS:test4_2
-PASS:test4_3
-PASS:test4_4
-PASS:test4_5
-PASS:test4_6
+id=test1_1 type=text spellcheck=true parent's spellcheck=true
+PASS internals.hasSpellingMarker(document, 0, 2) is true
+id=test1_2 type=text spellcheck=true parent's spellcheck=true
+PASS internals.hasSpellingMarker(document, 0, 2) is true
+id=test1_3 type=text spellcheck=false parent's spellcheck=true
+PASS internals.hasSpellingMarker(document, 0, 2) is false
+id=test1_4 type=text spellcheck=true parent's spellcheck=true
+PASS internals.hasSpellingMarker(document, 0, 2) is true
+id=test1_5 type=text spellcheck=true parent's spellcheck=true
+PASS internals.hasSpellingMarker(document, 0, 2) is true
+id=test1_6 type=text spellcheck=true parent's spellcheck=true
+PASS internals.hasSpellingMarker(document, 0, 2) is true
+id=test2_1 type=text spellcheck=false parent's spellcheck=false
+PASS internals.hasSpellingMarker(document, 0, 2) is false
+id=test2_2 type=text spellcheck=true parent's spellcheck=false
+PASS internals.hasSpellingMarker(document, 0, 2) is true
+id=test2_3 type=text spellcheck=false parent's spellcheck=false
+PASS internals.hasSpellingMarker(document, 0, 2) is false
+id=test2_4 type=text spellcheck=false parent's spellcheck=false
+PASS internals.hasSpellingMarker(document, 0, 2) is false
+id=test2_5 type=text spellcheck=true parent's spellcheck=false
+PASS internals.hasSpellingMarker(document, 0, 2) is true
+id=test2_6 type=text spellcheck=false parent's spellcheck=false
+PASS internals.hasSpellingMarker(document, 0, 2) is false
+
+id=test3_1 type=search spellcheck=true parent's spellcheck=true
+PASS internals.hasSpellingMarker(document, 0, 2) is true
+id=test3_2 type=search spellcheck=true parent's spellcheck=true
+PASS internals.hasSpellingMarker(document, 0, 2) is true
+id=test3_3 type=search spellcheck=false parent's spellcheck=true
+PASS internals.hasSpellingMarker(document, 0, 2) is false
+id=test3_4 type=search spellcheck=true parent's spellcheck=true
+PASS internals.hasSpellingMarker(document, 0, 2) is true
+id=test3_5 type=search spellcheck=true parent's spellcheck=true
+PASS internals.hasSpellingMarker(document, 0, 2) is true
+id=test3_6 type=search spellcheck=true parent's spellcheck=true
+PASS internals.hasSpellingMarker(document, 0, 2) is true
+
+id=test4_1 type=search spellcheck=false parent's spellcheck=false
+PASS internals.hasSpellingMarker(document, 0, 2) is false
+id=test4_2 type=search spellcheck=true parent's spellcheck=false
+PASS internals.hasSpellingMarker(document, 0, 2) is true
+id=test4_3 type=search spellcheck=false parent's spellcheck=false
+PASS internals.hasSpellingMarker(document, 0, 2) is false
+id=test4_4 type=search spellcheck=false parent's spellcheck=false
+PASS internals.hasSpellingMarker(document, 0, 2) is false
+id=test4_5 type=search spellcheck=true parent's spellcheck=false
+PASS internals.hasSpellingMarker(document, 0, 2) is true
+id=test4_6 type=search spellcheck=false parent's spellcheck=false
+PASS internals.hasSpellingMarker(document, 0, 2) is false
+
Modified: trunk/LayoutTests/editing/spelling/spellcheck-attribute.html (153931 => 153932)
--- trunk/LayoutTests/editing/spelling/spellcheck-attribute.html 2013-08-12 07:12:32 UTC (rev 153931)
+++ trunk/LayoutTests/editing/spelling/spellcheck-attribute.html 2013-08-12 07:57:15 UTC (rev 153932)
@@ -2,9 +2,10 @@
<head>
<title>Spellcheck Attribute Test</title>
<link rel="help" href=""
+<script src=""
</head>
<body>
-<p>This tests if the "spellcheck" attribute is implemented as written in its specification. If this test succeeds, you can see six forms filled with an invalid word 'zz '. Nevertheless, the 'zz ' only in the line 1.1, 1.2, and 2.2 are marked as misspelled.</p>
+<p>This tests if the "spellcheck" 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.
<div id="testRoot">
<div spellcheck="true">
@@ -48,44 +49,49 @@
document.getElementById("console").innerHTML += (msg + "\n");
}
-function testTypingInvalidWord(id, shouldBeMarked) {
- document.getElementById(id).focus();
+function testMarkerForMisspelledWord(id, shouldBeMarked) {
+ var inputElement = document.getElementById(id);
+ inputElement.focus();
document.execCommand("InsertText", false, 'z');
document.execCommand("InsertText", false, 'z');
document.execCommand("InsertText", false, ' ');
- if (shouldBeMarked == internals.hasSpellingMarker(document, 0, 2))
- log("PASS:" + id);
- else
- log("FAIL:" + id);
+
+ log("id=" + id + " type=" + inputElement.type + " spellcheck=" + inputElement.spellcheck
+ + " parent's spellcheck=" + inputElement.parentNode.spellcheck);
+
+ shouldBe("internals.hasSpellingMarker(document, 0, 2)", shouldBeMarked ? "true" : "false")
}
// For type="text".
-testTypingInvalidWord('test1_1', true);
-testTypingInvalidWord('test1_2', true);
-testTypingInvalidWord('test1_3', false);
-testTypingInvalidWord('test1_4', true);
-testTypingInvalidWord('test1_5', true);
-testTypingInvalidWord('test1_6', true);
-testTypingInvalidWord('test2_1', false);
-testTypingInvalidWord('test2_2', true);
-testTypingInvalidWord('test2_3', false);
-testTypingInvalidWord('test2_4', false);
-testTypingInvalidWord('test2_5', true);
-testTypingInvalidWord('test2_6', false);
+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("");
+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("");
// For type="search".
-testTypingInvalidWord('test3_1', true);
-testTypingInvalidWord('test3_2', true);
-testTypingInvalidWord('test3_3', false);
-testTypingInvalidWord('test3_4', true);
-testTypingInvalidWord('test3_5', true);
-testTypingInvalidWord('test3_6', true);
-testTypingInvalidWord('test4_1', false);
-testTypingInvalidWord('test4_2', true);
-testTypingInvalidWord('test4_3', false);
-testTypingInvalidWord('test4_4', false);
-testTypingInvalidWord('test4_5', true);
-testTypingInvalidWord('test4_6', false);
+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("");
+testMarkerForMisspelledWord('test4_1', false);
+testMarkerForMisspelledWord('test4_2', true);
+testMarkerForMisspelledWord('test4_3', false);
+testMarkerForMisspelledWord('test4_4', false);
+testMarkerForMisspelledWord('test4_5', true);
+testMarkerForMisspelledWord('test4_6', false);
if (window.testRunner) {
testRunner.dumpAsText();