Bug 614161 - Add more comprehensive spellcheck reftests to make sure that it works correctly for input and textarea controls; r=roc a=test-only
authorEhsan Akhgari <ehsan@mozilla.com>
Tue, 23 Nov 2010 00:09:51 -0500
changeset 58029 ad9e2c046780a49e49e2c53bf38f1747cce416e7
parent 58028 f18b9274235c68cdc49c772b92612408ec373474
child 58030 86c3a0e9fa87a9b0967b89824c35f9b2f9355590
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewersroc, test-only
bugs614161
milestone2.0b8pre
Bug 614161 - Add more comprehensive spellcheck reftests to make sure that it works correctly for input and textarea controls; r=roc a=test-only
layout/reftests/editor/reftest.list
layout/reftests/editor/spellcheck-1.html
layout/reftests/editor/spellcheck-input-attr-after.html
layout/reftests/editor/spellcheck-input-attr-before.html
layout/reftests/editor/spellcheck-input-attr-dynamic-inherit.html
layout/reftests/editor/spellcheck-input-attr-dynamic-override-inherit.html
layout/reftests/editor/spellcheck-input-attr-dynamic-override.html
layout/reftests/editor/spellcheck-input-attr-dynamic.html
layout/reftests/editor/spellcheck-input-attr-inherit.html
layout/reftests/editor/spellcheck-input-disabled.html
layout/reftests/editor/spellcheck-input-property-dynamic-inherit.html
layout/reftests/editor/spellcheck-input-property-dynamic-override-inherit.html
layout/reftests/editor/spellcheck-input-property-dynamic-override.html
layout/reftests/editor/spellcheck-input-property-dynamic.html
layout/reftests/editor/spellcheck-input-ref.html
layout/reftests/editor/spellcheck-ref.html
layout/reftests/editor/spellcheck-textarea-attr-dynamic-inherit.html
layout/reftests/editor/spellcheck-textarea-attr-dynamic-override-inherit.html
layout/reftests/editor/spellcheck-textarea-attr-dynamic-override.html
layout/reftests/editor/spellcheck-textarea-attr-dynamic.html
layout/reftests/editor/spellcheck-textarea-attr-inherit.html
layout/reftests/editor/spellcheck-textarea-attr.html
layout/reftests/editor/spellcheck-textarea-disabled.html
layout/reftests/editor/spellcheck-textarea-property-dynamic-inherit.html
layout/reftests/editor/spellcheck-textarea-property-dynamic-override-inherit.html
layout/reftests/editor/spellcheck-textarea-property-dynamic-override.html
layout/reftests/editor/spellcheck-textarea-property-dynamic.html
layout/reftests/editor/spellcheck-textarea-ref.html
--- a/layout/reftests/editor/reftest.list
+++ b/layout/reftests/editor/reftest.list
@@ -12,16 +12,38 @@ include xul/reftest.list
 == dynamic-type-4.html dynamic-ref.html
 == passwd-1.html passwd-ref.html
 != passwd-2.html passwd-ref.html
 == passwd-3.html passwd-ref.html
 asserts(1) == passwd-4.html passwd-ref.html # bug 596901
 == emptypasswd-1.html emptypasswd-ref.html
 == emptypasswd-2.html emptypasswd-ref.html
 == caret_on_positioned.html caret_on_positioned-ref.html
