Bug 1271120 - Port test_composition_event_created_in_chrome.html from chrome to plain; r=masayuki

MozReview-Commit-ID: 5K2qv7JXAT4
This commit is contained in:
Aryeh Gregor 2016-08-23 16:01:28 +03:00
parent 7440afba28
commit 757c20701e
3 changed files with 7 additions and 9 deletions

View File

@ -12,7 +12,6 @@ skip-if = buildapp == 'mulet'
[test_bug636465.xul] [test_bug636465.xul]
[test_bug780908.xul] [test_bug780908.xul]
[test_bug1102906.html] [test_bug1102906.html]
[test_composition_event_created_in_chrome.html]
[test_contenteditable_text_input_handling.html] [test_contenteditable_text_input_handling.html]
[test_dragdrop.html] [test_dragdrop.html]
skip-if = buildapp == 'mulet' skip-if = buildapp == 'mulet'

View File

@ -206,6 +206,7 @@ skip-if = toolkit == 'android'
[test_CF_HTML_clipboard.html] [test_CF_HTML_clipboard.html]
subsuite = clipboard subsuite = clipboard
[test_composition_event_created_in_chrome.html]
[test_contenteditable_focus.html] [test_contenteditable_focus.html]
[test_dom_input_event_on_htmleditor.html] [test_dom_input_event_on_htmleditor.html]
skip-if = toolkit == 'android' # bug 1054087 skip-if = toolkit == 'android' # bug 1054087

View File

@ -1,12 +1,11 @@
<!doctype html>
<html> <html>
<head> <head>
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"> <link rel="stylesheet" href="/tests/SimpleTest/test.css">
<script type="application/javascript" <script src="/tests/SimpleTest/SimpleTest.js"></script>
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> <script src="/tests/SimpleTest/EventUtils.js"></script>
<script type="application/javascript"
src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
</head> </head>
<body> <body>
@ -17,17 +16,16 @@
// In nsEditorEventListener, when listening event is not created with proper // In nsEditorEventListener, when listening event is not created with proper
// event interface, it asserts the fact. // event interface, it asserts the fact.
SimpleTest.expectAssertions(2);
SimpleTest.waitForExplicitFinish(); SimpleTest.waitForExplicitFinish();
var gInputElement = document.getElementById("input"); var gInputElement = document.getElementById("input");
function getEditorIMESupport(aInputElement) function getEditorIMESupport(aInputElement)
{ {
var editableElement = aInputElement.QueryInterface(Components.interfaces.nsIDOMNSEditableElement); var editableElement = SpecialPowers.wrap(aInputElement).QueryInterface(SpecialPowers.Ci.nsIDOMNSEditableElement);
ok(editableElement, "The input element doesn't have nsIDOMNSEditableElement interface"); ok(editableElement, "The input element doesn't have nsIDOMNSEditableElement interface");
ok(editableElement.editor, "There is no editor for the input element"); ok(editableElement.editor, "There is no editor for the input element");
var editorIMESupport = editableElement.editor.QueryInterface(Components.interfaces.nsIEditorIMESupport); var editorIMESupport = SpecialPowers.wrap(editableElement).editor.QueryInterface(SpecialPowers.Ci.nsIEditorIMESupport);
ok(editorIMESupport, "The input element doesn't have nsIEditorIMESupport interface"); ok(editorIMESupport, "The input element doesn't have nsIEditorIMESupport interface");
return editorIMESupport; return editorIMESupport;
} }