diff options
Diffstat (limited to 'LayoutTests/storage/domstorage/localstorage/resources/iframe-events-second.html')
-rw-r--r-- | LayoutTests/storage/domstorage/localstorage/resources/iframe-events-second.html | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/LayoutTests/storage/domstorage/localstorage/resources/iframe-events-second.html b/LayoutTests/storage/domstorage/localstorage/resources/iframe-events-second.html new file mode 100644 index 0000000..2ab8ba1 --- /dev/null +++ b/LayoutTests/storage/domstorage/localstorage/resources/iframe-events-second.html @@ -0,0 +1,24 @@ +<html> +<head> +<script> +function handleStorageEvent(e) +{ + parent.log("Subframe received storage event:"); + parent.log("Key - " + e.key); + parent.log("New Value - " + e.newValue); + parent.log("Old Value - " + e.oldValue); + parent.log("URI - " + parent.normalizeURL(e.uri)); + parent.log("Storage Area - " + ((e.storageArea == window.localStorage) ? "This window's window.localStorage" : "Another window's window.localStorage")); + parent.log(""); + + if (e.key != "Subframe") { + parent.log("Subframe about to change localStorage..."); + localStorage.setItem("Subframe", "SET"); + } +} +</script> +</head> +<body onload="window.addEventListener('storage', handleStorageEvent, false);"> +This is the subframe which exists to make sure that both frames of a same security origin receive the event for that origin's localStorage object mutating +</body> +</html> |