1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/tests/mochitest/dom-level0/test_location_getters.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,29 @@ 1.4 +<!DOCTYPE html> 1.5 +<html> 1.6 +<head> 1.7 + <title>MessageEvent tests</title> 1.8 + <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.9 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 1.10 +</head> 1.11 +<body onload="test()"> 1.12 + <p id="display"></p> 1.13 + <pre id="test"> 1.14 + <script> 1.15 + SimpleTest.waitForExplicitFinish(); 1.16 + 1.17 + function test() 1.18 + { 1.19 + var loc = window.location; 1.20 + is(loc.hash, '', 'Unexpected hash.'); 1.21 + is(loc.host, 'mochi.test:8888', 'Unexpected host.'); 1.22 + is(loc.hostname, 'mochi.test', 'Unexpected hostname.'); 1.23 + is(loc.origin, 'http://mochi.test:8888', 'Unexpected origin.'); 1.24 + is(loc.pathname, '/tests/dom/tests/mochitest/dom-level0/test_location_getters.html', 'Unexpected pathname.'); 1.25 + is(loc.port, '8888', 'Unexpected port.'); 1.26 + is(loc.protocol, 'http:', 'Unexpected protocol.'); 1.27 + SimpleTest.finish(); 1.28 + } 1.29 + </script> 1.30 + </pre> 1.31 +</body> 1.32 +</html>