|
1 <?xml version="1.0"?> |
|
2 <?xml-stylesheet href="chrome://global/skin" |
|
3 type="text/css"?> |
|
4 <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" |
|
5 type="text/css"?> |
|
6 <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" |
|
7 title="Editor currentURI Tests" onload="runTest();"> |
|
8 <script type="application/javascript" |
|
9 src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/> |
|
10 <script type="application/javascript" |
|
11 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/> |
|
12 |
|
13 <body xmlns="http://www.w3.org/1999/xhtml"> |
|
14 <p/> |
|
15 <editor xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" |
|
16 id="editor" |
|
17 type="content" |
|
18 editortype="html" |
|
19 style="width: 400px; height: 100px;"/> |
|
20 <p/> |
|
21 <pre id="test"> |
|
22 </pre> |
|
23 </body> |
|
24 <script class="testbody" type="application/javascript"> |
|
25 <![CDATA[ |
|
26 |
|
27 SimpleTest.waitForExplicitFinish(); |
|
28 |
|
29 function runTest() { |
|
30 var editor = document.getElementById("editor"); |
|
31 // Check that currentURI is a property of editor. |
|
32 var result = "currentURI" in editor; |
|
33 is(result, true, "currentURI is a property of editor"); |
|
34 is(editor.currentURI.spec, "about:blank", "currentURI.spec is about:blank"); |
|
35 SimpleTest.finish(); |
|
36 } |
|
37 ]]> |
|
38 </script> |
|
39 </window> |