From 43a97878ce14b72f0981164f87f2e35e14151312 Mon Sep 17 00:00:00 2001
From: Daniel Baumann This tests that a image document has positive-value domInteractive. This tests that a media document has positive-value domInteractive. This test validates that PerformanceObserver can observe nav timing 2 instance and that the expected attributes in nav timing 2 instance exist (but does not validate that the values are correct). This test validates that the values of nav timing 2 instance's timing-related attributes are in certain order and the others are of expected values. This test validates window.performance.getEntriesByType("navigation") remains constant when a
+ document is replaced using document.open. This page should be loaded with a yellow frame below. It then replaces the
+ document in that frame with a green document. The test passes if all of the checks to performance.getEntriesByType("navigation") are correct and
+ the frame below ends with a green background.
+ This test validates that a PerformanceNavigatingTiming corresponding to a detached document can't access a different document's state.
+ This test validates that PerformanceNavigationTiming::type()'s default value is navigate This test validates that nav timing 2 instance can be accessed by three different accessors once available: window.performance.getEntries()/getEntriesByType("navigation")/getEntriesByName("document") This test validates that all of the window.performance.getEntriesByType("navigation") attributes remain unchanged after an in document navigation (URL fragment change).
+ This test validates the value of window.performance.getEntriesByType("navigation")[0].type with a forward
+ and back navigation. This page should be loaded with a yellow background frame below. It should turn green for a starting
+ navigation, back to yellow for a back navigation and then back to green again for a forward navigation. Along the navigation timeline the window.performance.getEntriesByType("navigation")[0].type is checked for back_forward. This test passes if all of the checks to the window.performance.getEntriesByType("navigation")[0].type are correct throughout the navigation
+ scenario and the frame below ends with a green background. Otherwise, this test fails.
+ This test validates the value of window.performance.getEntriesByType("navigation")[0].type to be navigate. This test validates the value of window.performance.getEntriesByType("navigation")[0].(type/unloadEventEnd/unloadEventStart) with a reloaded navigation. This page should be loaded with a green background frame below. The frame will be automatically reloaded
+ and then verified that
+ Description
+ Description
+ Description
+ Description
+ Description
+
+ Description
+
+ Description
+ Description
+ Description
+
+ Description
+
+ Description
+ Description
+
+
+
This test validates the values of the window.performance.getEntriesByType("navigation")[0].redirectCount and the + window.performance.getEntriesByType("navigation")[0].redirectStart/End times for a cross-origin server side redirect navigation when the final + document is the same as the original origin.
+ + + + + diff --git a/testing/web-platform/tests/navigation-timing/nav2-test-redirect-chain-xserver-partial-opt-in.html b/testing/web-platform/tests/navigation-timing/nav2-test-redirect-chain-xserver-partial-opt-in.html new file mode 100644 index 0000000000..0feb3bfa7f --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/nav2-test-redirect-chain-xserver-partial-opt-in.html @@ -0,0 +1,52 @@ + + + + +This test validates the values of the window.performance.getEntriesByType("navigation")[0].redirectCount and the + window.performance.getEntriesByType("navigation")[0].redirectStart/End times for a cross-origin server side redirect navigation when the redirect chooses to opt-in.
+ + + + + diff --git a/testing/web-platform/tests/navigation-timing/nav2-test-redirect-none.html b/testing/web-platform/tests/navigation-timing/nav2-test-redirect-none.html new file mode 100644 index 0000000000..97437e1a5e --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/nav2-test-redirect-none.html @@ -0,0 +1,33 @@ + + + + +This test validates that the value of the window.performance.getEntriesByType("navigation")[0].redirectCount attribute, as well as the window.performance.getEntriesByType("navigation")[0].redirectStart and redirectEnd attributes on a non-redirected navigation.
+ + + + \ No newline at end of file diff --git a/testing/web-platform/tests/navigation-timing/nav2-test-redirect-server.html b/testing/web-platform/tests/navigation-timing/nav2-test-redirect-server.html new file mode 100644 index 0000000000..9ec2992bef --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/nav2-test-redirect-server.html @@ -0,0 +1,49 @@ + + + + +This test validates the values of the window.performance.redirectCount and the + window.performance.timing.redirectStart/End times for a same-origin server side redirect navigation.
+ + + + diff --git a/testing/web-platform/tests/navigation-timing/nav2-test-redirect-xserver.html b/testing/web-platform/tests/navigation-timing/nav2-test-redirect-xserver.html new file mode 100644 index 0000000000..d8acc8054d --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/nav2-test-redirect-xserver.html @@ -0,0 +1,50 @@ + + + + +This test validates the values of the window.performance.getEntriesByType("navigation")[0].redirectCount and the + window.performance.getEntriesByType("navigation")[0].redirectStart/End times for a cross-origin server side redirect navigation.
+ + + + + diff --git a/testing/web-platform/tests/navigation-timing/nav2-test-response-end-and-duration-before-during-and-after-load-event.html b/testing/web-platform/tests/navigation-timing/nav2-test-response-end-and-duration-before-during-and-after-load-event.html new file mode 100644 index 0000000000..3876ce7e86 --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/nav2-test-response-end-and-duration-before-during-and-after-load-event.html @@ -0,0 +1,27 @@ + + + + + + + + + + diff --git a/testing/web-platform/tests/navigation-timing/nav2-test-unique-nav-instances.html b/testing/web-platform/tests/navigation-timing/nav2-test-unique-nav-instances.html new file mode 100644 index 0000000000..1d77ab6bae --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/nav2-test-unique-nav-instances.html @@ -0,0 +1,76 @@ + + + + +This test validates that each window has a unique nav timing 2 instance.
+ + + + diff --git a/testing/web-platform/tests/navigation-timing/navigation-type-post-backforward.html b/testing/web-platform/tests/navigation-timing/navigation-type-post-backforward.html new file mode 100644 index 0000000000..1fbdf1ae9b --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/navigation-type-post-backforward.html @@ -0,0 +1,64 @@ + + + + ++Navigation will queue a PerformanceEntry. +
+ + diff --git a/testing/web-platform/tests/navigation-timing/prefetch-transfer-size-executor.html b/testing/web-platform/tests/navigation-timing/prefetch-transfer-size-executor.html new file mode 100644 index 0000000000..b791fd89b6 --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/prefetch-transfer-size-executor.html @@ -0,0 +1,66 @@ + + + + +Placeholder
+ + + + diff --git a/testing/web-platform/tests/navigation-timing/resources/navigation-type-post-back.html b/testing/web-platform/tests/navigation-timing/resources/navigation-type-post-back.html new file mode 100644 index 0000000000..8c19a2f5a5 --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/resources/navigation-type-post-back.html @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/testing/web-platform/tests/navigation-timing/resources/navigation_type_post_back.py b/testing/web-platform/tests/navigation-timing/resources/navigation_type_post_back.py new file mode 100644 index 0000000000..9da06f4f03 --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/resources/navigation_type_post_back.py @@ -0,0 +1,12 @@ +# Accoridng to routes.py in the wpt server implementation, POST method is +# handled by a Python script handler which requires this file to return an html. +def main(request, response): + content = """ + + + + navigate away. + + + """ + return content diff --git a/testing/web-platform/tests/navigation-timing/resources/performance-attribute-sender.html b/testing/web-platform/tests/navigation-timing/resources/performance-attribute-sender.html new file mode 100644 index 0000000000..99f544690d --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/resources/performance-attribute-sender.html @@ -0,0 +1,13 @@ + + + + + + diff --git a/testing/web-platform/tests/navigation-timing/resources/respond-slowly.py b/testing/web-platform/tests/navigation-timing/resources/respond-slowly.py new file mode 100644 index 0000000000..e58e16f1f0 --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/resources/respond-slowly.py @@ -0,0 +1,29 @@ +import time + + +def main(request, response): + head = b"""""" + response.headers.set(b"Content-Length", str(len(head) + 1000)) + response.headers.set(b"Content-Type", b"text/html") + response.write_status_headers() + response.writer.write_content(head) + for i in range(100): + response.writer.write_content(b"1234567890") + time.sleep(0.01) diff --git a/testing/web-platform/tests/navigation-timing/resources/secure-connection-interim.html b/testing/web-platform/tests/navigation-timing/resources/secure-connection-interim.html new file mode 100644 index 0000000000..e40b00bedb --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/resources/secure-connection-interim.html @@ -0,0 +1,8 @@ + + +