diff options
Diffstat (limited to 'testing/web-platform/tests/performance-timeline/tentative/include-frames-one-remote-child.sub.html')
-rw-r--r-- | testing/web-platform/tests/performance-timeline/tentative/include-frames-one-remote-child.sub.html | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/testing/web-platform/tests/performance-timeline/tentative/include-frames-one-remote-child.sub.html b/testing/web-platform/tests/performance-timeline/tentative/include-frames-one-remote-child.sub.html new file mode 100644 index 0000000000..61e7a1f648 --- /dev/null +++ b/testing/web-platform/tests/performance-timeline/tentative/include-frames-one-remote-child.sub.html @@ -0,0 +1,36 @@ +<!DOCTYPE html> +<head> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +</head> +<body> +</body> +<script> +promise_test(() => { + return new Promise(resolve => { + performance.clearResourceTimings() + + // Create Remote child iframe. + const childFrame = document.createElement('iframe') + childFrame.src = "http://{{hosts[][www]}}:{{ports[http][0]}}/resources/child-frame.html" + document.body.appendChild(childFrame) + + childFrame.addEventListener("load", () => { + const entries = performance.getEntries(true) + const navigationEntries = performance.getEntriesByType("navigation", true) + const markedEntries = performance.getEntriesByName("entry-name", undefined, true) + + // 3 entries for parent, 0 for child. + assert_equals(entries.length, 3) + + // 1 entry for parent. + assert_equals(navigationEntries.length, 1) + + // 0 entries. + assert_equals(markedEntries.length, 0) + + resolve() + }) + }) +}, "GetEntries of a parent Frame with one Cross-Origin child") +</script>
\ No newline at end of file |