-== spellcheck-1.html spellcheck-ref.html
+!= spellcheck-input-disabled.html spellcheck-input-ref.html
+== spellcheck-input-attr-before.html spellcheck-input-ref.html
+== spellcheck-input-attr-after.html spellcheck-input-ref.html
+== spellcheck-input-attr-inherit.html spellcheck-input-ref.html
+== spellcheck-input-attr-dynamic.html spellcheck-input-ref.html
+== spellcheck-input-attr-dynamic-inherit.html spellcheck-input-ref.html
+== spellcheck-input-property-dynamic.html spellcheck-input-ref.html
+== spellcheck-input-property-dynamic-inherit.html spellcheck-input-ref.html
+== spellcheck-input-attr-dynamic-override.html spellcheck-input-ref.html
+== spellcheck-input-attr-dynamic-override-inherit.html spellcheck-input-ref.html
+== spellcheck-input-property-dynamic-override.html spellcheck-input-ref.html
+== spellcheck-input-property-dynamic-override-inherit.html spellcheck-input-ref.html
+== spellcheck-textarea-attr.html spellcheck-textarea-ref.html
+!= spellcheck-textarea-disabled.html spellcheck-textarea-ref.html
+!= spellcheck-textarea-attr-inherit.html spellcheck-textarea-ref.html
+!= spellcheck-textarea-attr-dynamic.html spellcheck-textarea-ref.html
+!= spellcheck-textarea-attr-dynamic-inherit.html spellcheck-textarea-ref.html
+!= spellcheck-textarea-property-dynamic.html spellcheck-textarea-ref.html
+!= spellcheck-textarea-property-dynamic-inherit.html spellcheck-textarea-ref.html
+!= spellcheck-textarea-attr-dynamic-override.html spellcheck-textarea-ref.html
+!= spellcheck-textarea-attr-dynamic-override-inherit.html spellcheck-textarea-ref.html
+!= spellcheck-textarea-property-dynamic-override.html spellcheck-textarea-ref.html
+!= spellcheck-textarea-property-dynamic-override-inherit.html spellcheck-textarea-ref.html
 == caret_on_focus.html caret_on_focus-ref.html
 != caret_on_textarea_lastline.html caret_on_textarea_lastline-ref.html
 == input-text-onfocus-reframe.html input-text-onfocus-reframe-ref.html
 == input-text-notheme-onfocus-reframe.html input-text-notheme-onfocus-reframe-ref.html
 == caret_after_reframe.html caret_after_reframe-ref.html
 == nobogusnode-1.html nobogusnode-ref.html
 == nobogusnode-2.html nobogusnode-ref.html
rename from layout/reftests/editor/spellcheck-1.html
rename to layout/reftests/editor/spellcheck-input-attr-after.html
copy from layout/reftests/editor/spellcheck-1.html
copy to layout/reftests/editor/spellcheck-input-attr-before.html
--- a/layout/reftests/editor/spellcheck-1.html
+++ b/layout/reftests/editor/spellcheck-input-attr-before.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html>
 <body>
-    <input type="text" value="blahblahblah" spellcheck="true">
+    <input type="text" spellcheck="true" value="blahblahblah">
 </body>
 </html>
copy from layout/reftests/editor/spellcheck-1.html
copy to layout/reftests/editor/spellcheck-input-attr-dynamic-inherit.html
--- a/layout/reftests/editor/spellcheck-1.html
+++ b/layout/reftests/editor/spellcheck-input-attr-dynamic-inherit.html
@@ -1,6 +1,11 @@
 <!DOCTYPE html>
 <html>
-<body>
-    <input type="text" value="blahblahblah" spellcheck="true">
+<body onload="init()">
+    <input type="text" value="blahblahblah">
+    <script>
+      function init() {
+        document.body.setAttribute("spellcheck", "true");
+      }
+    </script>
 </body>
 </html>
copy from layout/reftests/editor/spellcheck-1.html
copy to layout/reftests/editor/spellcheck-input-attr-dynamic-override-inherit.html
--- a/layout/reftests/editor/spellcheck-1.html
+++ b/layout/reftests/editor/spellcheck-input-attr-dynamic-override-inherit.html
@@ -1,6 +1,11 @@
 <!DOCTYPE html>
 <html>
-<body>
-    <input type="text" value="blahblahblah" spellcheck="true">
+<body onload="init()" spellcheck="false">
+    <input type="text" value="blahblahblah">
+    <script>
+      function init() {
+        document.body.setAttribute("spellcheck", "true");
+      }
+    </script>
 </body>
 </html>
