Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / fetch / chromium / discarded-window.html
blob2c13c5da28ea065f0f46fdf5b9ef9798e8269057
1 <!doctype html>
2 <iframe id="iframe"></iframe>
3 <script src="/resources/testharness.js"></script>
4 <script src="/resources/testharnessreport.js"></script>
5 <script>
6 test(function(test) {
7 var iframe = document.getElementById('iframe');
8 var w = iframe.contentWindow;
9 iframe.remove();
11 assert_not_equals(w.fetch, undefined,
12 'A discarded window should have |fetch| function.');
13 // NOTE: This is not explicitly specified as far as I know. This behavior
14 // may be Blink specific.
15 assert_equals(w.fetch('/fetch/resources/doctype.html'), undefined,
16 '|fetch| on a discarded window returns undefined, not a Promise.');
17 });
18 </script>