dom/tests/mochitest/localstorage/test_localStorageOriginsPortDiffs.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/tests/mochitest/localstorage/test_localStorageOriginsPortDiffs.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,41 @@
     1.4 +<html xmlns="http://www.w3.org/1999/xhtml">
     1.5 +<head>
     1.6 +<title>localStorage different port numbers</title>
     1.7 +
     1.8 +<script src="/resources/testharness.js"></script>
     1.9 +<script src="/resources/testharnessreport.js"></script>
    1.10 +<script src="interOriginTest2.js"></script>
    1.11 +
    1.12 +<!--
    1.13 +  This test loads two frames from different
    1.14 +  origins and checks that entries of localStorage
    1.15 +  objects don't leak each between other.
    1.16 +
    1.17 +  The subsystem is based on postMessage and addEventListener
    1.18 +  to send messages among different origins. The subsystem waits
    1.19 +  for both frames be loaded and then alternately calls each frames'
    1.20 +  doStep() function that on each call proceeds with a single step
    1.21 +  of the test on its side. This way the subsystem alternate between
    1.22 +  both frames until both sequences completely finish.
    1.23 +-->
    1.24 +
    1.25 +<script type="text/javascript">
    1.26 +
    1.27 +function startTest()
    1.28 +{
    1.29 +  masterFrameOrigin = "http://example.org:80";
    1.30 +  slaveFrameOrigin = "http://example.org:8000";
    1.31 +
    1.32 +  masterFrame.location = masterFrameOrigin + framePath + "frameMasterNotEqual.html";
    1.33 +  slaveFrame.location = slaveFrameOrigin + framePath + "frameSlaveNotEqual.html";
    1.34 +}
    1.35 +
    1.36 +</script>
    1.37 +
    1.38 +</head>
    1.39 +
    1.40 +<body onload="startTest();">
    1.41 +  <iframe src="" name="masterFrame"></iframe>
    1.42 +  <iframe src="" name="slaveFrame"></iframe>
    1.43 +</body>
    1.44 +</html>

mercurial