copy from layout/reftests/editor/spellcheck-1.html
copy to layout/reftests/editor/spellcheck-input-attr-dynamic-override.html
--- a/layout/reftests/editor/spellcheck-1.html
+++ b/layout/reftests/editor/spellcheck-input-attr-dynamic-override.html
@@ -1,6 +1,11 @@
 <!DOCTYPE html>
 <html>
-<body>
-    <input type="text" value="blahblahblah" spellcheck="true">
+<body onload="init()">
+    <input type="text" spellcheck="false" value="blahblahblah">
+    <script>
+      function init() {
+        document.querySelector("input").setAttribute("spellcheck", "true");
+      }
+    </script>
 </body>
 </html>
copy from layout/reftests/editor/spellcheck-1.html
copy to layout/reftests/editor/spellcheck-input-attr-dynamic.html
--- a/layout/reftests/editor/spellcheck-1.html
+++ b/layout/reftests/editor/spellcheck-input-attr-dynamic.html
@@ -1,6 +1,11 @@
 <!DOCTYPE html>
 <html>
-<body>
-    <input type="text" value="blahblahblah" spellcheck="true">
+<body onload="init()">
+    <input type="text" value="blahblahblah">
+    <script>
+      function init() {
+        document.querySelector("input").setAttribute("spellcheck", "true");
+      }
+    </script>
 </body>
 </html>
copy from layout/reftests/editor/spellcheck-1.html
copy to layout/reftests/editor/spellcheck-input-attr-inherit.html
--- a/layout/reftests/editor/spellcheck-1.html
+++ b/layout/reftests/editor/spellcheck-input-attr-inherit.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html>
 <body>
-    <input type="text" value="blahblahblah" spellcheck="true">
+    <span spellcheck="true"><input type="text" value="blahblahblah"></span>
 </body>
 </html>
copy from layout/reftests/editor/spellcheck-1.html
copy to layout/reftests/editor/spellcheck-input-disabled.html
--- a/layout/reftests/editor/spellcheck-1.html
+++ b/layout/reftests/editor/spellcheck-input-disabled.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html>
 <body>
-    <input type="text" value="blahblahblah" spellcheck="true">
+    <input type="text" value="blahblahblah">
 </body>
 </html>
copy from layout/reftests/editor/spellcheck-1.html
copy to layout/reftests/editor/spellcheck-input-property-dynamic-inherit.html
--- a/layout/reftests/editor/spellcheck-1.html
+++ b/layout/reftests/editor/spellcheck-input-property-dynamic-inherit.html
@@ -1,6 +1,11 @@
 <!DOCTYPE html>
 <html>
-<body>
-    <input type="text" value="blahblahblah" spellcheck="true">
+<body onload="init()">
+    <input type="text" value="blahblahblah">
+    <script>
+      function init() {
+        document.body.spellcheck = true;
+      }
+    </script>
 </body>
 </html>
copy from layout/reftests/editor/spellcheck-1.html
copy to layout/reftests/editor/spellcheck-input-property-dynamic-override-inherit.html
--- a/layout/reftests/editor/spellcheck-1.html
+++ b/layout/reftests/editor/spellcheck-input-property-dynamic-override-inherit.html
@@ -1,6 +1,11 @@
 <!DOCTYPE html>
 <html>
-<body>
-    <input type="text" value="blahblahblah" spellcheck="true">
+<body onload="init()" spellcheck="false">
+    <input type="text" value="blahblahblah">
+    <script>
+      function init() {
+        document.body.spellcheck = true;
+      }
+    </script>
 </body>
 </html>
copy from layout/reftests/editor/spellcheck-1.html
copy to layout/reftests/editor/spellcheck-input-property-dynamic-override.html
--- a/layout/reftests/editor/spellcheck-1.html
+++ b/layout/reftests/editor/spellcheck-input-property-dynamic-override.html
@@ -1,6 +1,11 @@
 <!DOCTYPE html>
 <html>
-<body>
-    <input type="text" value="blahblahblah" spellcheck="true">
+<body onload="init()">
+    <input type="text" spellcheck="false" value="blahblahblah">
+    <script>
+      function init() {
+        document.querySelector("input").spellcheck = true;
+      }
+    </script>
 </body>
 </html>
