toolkit/content/tests/widgets/test_editor_currentURI.xul

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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"/>
    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[
    27   SimpleTest.waitForExplicitFinish();
    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>

mercurial