diff options
Diffstat (limited to 'testing/web-platform/tests/performance-timeline/resources/postmessage-entry.html')
-rw-r--r-- | testing/web-platform/tests/performance-timeline/resources/postmessage-entry.html | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testing/web-platform/tests/performance-timeline/resources/postmessage-entry.html b/testing/web-platform/tests/performance-timeline/resources/postmessage-entry.html new file mode 100644 index 0000000000..ef5be73395 --- /dev/null +++ b/testing/web-platform/tests/performance-timeline/resources/postmessage-entry.html @@ -0,0 +1,17 @@ +<!doctype html> +<script> +addEventListener("load", () => { + const entry = performance.getEntriesByType("navigation")[0]; + try { + window.top.postMessage(entry, "*"); + } catch(error) { + if (error.name == "DataCloneError") { + window.top.postMessage("PASS", "*"); + } else { + window.top.postMessage("FAIL - Wrong exception name: " + error.name, "*"); + } + } + window.top.postMessage("FAIL - No exception thrown", "*"); +}); + +</script> |