chromium/third_party/blink/web_tests/http/tests/security/detached-window-cross-origin-access.html

<!DOCTYPE html>
<html>
<head>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
var t = async_test("Test that cross-origin access on a detached window throws a SecurityError.");
window.onload = t.step_func(function () {
  var detachedWindow = window[0];
  document.querySelector('iframe').remove();
  test(function() {
    assert_throws_dom("SecurityError", function () {
      window.requestAnimationFrame.call(detachedWindow, function () { });
    });
  }, "method call with detached window receiver should throw");
  test(function() {
    assert_throws_dom("SecurityError", function () {
      Object.getOwnPropertyDescriptor(window, "document").get.call(detachedWindow);
    });
  }, "attribute access with detached window receiver should throw");
  t.done();
});
</script>
</head>
<body>
<iframe src="data:text/html,"></iframe>
</body>
</html>