Bug 1269209 - Port test_bug471319.html from chrome to plain; r?masayuki
MozReview-Commit-ID: E8CBXZLPBPC
--- 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
@@ -41,16 +41,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