Bug 1269209 - Port test_bug471319.html from chrome to plain; r=masayuki
authorAryeh Gregor <ayg@aryeh.name>
Mon, 22 Aug 2016 21:12:45 +0300
changeset 347266 2e5fe6e88fb4894a23aa3e2cf76e194f89a48e57
parent 347265 b8fafe993a333ed6ae1974ddcce5120fee4fe34f
child 347267 49f889ed60ede7bd99662fdef9514a69bc6d9282
push id10298
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:33:03 +0000
treeherdermozilla-aurora@7e29173b1641 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmasayuki
bugs1269209, 471319
milestone52.0a1
Bug 1269209 - Port test_bug471319.html from chrome to plain; r=masayuki MozReview-Commit-ID: E8CBXZLPBPC
editor/libeditor/tests/chrome.ini
editor/libeditor/tests/mochitest.ini
editor/libeditor/tests/test_bug471319.html
--- a/editor/libeditor/tests/chrome.ini
+++ b/editor/libeditor/tests/chrome.ini
@@ -1,13 +1,12 @@
 [DEFAULT]
 skip-if = buildapp == 'b2g' || os == 'android'
 support-files = green.png
 
-[test_bug471319.html]
 [test_bug483651.html]
 [test_bug489202.xul]
 [test_bug490879.xul]
 subsuite = clipboard
 [test_bug569988.html]
 skip-if = buildapp == 'mulet'
 [test_bug599983.xul]
 skip-if = buildapp == 'mulet'
--- a/editor/libeditor/tests/mochitest.ini
+++ b/editor/libeditor/tests/mochitest.ini
@@ -42,16 +42,17 @@ skip-if = android_version == '18' # bug 
 skip-if = toolkit == 'android'
 [test_bug439808.html]
 [test_bug442186.html]
 [test_bug449243.html]
 [test_bug455992.html]
 [test_bug456244.html]
 [test_bug460740.html]
 [test_bug468353.html]
+[test_bug471319.html]
 [test_bug471722.html]
 [test_bug478725.html]
 subsuite = clipboard
 skip-if = toolkit == 'android'
 [test_bug480647.html]
 [test_bug480972.html]
 subsuite = clipboard
 skip-if = toolkit == 'android'
--- a/editor/libeditor/tests/test_bug471319.html
+++ b/editor/libeditor/tests/test_bug471319.html
@@ -4,52 +4,51 @@
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=471319
 -->
 
 <head>
   <title>Test for Bug 471319</title>
-  <script type="application/javascript"
-          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css">
+  <script src="/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" href="/tests/SimpleTest/test.css">
 </head>
 
 <body onload="doTest();">
   <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=471319">Mozilla Bug 471319</a>
   <p id="display"></p>
   <div id="content" style="display: none">
   </div>
 
   <pre id="test">
     <script type="application/javascript;version=1.7">
 
       /** Test for Bug 471319 **/
     
       SimpleTest.waitForExplicitFinish();
 
       function doTest() {
-        let t1 = $("t1");
+        let t1 = SpecialPowers.wrap($("t1"));
         let editor = null;
 
         // Test 1: Undo on an empty editor - the editor should not forget about
         // the bogus node
-        t1.QueryInterface(Components.interfaces.nsIDOMNSEditableElement);
+        t1.QueryInterface(SpecialPowers.Ci.nsIDOMNSEditableElement);
         t1Editor = t1.editor;
 
         // Did the editor recognize the new bogus node?
         t1Editor.undo(1);
         ok(!t1.value, "<br> still recognized as bogus node on undo");
 
 
         // Test 2: Redo on an empty editor - the editor should not forget about
         // the bogus node
-        let t2 = $("t2");
-        t2.QueryInterface(Components.interfaces.nsIDOMNSEditableElement);
+        let t2 = SpecialPowers.wrap($("t2"));
+        t2.QueryInterface(SpecialPowers.Ci.nsIDOMNSEditableElement);
         t2Editor = t2.editor;
 
         // Did the editor recognize the new bogus node?
         t2Editor.redo(1);
         ok(!t2.value, "<br> still recognized as bogus node on redo");
 
 
         // Test 3: Undoing a batched transaction where both end points of the