tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

frameNotEqual.html (857B)


      1 <html xmlns="http://www.w3.org/1999/xhtml">
      2 <head>
      3 <title>slave for sessionStorage test</title>
      4 
      5 <script type="text/javascript" src="interOriginSlave.js"></script>
      6 <script type="text/javascript">
      7 
      8 var currentStep = 2;
      9 
     10 function doStep()
     11 {
     12  var expect = 0;
     13  switch (currentStep)
     14  {
     15    case 2:
     16      is(sessionStorage.length, 0, `Num of items is 0`);
     17 
     18      sessionStorage.setItem("C", "3");
     19 
     20      is(sessionStorage.getItem("C"), "3", "C is 3 in the slave");
     21      is(sessionStorage.length, 1, `Num of items is 1`);
     22      break;
     23 
     24    case 4:
     25      is(sessionStorage.getItem("C"), "3", "C is 3 in the slave");
     26      is(sessionStorage.length, 1, `Num of items is 1`);
     27      break;
     28 
     29    case 6:
     30      return finishTest();
     31  }
     32 
     33  ++currentStep;
     34  ++currentStep;
     35 
     36  return true;
     37 }
     38 
     39 </script>
     40 
     41 </head>
     42 
     43 <body onload="postMsg('frame loaded');">
     44 </body>
     45 </html>