| <!doctype html> |
| <script src="/resources/testharness.js"></script> |
| <script src="/resources/testharnessreport.js"></script> |
| <iframe id="i"></iframe> |
| <script> |
| promise_test(async t => { |
| let iframe_constructor = i.contentWindow.DOMException; |
| let i_win = i.contentWindow; |
| i.remove(); |
| |
| i_win.appHistory.onnavigate = t.unreached_func("onnavigate"); |
| await promise_rejects_dom(t, "InvalidStateError", iframe_constructor, i_win.appHistory.reload({ state: document.body })); |
| }, `reload() with unserializable state in a detached iframe throws "InvalidStateError", not "DataCloneError"`); |
| </script> |