blob: 20f4f3d7896a10eb5380fe0a08a85be49211780a [file] [log] [blame]
<html>
<head>
<link rel="stylesheet" href="../../../../fast/js/resources/js-test-style.css">
<script src="../../../../fast/js/resources/js-test-pre.js"></script>
<script src="../../../../fast/js/resources/js-test-post-function.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script>
description("StorageTracker test - write local storage for this origin. Should be called after origins-prepare.html.");
if (window.layoutTestController)
layoutTestController.waitUntilDone();
function finishTest() {
if (window.layoutTestController)
layoutTestController.notifyDone();
}
function test()
{
if (!window.localStorage) {
testFailed("localStorage DOES NOT exist");
return;
}
if (layoutTestController.originsWithLocalStorage().length > 0) {
// An origin already exists so we can exit.
testFailed("An origin already existed with local storage.");
layoutTestController.notifyDone();
} else {
layoutTestController.syncLocalStorage();
localStorage.someData = 'writeme';
// LayoutTestController's notifyDone will be called after the origin change notification comes in.
layoutTestController.observeStorageTrackerNotifications(1);
}
}
test();
window.successfullyParsed = true;
isSuccessfullyParsed();
</script>
</body>
</html>