dom/tests/mochitest/localstorage/frameMasterNotEqual.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <html xmlns="http://www.w3.org/1999/xhtml">
     2 <head>
     3 <title>frame for localStorage test</title>
     5 <script type="text/javascript" src="interOriginFrame.js"></script>
     6 <script type="text/javascript">
     8 var currentStep = 1;
    10 function doStep()
    11 {
    12   switch (currentStep)
    13   {
    14     case 1:
    15       localStorage.setItem("X", "1");
    16       is(localStorage.getItem("X"), "1", "X is 1 in the master");
    17       break;
    19     case 3:
    20       is(localStorage.getItem("X"), "1", "X remains 1 in the master");
    21       localStorage.removeItem("X");
    22       is(localStorage.getItem("X"), null, "X was removed from the master");
    23       break;
    25     case 5:
    26       is(localStorage.getItem("Y"), null, "Y null in the master");
    27       break;
    29     case 7:
    30       return finishTest();
    31   }
    33   // Increase by two to distinguish each test step order
    34   // in both master doStep and slave doStep functions.
    35   ++currentStep;
    36   ++currentStep;
    38   return true;
    39 }
    41 </script>
    43 </head>
    45 <body onload="postMsg('frame loaded');">
    46 </body>
    47 </html>

mercurial