summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/cookie-store/cookieStore_in_detached_frame.https.html
blob: 08a7b5b8e4629440956943489dd7fa7ca200b537 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!doctype html>
<meta charset="utf-8">
<title>cookieStore on DOMWindow of detached iframe (crbug.com/774626)</title>
<link rel="help" href="https://github.com/WICG/cookie-store">
<link rel="author" href="pwnall@chromium.org" title="Victor Costan">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<iframe id="iframe"></iframe>
<script>
'use strict';

test(() => {
  const iframe = document.getElementById('iframe');
  const frameWindow = iframe.contentWindow;

  iframe.parentNode.removeChild(iframe);
  assert_equals(null, frameWindow.cookieStore);
});
</script>