Revision 76b698ccc365dd382683fc7c8f31e346ad9939e8 authored by xiaojunwu on 10 December 2013, 01:42:17 UTC, committed by xiaojunwu on 10 December 2013, 01:42:17 UTC
1 parent 6b6c83f
event_session_storageeventinit.html
<!DOCTYPE HTML>
<html>
<head>
<title>Web Storage</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<h1>event_session_StorageEventInit</h1>
<div id="log"></div>
<script>
test(function() {
var t = async_test("storageeventinit test");
function onStorageEvent(event) {
t.step(function() {
assert_equals(event.key, 'key');
assert_equals(event.oldValue, 'oldValue');
assert_equals(event.newValue, 'newValue');
assert_equals(event.url, window.location.href);
assert_equals(event.storageArea, window.sessionStorage);
});
t.done();
}
window.addEventListener('storage', onStorageEvent, false);
var event = new StorageEvent('storage', {
key: 'key',
oldValue: 'oldValue',
newValue: 'newValue',
url: window.location.href,
storageArea: window.sessionStorage
});
window.dispatchEvent(event);
});
</script>
</body>
</html>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...