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