dom/tests/mochitest/storageevent/frameSessionStorageSlaveNotEqual.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>slave for storage event propagation</title>
     5 <script type="text/javascript" src="interOriginFrame.js"></script>
     6 <script type="text/javascript">
     8 var currentStep = 2;
     9 var gotEvent = false;
    11 window.addEventListener("storage", function(event)
    12 {
    13   gotEvent = true;
    14 }, false);
    16 function doStep()
    17 {
    18   switch (currentStep)
    19   {
    20     case 10:
    21       is(gotEvent, false, "Expected no events");
    22       break;
    23   }
    25   // Increase by two to distinguish each test step order
    26   // in both master doStep and slave doStep functions.
    27   ++currentStep;
    28   ++currentStep;
    30   return true;
    31 }
    33 </script>
    35 </head>
    37 <body onload="postMsg('frame loaded');">
    38 </body>
    39 </html>

mercurial