dom/tests/mochitest/storageevent/test_storageLocalStorageEventCheckNoPropagation.html

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 <html xmlns="http://www.w3.org/1999/xhtml">
     2 <head>
     3 <title>storage event propagation test</title>
     5 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     6 <script type="text/javascript" src="interOriginTest2.js"></script>
     7 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
     9 <!--
    10   This test loads two frames from different
    11   origins and checks that entries of localStorage
    12   objects don't leak each between other.
    14   The subsystem is based on postMessage and addEventListener
    15   to send messages among different origins. The subsystem waits
    16   for both frames be loaded and then alternately calls each frames'
    17   doStep() function that on each call proceeds with a single step
    18   of the test on its side. This way the subsystem alternate between
    19   both frames until both sequences completely finish.
    20 -->
    22 <script type="text/javascript">
    24 function startTest()
    25 {
    26   masterFrameOrigin = "http://example.com:80";
    27   slaveFrameOrigin = "http://example.org:80";
    29   masterFrame.location = masterFrameOrigin + framePath + "frameLocalStorageMaster.html";
    30   slaveFrame.location = slaveFrameOrigin + framePath + "frameLocalStorageSlaveNotEqual.html";
    31 }
    33 SimpleTest.waitForExplicitFinish();
    35 </script>
    37 </head>
    39 <body onload="startTest();">
    40   <iframe src="" name="masterFrame"></iframe>
    41   <iframe src="" name="slaveFrame"></iframe>
    42 </body>
    43 </html>

mercurial