1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/tests/browser/page_privatestorageevent.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,22 @@ 1.4 +<html> 1.5 +<body> 1.6 +la la la la 1.7 +<script> 1.8 + var gotStorageEvent = false; 1.9 + window.addEventListener('storage', function(ev) { 1.10 + gotStorageEvent = true; 1.11 + }, false); 1.12 + 1.13 + window.addEventListener('message', function(ev) { 1.14 + if (['data:true', 'data:false', 'reply'].indexOf(ev.data) != -1) 1.15 + return; 1.16 + if (ev.data == 'query?') { 1.17 + postMessage('data:' + gotStorageEvent, 'http://mochi.test:8888'); 1.18 + return; 1.19 + } 1.20 + localStorage['key'] = 'ablooabloo'; 1.21 + postMessage('reply', 'http://mochi.test:8888'); 1.22 + }, false); 1.23 +</script> 1.24 +</body> 1.25 +</html>