Bug 856270 - Update spell checking to use nsIContentPrefService2 (part 4: update reftests). r=ehsan
authorDrew Willcoxon <adw@mozilla.com>
Wed, 05 Jun 2013 17:07:55 -0700
changeset 145666 3f4ad11d56da4b29ee44fe238ecce312204cdc85
parent 145665 6b29a5c949555aefa0ee6bcca3b1a45809e513f8
child 145667 b5138d0d688986c6f34db019cb4f20970956ebf1
push idunknown
push userunknown
push dateunknown
reviewersehsan
bugs856270
milestone24.0a1
Bug 856270 - Update spell checking to use nsIContentPrefService2 (part 4: update reftests). r=ehsan
editor/reftests/spellcheck-input-attr-dynamic-inherit.html
editor/reftests/spellcheck-input-attr-dynamic-override-inherit.html
editor/reftests/spellcheck-input-attr-dynamic-override.html
editor/reftests/spellcheck-input-attr-dynamic.html
editor/reftests/spellcheck-input-attr-inherit.html
editor/reftests/spellcheck-input-property-dynamic-inherit.html
editor/reftests/spellcheck-input-property-dynamic-override-inherit.html
editor/reftests/spellcheck-input-property-dynamic-override.html
editor/reftests/spellcheck-input-property-dynamic.html
layout/base/tests/bug512295-2-ref.html
layout/base/tests/bug512295-2.html
--- a/editor/reftests/spellcheck-input-attr-dynamic-inherit.html
+++ b/editor/reftests/spellcheck-input-attr-dynamic-inherit.html
@@ -1,11 +1,11 @@
 <!DOCTYPE html>
 <html>
 <body onload="init()">
-    <input type="text" value="blahblahblah">
+    <input class="spell-checked" type="text" value="blahblahblah">
     <script>
       function init() {
         document.body.setAttribute("spellcheck", "true");
       }
     </script>
 </body>
 </html>
--- a/editor/reftests/spellcheck-input-attr-dynamic-override-inherit.html
+++ b/editor/reftests/spellcheck-input-attr-dynamic-override-inherit.html
@@ -1,11 +1,11 @@
 <!DOCTYPE html>
 <html>
 <body onload="init()" spellcheck="false">
-    <input type="text" value="blahblahblah">
+    <input class="spell-checked" type="text" value="blahblahblah">
     <script>
       function init() {
         document.body.setAttribute("spellcheck", "true");
       }
     </script>
 </body>
 </html>
--- a/editor/reftests/spellcheck-input-attr-dynamic-override.html
+++ b/editor/reftests/spellcheck-input-attr-dynamic-override.html
@@ -1,11 +1,11 @@
 <!DOCTYPE html>
 <html>
 <body onload="init()">
-    <input type="text" spellcheck="false" value="blahblahblah">
+    <input class="spell-checked" type="text" spellcheck="false" value="blahblahblah">
     <script>
       function init() {
         document.querySelector("input").setAttribute("spellcheck", "true");
       }
     </script>
 </body>
 </html>
--- a/editor/reftests/spellcheck-input-attr-dynamic.html
+++ b/editor/reftests/spellcheck-input-attr-dynamic.html
@@ -1,11 +1,11 @@
 <!DOCTYPE html>
 <html>
 <body onload="init()">
-    <input type="text" value="blahblahblah">
+    <input class="spell-checked" type="text" value="blahblahblah">
     <script>
       function init() {
         document.querySelector("input").setAttribute("spellcheck", "true");
       }
     </script>
 </body>
 </html>
--- a/editor/reftests/spellcheck-input-attr-inherit.html
+++ b/editor/reftests/spellcheck-input-attr-inherit.html
@@ -1,6 +1,6 @@
 <!DOCTYPE html>
 <html>
 <body>
-    <span spellcheck="true"><input type="text" value="blahblahblah"></span>
+    <span spellcheck="true"><input class="spell-checked" type="text" value="blahblahblah"></span>
 </body>
 </html>
--- a/editor/reftests/spellcheck-input-property-dynamic-inherit.html
+++ b/editor/reftests/spellcheck-input-property-dynamic-inherit.html
@@ -1,11 +1,11 @@
 <!DOCTYPE html>
 <html>
 <body onload="init()">
-    <input type="text" value="blahblahblah">
+    <input class="spell-checked" type="text" value="blahblahblah">
     <script>
       function init() {
         document.body.spellcheck = true;
       }
     </script>
 </body>
 </html>
