2 <?xml-stylesheet href=
"chrome://global/skin"
4 <?xml-stylesheet href=
"chrome://mochikit/content/tests/SimpleTest/test.css"
7 https://bugzilla.mozilla.org/show_bug.cgi?id=616590
9 <window xmlns=
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
10 title=
"Mozilla Bug 616590" onload=
"runTest();">
11 <script src=
"chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
12 <script src=
"chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
14 <body xmlns=
"http://www.w3.org/1999/xhtml">
15 <a href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=616590"
16 target=
"_blank">Mozilla Bug
616590</a>
18 <editor xmlns=
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
22 style=
"width: 400px; height: 100px;"/>
27 <script class=
"testbody" type=
"application/javascript">
30 SimpleTest.waitForExplicitFinish();
32 function EditorContentListener(aEditor)
37 EditorContentListener.prototype = {
40 this.mEditor = aEditor;
43 QueryInterface: ChromeUtils.generateQI([
"nsIWebProgressListener",
44 "nsISupportsWeakReference"]),
46 onStateChange(aWebProgress, aRequest, aStateFlags)
48 if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP)
50 var editor = this.mEditor.getEditor(this.mEditor.contentWindow);
52 editor.QueryInterface(Ci.nsIEditorMailSupport);
53 editor.insertAsCitedQuotation(
"<html><body><div contenteditable>foo</div></body></html>",
"", true);
54 document.documentElement.clientWidth;
55 progress.removeProgressListener(this);
56 ok(true,
"Test complete");
79 onContentBlockingEvent()
86 var progress, progressListener;
89 var editorElement = document.getElementById(
"editor");
90 editorElement.makeEditable(
"htmlmail", true);
91 var docShell = editorElement.docShell;
92 progress = docShell.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIWebProgress);
93 progressListener = new EditorContentListener(editorElement);
94 progress.addProgressListener(progressListener, Ci.nsIWebProgress.NOTIFY_ALL);
95 editorElement.setAttribute(
"src",
"data:text/html,");