dom/tests/mochitest/storageevent/frameLocalStorageSlaveNotEqual.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/tests/mochitest/storageevent/frameLocalStorageSlaveNotEqual.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,39 @@
     1.4 +<html xmlns="http://www.w3.org/1999/xhtml">
     1.5 +<head>
     1.6 +<title>slave for storage event propagation</title>
     1.7 +
     1.8 +<script type="text/javascript" src="interOriginFrame.js"></script>
     1.9 +<script type="text/javascript">
    1.10 +
    1.11 +var currentStep = 2;
    1.12 +var gotEvent = false;
    1.13 +
    1.14 +window.addEventListener("storage", function(event)
    1.15 +{
    1.16 +  gotEvent = true;
    1.17 +}, false);
    1.18 +
    1.19 +function doStep()
    1.20 +{
    1.21 +  switch (currentStep)
    1.22 +  {
    1.23 +    case 10:
    1.24 +      is(gotEvent, false, "Expected no events");
    1.25 +      break;
    1.26 +  }
    1.27 +
    1.28 +  // Increase by two to distinguish each test step order
    1.29 +  // in both master doStep and slave doStep functions.
    1.30 +  ++currentStep;
    1.31 +  ++currentStep;
    1.32 +
    1.33 +  return true;
    1.34 +}
    1.35 +
    1.36 +</script>
    1.37 +
    1.38 +</head>
    1.39 +
    1.40 +<body onload="postMsg('frame loaded');">
    1.41 +</body>
    1.42 +</html>

mercurial