--- a/editor/reftests/spellcheck-input-property-dynamic-override-inherit.html
+++ b/editor/reftests/spellcheck-input-property-dynamic-override-inherit.html
@@ -1,11 +1,11 @@
 <!DOCTYPE html>
 <html>
 <body onload="init()" spellcheck="false">
-    <input type="text" value="blahblahblah">
+    <input class="spell-checked" type="text" value="blahblahblah">
     <script>
       function init() {
         document.body.spellcheck = true;
       }
     </script>
 </body>
 </html>
--- a/editor/reftests/spellcheck-input-property-dynamic-override.html
+++ b/editor/reftests/spellcheck-input-property-dynamic-override.html
@@ -1,11 +1,11 @@
 <!DOCTYPE html>
 <html>
 <body onload="init()">
-    <input type="text" spellcheck="false" value="blahblahblah">
+    <input class="spell-checked" type="text" spellcheck="false" value="blahblahblah">
     <script>
       function init() {
         document.querySelector("input").spellcheck = true;
       }
     </script>
 </body>
 </html>
--- a/editor/reftests/spellcheck-input-property-dynamic.html
+++ b/editor/reftests/spellcheck-input-property-dynamic.html
@@ -1,11 +1,11 @@
 <!DOCTYPE html>
 <html>
 <body onload="init()">
-    <input type="text" value="blahblahblah">
+    <input class="spell-checked" type="text" value="blahblahblah">
     <script>
       function init() {
         document.querySelector("input").spellcheck = true;
       }
     </script>
 </body>
 </html>
--- a/layout/base/tests/bug512295-2-ref.html
+++ b/layout/base/tests/bug512295-2-ref.html
@@ -1,24 +1,28 @@
-<!DOCTYPE HTML><html><head>
+<!DOCTYPE HTML><html class="reftest-wait"><head>
   <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
 </head>
 <body>
 x
 <div contenteditable="true">
 <p id="p">A B CD EFG<br>
   1234567890</p>
 </div>
 <script>
   // Position the caret before the "A"
   var p = document.getElementById('p');
   var div = p.parentNode;
   div.focus();
-  var sel = window.getSelection();
-  sel.removeAllRanges();
-  var range = document.createRange();
-  range.setStart(p.firstChild, 0);
-  range.setEnd(p.firstChild, 0);
-  sel.addRange(range);
+  SpecialPowers.Cu.import("resource://gre/modules/AsyncSpellCheckTestHelper.jsm", window);
+  onSpellCheck(div, function () {
+    var sel = window.getSelection();
+    sel.removeAllRanges();
+    var range = document.createRange();
+    range.setStart(p.firstChild, 0);
+    range.setEnd(p.firstChild, 0);
+    sel.addRange(range);
+    document.documentElement.classList.remove("reftest-wait");
+  });
 </script>
 
 </body>
 </html>
--- a/layout/base/tests/bug512295-2.html
+++ b/layout/base/tests/bug512295-2.html
@@ -1,9 +1,9 @@
-<!DOCTYPE HTML><html><head>
+<!DOCTYPE HTML><html class="reftest-wait"><head>
   <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
 </head>
 <body>
 x
 <div contenteditable="true">
 <p id="p">A B CD EFG<br>
   1234567890</p>
 </div>
@@ -14,17 +14,21 @@ x
   var range = document.createRange();
   var p = document.getElementById('p');
   var t = p.firstChild;
   range.setStart(t, 1);
   range.setEnd(t, 1);
   sel.addRange(range);
   p.parentNode.focus();
 
-  sendKey('DOWN');  // now after "1"
-  sendKey('DOWN');  // now below the P element
-  sendKey('UP');    // now before the "1"
-  sendKey('UP');    // now before the "A"
-  sendKey('UP');    // now before the "A"
-  sendKey('UP');    // now before the "A"
+  SpecialPowers.Cu.import("resource://gre/modules/AsyncSpellCheckTestHelper.jsm", window);
+  onSpellCheck(p.parentNode, function () {
+    sendKey('DOWN');  // now after "1"
+    sendKey('DOWN');  // now below the P element
+    sendKey('UP');    // now before the "1"
+    sendKey('UP');    // now before the "A"
+    sendKey('UP');    // now before the "A"
+    sendKey('UP');    // now before the "A"
+    document.documentElement.classList.remove("reftest-wait");
+  });
 </script>
 </body>
 </html>