2011-01-16 08:58:49 -08:00
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
|
<head>
|
|
|
|
<title>bug 624047</title>
|
|
|
|
|
|
|
|
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
|
|
<script type="text/javascript" src="interOriginTest.js"></script>
|
|
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
|
|
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
|
|
|
|
|
|
|
/*
|
|
|
|
This test does the folliwing:
|
|
|
|
- loads a page in an iframe that stores a value to localStorage
|
|
|
|
- sooner then in 5 seconds reloads the page
|
|
|
|
- now the page later then 5 seconds after load in the first step checks the
|
|
|
|
value is still present in localStorage (what is expected)
|
|
|
|
- if not, the bug is still present
|
|
|
|
*/
|
|
|
|
|
|
|
|
function flushTables()
|
|
|
|
{
|
|
|
|
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
|
|
|
var storageManager = Components.classes["@mozilla.org/dom/storagemanager;1"]
|
|
|
|
.getService(Components.interfaces.nsIObserver);
|
2011-11-04 15:27:59 -07:00
|
|
|
storageManager.observe(null, "domstorage-flush-force", null);
|
2011-01-16 08:58:49 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
function startTest()
|
|
|
|
{
|
|
|
|
slaveOrigin = "http://sub2.test2.example.org";
|
|
|
|
slave = document.getElementById("__test_frame").contentWindow;
|
|
|
|
|
|
|
|
flushTables();
|
|
|
|
slave.location = slaveOrigin + slavePath + "frameBug624047.html";
|
|
|
|
setTimeout(function() {
|
|
|
|
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
|
|
|
slaveLoadsPending = 1;
|
|
|
|
slave.location.reload();
|
|
|
|
}, 2000);
|
|
|
|
}
|
|
|
|
|
|
|
|
function doNextTest()
|
|
|
|
{
|
|
|
|
SimpleTest.finish();
|
|
|
|
}
|
|
|
|
|
|
|
|
function doStep()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
SimpleTest.waitForExplicitFinish();
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body onload="startTest();">
|
|
|
|
This test takes about 15s to complete... Please wait...
|
|
|
|
<br/>
|
|
|
|
<iframe src="" id="__test_frame"></iframe>
|
|
|
|
</body>
|
|
|
|
</html>
|