blob: c656448f5a2c531603a8298fe9885ecf79f1b20e [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="../resources/js-test.js"></script>
<script>
window.jsTestIsAsync = true;
description("Detaching a frame should bypass it's cached permissionclient state in StorageAreaProxy.");
if (window.testRunner && testRunner.setStorageAllowed)
testRunner.setStorageAllowed(true);
var frame, storage;
window.onload = function () {
frame = document.querySelector('iframe');
storage = frame.contentWindow.localStorage;
frame.parentElement.removeChild(frame);
shouldThrow("storage.length");
shouldThrow("storage.getItem('foo')");
shouldThrow("storage.setItem('foo', 'bar')");
shouldThrow("storage.key(0)");
shouldThrow("storage.clear()");
finishJSTest();
};
</script>
</head>
<body>
<iframe srcdoc=""></iframe>
</body>
</html>