layout/generic/test/test_bug589623.html

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 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=589623
     5 -->
     6 <head>
     7   <title>Test for Bug 589623</title>
     8   <script src="/tests/SimpleTest/SimpleTest.js"></script>
     9   <link rel="stylesheet" href="/tests/SimpleTest/test.css"/>
    10 </head>
    11 <body>
    12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=589623">Mozilla Bug 589623</a>
    13 <p id="display"></p>
    14 <div id="content" style="display: none">
    15 </div>
    16 <pre id="test">
    17 <script>
    18 /** Test for Bug 589623 **/
    19 var sel = getSelection();
    20 sel.removeAllRanges();
    21 function t(m) {
    22   try {
    23     sel[m]();
    24     ok(false, "Should not be here");
    25   } catch(e) {
    26     is(e.name, "InvalidStateError", "Should be an InvalidStateError");
    27     ok(e instanceof DOMException, "Should be a DOMException");
    28     is(e.code, DOMException.INVALID_STATE_ERR, "Should be an INVALID_STATE_ERR");
    29   }
    30 }
    31 t("collapseToStart");
    32 t("collapseToEnd");
    33 </script>
    34 </pre>
    35 </body>
    36 </html>

mercurial