dom/tests/mochitest/dom-level0/test_location_getters.html

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 <!DOCTYPE html>
     2 <html>
     3 <head>
     4   <title>MessageEvent tests</title>
     5   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     6   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
     7 </head>
     8 <body onload="test()">
     9   <p id="display"></p>
    10   <pre id="test">
    11   <script>
    12   SimpleTest.waitForExplicitFinish();
    14   function test()
    15   {
    16     var loc = window.location;
    17     is(loc.hash, '', 'Unexpected hash.');
    18     is(loc.host, 'mochi.test:8888', 'Unexpected host.');
    19     is(loc.hostname, 'mochi.test', 'Unexpected hostname.');
    20     is(loc.origin, 'http://mochi.test:8888', 'Unexpected origin.');
    21     is(loc.pathname, '/tests/dom/tests/mochitest/dom-level0/test_location_getters.html', 'Unexpected pathname.');
    22     is(loc.port, '8888', 'Unexpected port.');
    23     is(loc.protocol, 'http:', 'Unexpected protocol.');
    24     SimpleTest.finish();
    25   }
    26   </script>
    27   </pre>
    28 </body>
    29 </html>

mercurial