Bug 1269209 - Port test_bug483651.html from chrome to plain; r?masayuki
MozReview-Commit-ID: 1320m72F2lz
--- 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?