Bug 1269209 - Port test_bug1100966.html from chrome to plain; r?masayuki
MozReview-Commit-ID: BlAIUibApXY
--- a/editor/libeditor/tests/chrome.ini
+++ b/editor/libeditor/tests/chrome.ini
@@ -9,17 +9,16 @@ subsuite = clipboard
skip-if = buildapp == 'mulet'
[test_bug599983.xul]
skip-if = buildapp == 'mulet'
[test_bug607584.xul]
[test_bug616590.xul]
[test_bug636465.xul]
[test_bug646194.xul]
[test_bug780908.xul]
-[test_bug1100966.html]
[test_bug1102906.html]
[test_bug1101392.html]
subsuite = clipboard
[test_bug1140105.html]
[test_bug1140617.xul]
subsuite = clipboard
[test_bug1153237.html]
[test_bug1154791.html]
--- a/editor/libeditor/tests/mochitest.ini
+++ b/editor/libeditor/tests/mochitest.ini
@@ -166,16 +166,17 @@ skip-if = toolkit == 'android'
skip-if = os != "win"
[test_bug966552.html]
skip-if = os != "win"
[test_bug998188.html]
[test_bug1026397.html]
[test_bug1053048.html]
[test_bug1067255.html]
[test_bug1094000.html]
+[test_bug1100966.html]
[test_CF_HTML_clipboard.html]
subsuite = clipboard
[test_contenteditable_focus.html]
[test_dom_input_event_on_htmleditor.html]
skip-if = toolkit == 'android' # bug 1054087
[test_dom_input_event_on_texteditor.html]
[test_keypress_untrusted_event.html]
[test_root_element_replacement.html]
--- a/editor/libeditor/tests/test_bug1100966.html
+++ b/editor/libeditor/tests/test_bug1100966.html
@@ -1,18 +1,18 @@
<!DOCTYPE>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1100966
-->
<head>
<title>Test for Bug 1100966</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 type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
+ <script src="/tests/SimpleTest/SimpleTest.js"></script>
+ <link rel="stylesheet" href="/tests/SimpleTest/test.css">
+ <script src="/tests/SimpleTest/EventUtils.js"></script>
</head>
<body>
<div id="display">
</div>
<div id="content" contenteditable>
=====<br>
correct<br>
fivee sixx<br>
@@ -43,21 +43,22 @@ SimpleTest.waitForFocus(function() {
SimpleTest.finish();
},0);
},0);
});
function getSpellCheckSelection() {
- var Ci = Components.interfaces;
- var editingSession = window.QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIWebNavigation)
- .QueryInterface(Ci.nsIInterfaceRequestor)
- .getInterface(Ci.nsIEditingSession);
+ var Ci = SpecialPowers.Ci;
+ var editingSession = SpecialPowers.wrap(window)
+ .QueryInterface(Ci.nsIInterfaceRequestor)
+ .getInterface(Ci.nsIWebNavigation)
+ .QueryInterface(Ci.nsIInterfaceRequestor)
+ .getInterface(Ci.nsIEditingSession);
var editor = editingSession.getEditorForWindow(window);
var selcon = editor.selectionController;
return selcon.getSelection(selcon.SELECTION_SPELLCHECK);
}
</script>
</body>