1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/tests/mochitest/storageevent/test_storageLocalStorageEventCheckPropagation.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,43 @@ 1.4 +<html xmlns="http://www.w3.org/1999/xhtml"> 1.5 +<head> 1.6 +<title>storage event propagation test</title> 1.7 + 1.8 +<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.9 +<script type="text/javascript" src="interOriginTest2.js"></script> 1.10 +<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 1.11 + 1.12 +<!-- 1.13 + This test loads two frames from different 1.14 + origins and checks that entries of localStorage 1.15 + objects don't leak each between other. 1.16 + 1.17 + The subsystem is based on postMessage and addEventListener 1.18 + to send messages among different origins. The subsystem waits 1.19 + for both frames be loaded and then alternately calls each frames' 1.20 + doStep() function that on each call proceeds with a single step 1.21 + of the test on its side. This way the subsystem alternate between 1.22 + both frames until both sequences completely finish. 1.23 +--> 1.24 + 1.25 +<script type="text/javascript"> 1.26 + 1.27 +function startTest() 1.28 +{ 1.29 + masterFrameOrigin = "http://example.com:80"; 1.30 + slaveFrameOrigin = "http://example.com:80"; 1.31 + 1.32 + masterFrame.location = masterFrameOrigin + framePath + "frameLocalStorageMaster.html"; 1.33 + slaveFrame.location = slaveFrameOrigin + framePath + "frameLocalStorageSlaveEqual.html"; 1.34 +} 1.35 + 1.36 +SimpleTest.waitForExplicitFinish(); 1.37 + 1.38 +</script> 1.39 + 1.40 +</head> 1.41 + 1.42 +<body onload="startTest();"> 1.43 + <iframe src="" name="masterFrame"></iframe> 1.44 + <iframe src="" name="slaveFrame"></iframe> 1.45 +</body> 1.46 +</html>