Bug 1269209 - Port test_bug483651.html from chrome to plain; r=masayuki
☠☠ backed out by d801630ad28c ☠ ☠
authorAryeh Gregor <ayg@aryeh.name>
Mon, 22 Aug 2016 21:13:37 +0300
changeset 319740 b74022c44df0a6354b479454d6710ba9acfc6084
parent 319739 a3d0e9ed7d8565655fa6894f8b315c30decd19e8
child 319741 016b31e0631f29a0a22ed8c6f3bc627a6dc973df
push id20748
push userphilringnalda@gmail.com
push dateFri, 28 Oct 2016 03:39:55 +0000
treeherderfx-team@715360440695 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmasayuki
bugs1269209, 483651
milestone52.0a1
Bug 1269209 - Port test_bug483651.html from chrome to plain; r=masayuki MozReview-Commit-ID: 1320m72F2lz
editor/libeditor/tests/chrome.ini
editor/libeditor/tests/mochitest.ini
editor/libeditor/tests/test_bug483651.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_bug483651.html]
 [test_bug489202.xul]
 [test_bug490879.xul]
 subsuite = clipboard
 [test_bug569988.html]
 skip-if = buildapp == 'mulet'
 [test_bug599983.xul]
 skip-if = buildapp == 'mulet'
 [test_bug607584.xul]
--- a/editor/libeditor/tests/mochitest.ini
+++ b/editor/libeditor/tests/mochitest.ini
@@ -50,16 +50,17 @@ skip-if = toolkit == 'android'
 [test_bug471722.html]
 [test_bug478725.html]
 subsuite = clipboard
 skip-if = toolkit == 'android'
 [test_bug480647.html]
 [test_bug480972.html]
 subsuite = clipboard
 skip-if = toolkit == 'android'
+[test_bug483651.html]
 [test_bug484181.html]
 skip-if = toolkit == 'android'
 [test_bug487524.html]
 [test_bug502673.html]
 [test_bug514156.html]
 [test_bug520189.html]
 subsuite = clipboard
 skip-if = toolkit == 'android'
--- a/editor/libeditor/tests/test_bug483651.html
+++ b/editor/libeditor/tests/test_bug483651.html
@@ -4,23 +4,20 @@
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 <html>
 <!--
 https://bugzilla.mozilla.org/show_bug.cgi?id=483651
 -->
 
 <head>
   <title>Test for Bug 483651</title>
-  <script type="application/javascript"
-          src="chrome://mochikit/content/MochiKit/packed.js"></script>
-  <script type="application/javascript"
-          src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
-  <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="/MochiKit/packed.js"></script>
+  <script src="/tests/SimpleTest/EventUtils.js"></script>
+  <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=483651">Mozilla Bug 483651</a>
   <p id="display"></p>
   <div id="content" style="display: none">
   </div>
 
@@ -28,20 +25,17 @@ https://bugzilla.mozilla.org/show_bug.cg
     <script type="application/javascript">
 
       /** Test for Bug 483651 **/
 
       SimpleTest.waitForExplicitFinish();
 
       function doTest() {
         var t1 = $("t1");
-        var editor = null;
-
-        if (t1 instanceof Components.interfaces.nsIDOMNSEditableElement)
-          editor = t1.editor;
+        var editor = SpecialPowers.wrap(t1).editor;
 
         ok(editor, "able to get editor for the element");
         t1.focus();
         synthesizeKey("A", {});
         synthesizeKey("VK_BACK_SPACE", {});
 
         try {
           // Was the trailing br removed?