copy from layout/reftests/editor/spellcheck-1.html
copy to layout/reftests/editor/spellcheck-input-property-dynamic.html
--- a/layout/reftests/editor/spellcheck-1.html
+++ b/layout/reftests/editor/spellcheck-input-property-dynamic.html
@@ -1,6 +1,11 @@
 <!DOCTYPE html>
 <html>
-<body>
-    <input type="text" value="blahblahblah" spellcheck="true">
+<body onload="init()">
+    <input type="text" value="blahblahblah">
+    <script>
+      function init() {
+        document.querySelector("input").spellcheck = true;
+      }
+    </script>
 </body>
 </html>
rename from layout/reftests/editor/spellcheck-ref.html
rename to layout/reftests/editor/spellcheck-input-ref.html
copy from layout/reftests/editor/spellcheck-1.html
copy to layout/reftests/editor/spellcheck-textarea-attr-dynamic-inherit.html
--- a/layout/reftests/editor/spellcheck-1.html
+++ b/layout/reftests/editor/spellcheck-textarea-attr-dynamic-inherit.html
@@ -1,6 +1,11 @@
 <!DOCTYPE html>
 <html>
-<body>
-    <input type="text" value="blahblahblah" spellcheck="true">
+<body onload="init()">
+    <textarea>blahblahblah</textarea>
+    <script>
+      function init() {
+        document.body.setAttribute("spellcheck", "false");
+      }
+    </script>
 </body>
 </html>
copy from layout/reftests/editor/spellcheck-1.html
copy to layout/reftests/editor/spellcheck-textarea-attr-dynamic-override-inherit.html
--- a/layout/reftests/editor/spellcheck-1.html
+++ b/layout/reftests/editor/spellcheck-textarea-attr-dynamic-override-inherit.html
@@ -1,6 +1,11 @@
 <!DOCTYPE html>
 <html>
-<body>
-    <input type="text" value="blahblahblah" spellcheck="true">
+<body onload="init()" spellcheck="true">
+    <textarea>blahblahblah</textarea>
+    <script>
+      function init() {
+        document.body.setAttribute("spellcheck", "false");
+      }
+    </script>
 </body>
 </html>
copy from layout/reftests/editor/spellcheck-1.html
copy to layout/reftests/editor/spellcheck-textarea-attr-dynamic-override.html
--- a/layout/reftests/editor/spellcheck-1.html
+++ b/layout/reftests/editor/spellcheck-textarea-attr-dynamic-override.html
@@ -1,6 +1,11 @@
 <!DOCTYPE html>
 <html>
-<body>
-    <input type="text" value="blahblahblah" spellcheck="true">
+<body onload="init()">
+    <textarea spellcheck="true">blahblahblah</textarea>
+    <script>
+      function init() {
+        document.querySelector("textarea").setAttribute("spellcheck", "false");
+      }
+    </script>
 </body>
 </html>
copy from layout/reftests/editor/spellcheck-1.html
copy to layout/reftests/editor/spellcheck-textarea-attr-dynamic.html
--- a/layout/reftests/editor/spellcheck-1.html
+++ b/layout/reftests/editor/spellcheck-textarea-attr-dynamic.html
@@ -1,6 +1,11 @@
 <!DOCTYPE html>
 <html>
-<body>
-    <input type="text" value="blahblahblah" spellcheck="true">
+<body onload="init()">
+    <textarea>blahblahblah</textarea>
+    <script>
+      function init() {
+        document.querySelector("textarea").setAttribute("spellcheck", "false");
+      }
+    </script>
 </body>
 </html>
copy from layout/reftests/editor/spellcheck-1.html
copy to layout/reftests/editor/spellcheck-textarea-attr-inherit.html
--- a/layout/reftests/editor/spellcheck-1.html
+++ b/layout/reftests/editor/spellcheck-textarea-attr-inherit.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html>
 <body>
-    <input type="text" value="blahblahblah" spellcheck="true">
+    <span spellcheck="false"><textarea>blahblahblah</textarea></span>
 </body>
 </html>
