Bug 754292 - Make spellcheck-textarea-ref.html blur its contents so that we would test the right thing; r=roc
authorEhsan Akhgari <ehsan@mozilla.com>
Fri, 11 May 2012 11:39:38 -0400
changeset 97887 af802c58e1cff447e0478a7f6fc6b900cd8f44f8
parent 97886 233a09b3de854e7aafef66fde78b19b9528d4928
child 97888 1f9d4590d2f048fdb26bbea727b55781876a0b34
push idunknown
push userunknown
push dateunknown
reviewersroc
bugs754292
milestone15.0a1
Bug 754292 - Make spellcheck-textarea-ref.html blur its contents so that we would test the right thing; r=roc
editor/reftests/spellcheck-textarea-focused-notreadonly.html
editor/reftests/spellcheck-textarea-focused-reframe.html
editor/reftests/spellcheck-textarea-focused.html
editor/reftests/spellcheck-textarea-ref.html
--- a/editor/reftests/spellcheck-textarea-focused-notreadonly.html
+++ b/editor/reftests/spellcheck-textarea-focused-notreadonly.html
@@ -6,13 +6,14 @@
   <script type="text/javascript">
     //Adding focus to the textbox should trigger a spellcheck
     var textbox = document.getElementById("testBox");
     addEventListener("load", function() {
       textbox.readOnly = false;
       textbox.focus();
       textbox.value = "blahblahblah";
       textbox.selectionStart = textbox.selectionEnd = 0;
+      textbox.blur();
     }, false);
   </script>
 
 </body>
 </html>
--- a/editor/reftests/spellcheck-textarea-focused-reframe.html
+++ b/editor/reftests/spellcheck-textarea-focused-reframe.html
@@ -6,12 +6,13 @@
   <script type="text/javascript">
     function reframe(textbox) {
       textbox.style.display = "none";
       textbox.style.display = "";
       textbox.clientWidth;
     }
     //Adding focus to the textbox should trigger a spellcheck
     document.getElementById("testBox").focus();
+    document.getElementById("testBox").blur();
   </script>
   
 </body>
 </html>
--- a/editor/reftests/spellcheck-textarea-focused.html
+++ b/editor/reftests/spellcheck-textarea-focused.html
@@ -1,12 +1,13 @@
 <!DOCTYPE html>
 <html>
 <body>
 
   <textarea id="testBox">blahblahblah</textarea>
   <script type="text/javascript">
     //Adding focus to the textbox should trigger a spellcheck
     document.getElementById("testBox").focus();
+    document.getElementById("testBox").blur();
   </script>
   
 </body>
-</html>
\ No newline at end of file
+</html>
--- a/editor/reftests/spellcheck-textarea-ref.html
+++ b/editor/reftests/spellcheck-textarea-ref.html
@@ -1,10 +1,11 @@
 <!DOCTYPE html>
 <html>
 <body>
   <textarea spellcheck="true">blahblahblah</textarea>
   <script type="text/javascript">
     var box = document.getElementsByTagName("textarea")[0];
     box.focus(); //Bring the textbox into focus, triggering a spellcheck
+    box.blur(); //Blur in order to make things similar to other tests otherwise
   </script>
 </body>
 </html>