dom/tests/mochitest/sessionstorage/frameEqual.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/tests/mochitest/sessionstorage/frameEqual.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,47 @@
     1.4 +<html xmlns="http://www.w3.org/1999/xhtml">
     1.5 +<head>
     1.6 +<title>slave for sessionStorage test</title>
     1.7 +
     1.8 +<script type="text/javascript" src="interOriginSlave.js"></script>
     1.9 +<script type="text/javascript">
    1.10 +
    1.11 +var currentStep = 2;
    1.12 +
    1.13 +function doStep()
    1.14 +{
    1.15 +  switch (currentStep)
    1.16 +  {
    1.17 +    case 2:
    1.18 +      is(sessionStorage.getItem("A"), "1", "A is 1 in the slave");
    1.19 +      is(sessionStorage.getItem("B"), "2", "B is 2 in the slave");
    1.20 +      is(sessionStorage.length, 2, "Num of items is 2");
    1.21 +
    1.22 +      sessionStorage.setItem("C", "3");
    1.23 +      is(sessionStorage.getItem("C"), "3", "C is 3 in the slave");
    1.24 +      is(sessionStorage.length, 3, "Num of items is 3");
    1.25 +      break;
    1.26 +
    1.27 +    case 4:
    1.28 +      is(sessionStorage.getItem("A"), "1", "A is 1 in the slave");
    1.29 +      is(sessionStorage.getItem("B"), "2", "B is 2 in the slave");
    1.30 +      is(sessionStorage.getItem("C"), "3", "C is 3 in the slave");
    1.31 +      is(sessionStorage.length, 3, "Num of items is 3");
    1.32 +      break;
    1.33 +
    1.34 +    case 6:
    1.35 +      return finishTest();
    1.36 +  }
    1.37 +
    1.38 +  ++currentStep;
    1.39 +  ++currentStep;
    1.40 +
    1.41 +  return true;
    1.42 +}
    1.43 +
    1.44 +</script>
    1.45 +
    1.46 +</head>
    1.47 +
    1.48 +<body onload="postMsg('frame loaded');">
    1.49 +</body>
    1.50 +</html>

mercurial