copy from layout/reftests/editor/spellcheck-1.html
copy to layout/reftests/editor/spellcheck-textarea-attr.html
--- a/layout/reftests/editor/spellcheck-1.html
+++ b/layout/reftests/editor/spellcheck-textarea-attr.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html>
 <body>
-    <input type="text" value="blahblahblah" spellcheck="true">
+  <textarea>blahblahblah</textarea>
 </body>
 </html>
copy from layout/reftests/editor/spellcheck-1.html
copy to layout/reftests/editor/spellcheck-textarea-disabled.html
--- a/layout/reftests/editor/spellcheck-1.html
+++ b/layout/reftests/editor/spellcheck-textarea-disabled.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html>
 <body>
-    <input type="text" value="blahblahblah" spellcheck="true">
+  <textarea spellcheck="false">blahblahblah</textarea>
 </body>
 </html>
copy from layout/reftests/editor/spellcheck-1.html
copy to layout/reftests/editor/spellcheck-textarea-property-dynamic-inherit.html
--- a/layout/reftests/editor/spellcheck-1.html
+++ b/layout/reftests/editor/spellcheck-textarea-property-dynamic-inherit.html
@@ -1,6 +1,11 @@
 <!DOCTYPE html>
 <html>
-<body>
-    <input type="text" value="blahblahblah" spellcheck="true">
+<body onload="init()">
+    <textarea>blahblahblah</textarea>
+    <script>
+      function init() {
+        document.body.spellcheck = false;
+      }
+    </script>
 </body>
 </html>
copy from layout/reftests/editor/spellcheck-1.html
copy to layout/reftests/editor/spellcheck-textarea-property-dynamic-override-inherit.html
--- a/layout/reftests/editor/spellcheck-1.html
+++ b/layout/reftests/editor/spellcheck-textarea-property-dynamic-override-inherit.html
@@ -1,6 +1,11 @@
 <!DOCTYPE html>
 <html>
-<body>
-    <input type="text" value="blahblahblah" spellcheck="true">
+<body onload="init()" spellcheck="true">
+    <textarea>blahblahblah</textarea>
+    <script>
+      function init() {
+        document.body.spellcheck = false;
+      }
+    </script>
 </body>
 </html>
copy from layout/reftests/editor/spellcheck-1.html
copy to layout/reftests/editor/spellcheck-textarea-property-dynamic-override.html
--- a/layout/reftests/editor/spellcheck-1.html
+++ b/layout/reftests/editor/spellcheck-textarea-property-dynamic-override.html
@@ -1,6 +1,11 @@
 <!DOCTYPE html>
 <html>
-<body>
-    <input type="text" value="blahblahblah" spellcheck="true">
+<body onload="init()">
+    <textarea spellcheck="true">blahblahblah</textarea>
+    <script>
+      function init() {
+        document.querySelector("textarea").spellcheck = false;
+      }
+    </script>
 </body>
 </html>
copy from layout/reftests/editor/spellcheck-1.html
copy to layout/reftests/editor/spellcheck-textarea-property-dynamic.html
--- a/layout/reftests/editor/spellcheck-1.html
+++ b/layout/reftests/editor/spellcheck-textarea-property-dynamic.html
@@ -1,6 +1,11 @@
 <!DOCTYPE html>
 <html>
-<body>
-    <input type="text" value="blahblahblah" spellcheck="true">
+<body onload="init()">
+    <textarea>blahblahblah</textarea>
+    <script>
+      function init() {
+        document.querySelector("textarea").spellcheck = false;
+      }
+    </script>
 </body>
 </html>
copy from layout/reftests/editor/spellcheck-1.html
copy to layout/reftests/editor/spellcheck-textarea-ref.html
--- a/layout/reftests/editor/spellcheck-1.html
+++ b/layout/reftests/editor/spellcheck-textarea-ref.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html>
 <body>
-    <input type="text" value="blahblahblah" spellcheck="true">
+  <textarea spellcheck="true">blahblahblah</textarea>
 </body>
 </html>