1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/tests/mochitest/localstorage/frameMasterNotEqual.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>frame for localStorage test</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 = 1; 1.12 + 1.13 +function doStep() 1.14 +{ 1.15 + switch (currentStep) 1.16 + { 1.17 + case 1: 1.18 + localStorage.setItem("X", "1"); 1.19 + is(localStorage.getItem("X"), "1", "X is 1 in the master"); 1.20 + break; 1.21 + 1.22 + case 3: 1.23 + is(localStorage.getItem("X"), "1", "X remains 1 in the master"); 1.24 + localStorage.removeItem("X"); 1.25 + is(localStorage.getItem("X"), null, "X was removed from the master"); 1.26 + break; 1.27 + 1.28 + case 5: 1.29 + is(localStorage.getItem("Y"), null, "Y null in the master"); 1.30 + break; 1.31 + 1.32 + case 7: 1.33 + return finishTest(); 1.34 + } 1.35 + 1.36 + // Increase by two to distinguish each test step order 1.37 + // in both master doStep and slave doStep functions. 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>