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 134175 3f4ad11d56da4b29ee44fe238ecce312204cdc85
parent 134174 6b29a5c949555aefa0ee6bcca3b1a45809e513f8
child 134176 b5138d0d688986c6f34db019cb4f20970956ebf1
push id29084
push userdwillcoxon@mozilla.com
push dateThu, 06 Jun 2013 00:08:08 +0000
treeherdermozilla-inbound@b5138d0d6889 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs856270
milestone24.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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>