From 43a97878ce14b72f0981164f87f2e35e14151312 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:22:09 +0200 Subject: Adding upstream version 110.0.1. Signed-off-by: Daniel Baumann --- .../web-platform/tests/navigation-timing/META.yml | 5 + .../navigation-timing/buffered-flag.window.js | 16 +++ .../dom-interactive-image-document.html | 25 ++++ .../dom-interactive-media-document.html | 25 ++++ .../tests/navigation-timing/idlharness.window.js | 20 +++ .../tests/navigation-timing/nav2-data-uri.html | 12 ++ .../nav2-test-attributes-exist.html | 67 ++++++++++ .../nav2-test-attributes-values.html | 137 +++++++++++++++++++++ .../navigation-timing/nav2-test-document-open.html | 102 +++++++++++++++ .../nav2-test-document-replaced.html | 60 +++++++++ .../navigation-timing/nav2-test-frame-removed.html | 27 ++++ ...v2-test-instance-accessible-from-the-start.html | 13 ++ .../nav2-test-instance-accessors.html | 78 ++++++++++++ .../nav2-test-navigate-iframe.html | 40 ++++++ .../nav2-test-navigate-within-document.html | 85 +++++++++++++ .../nav2-test-navigation-type-backforward.html | 82 ++++++++++++ .../nav2-test-navigation-type-navigate.html | 32 +++++ .../nav2-test-navigation-type-reload.html | 54 ++++++++ ...direct-chain-xserver-final-original-origin.html | 53 ++++++++ ...test-redirect-chain-xserver-partial-opt-in.html | 52 ++++++++ .../navigation-timing/nav2-test-redirect-none.html | 33 +++++ .../nav2-test-redirect-server.html | 49 ++++++++ .../nav2-test-redirect-xserver.html | 50 ++++++++ ...uration-before-during-and-after-load-event.html | 27 ++++ .../nav2-test-unique-nav-instances.html | 76 ++++++++++++ .../navigation-type-post-backforward.html | 64 ++++++++++ .../navigation-timing/nested-unload-timing.html | 62 ++++++++++ .../tests/navigation-timing/po-navigation.html | 29 +++++ .../prefetch-transfer-size-executor.html | 66 ++++++++++ .../prefetch-transfer-size-iframe.html | 51 ++++++++ .../resources/blank-page-green-with-onunload.html | 11 ++ .../resources/blank-page-green.html | 10 ++ .../resources/blank-page-meta-redirect.html | 11 ++ .../resources/blank-page-unload.html | 25 ++++ .../resources/blank-page-yellow-with-onunload.html | 11 ++ .../resources/blank-page-yellow.html | 10 ++ .../resources/blank_page_prefetch.html | 27 ++++ .../resources/blank_page_prefetch.html.headers | 1 + .../resources/iframe-prefetch-transfer-size.html | 31 +++++ .../resources/navigation-type-post-back.html | 10 ++ .../resources/navigation_type_post_back.py | 12 ++ .../resources/performance-attribute-sender.html | 13 ++ .../navigation-timing/resources/respond-slowly.py | 29 +++++ .../resources/secure-connection-interim.html | 8 ++ .../secure-connection-interim.html.headers | 3 + .../resources/secure-connection-test.html | 13 ++ .../resources/webperftestharness.js | 113 +++++++++++++++++ .../secure-connection-start-non-zero.https.html | 22 ++++ .../secure-connection-start-reuse.https.html | 15 +++ .../supported-navigation-type.window.js | 20 +++ .../navigation-timing/test-document-onload.html | 48 ++++++++ .../navigation-timing/test-document-open.html | 83 +++++++++++++ .../test-document-readiness-exist.html | 49 ++++++++ .../test-navigate-within-document.html | 67 ++++++++++ .../test-navigation-attributes-exist.html | 26 ++++ .../test-navigation-redirectCount-none.html | 31 +++++ .../test-navigation-type-backforward.html | 96 +++++++++++++++ .../test-navigation-type-enums.html | 28 +++++ .../test-navigation-type-reload.html | 109 ++++++++++++++++ .../test-no-previous-document.html | 42 +++++++ ...est-performance-attributes-exist-in-object.html | 29 +++++ .../test-performance-attributes-exist.html | 23 ++++ .../test-performance-attributes.sub.html | 29 +++++ .../tests/navigation-timing/test-readwrite.html | 28 +++++ .../test-timing-attributes-exist.html | 28 +++++ .../test-timing-attributes-order.html | 111 +++++++++++++++++ .../test-timing-client-redirect.html | 56 +++++++++ .../navigation-timing/test-timing-reload.html | 92 ++++++++++++++ .../test-timing-server-redirect.html | 49 ++++++++ .../test-timing-xserver-redirect.html | 72 +++++++++++ .../test-unique-performance-objects.html | 30 +++++ .../unload-event-same-origin-check.html | 125 +++++++++++++++++++ 72 files changed, 3138 insertions(+) create mode 100644 testing/web-platform/tests/navigation-timing/META.yml create mode 100644 testing/web-platform/tests/navigation-timing/buffered-flag.window.js create mode 100644 testing/web-platform/tests/navigation-timing/dom-interactive-image-document.html create mode 100644 testing/web-platform/tests/navigation-timing/dom-interactive-media-document.html create mode 100644 testing/web-platform/tests/navigation-timing/idlharness.window.js create mode 100644 testing/web-platform/tests/navigation-timing/nav2-data-uri.html create mode 100644 testing/web-platform/tests/navigation-timing/nav2-test-attributes-exist.html create mode 100644 testing/web-platform/tests/navigation-timing/nav2-test-attributes-values.html create mode 100644 testing/web-platform/tests/navigation-timing/nav2-test-document-open.html create mode 100644 testing/web-platform/tests/navigation-timing/nav2-test-document-replaced.html create mode 100644 testing/web-platform/tests/navigation-timing/nav2-test-frame-removed.html create mode 100644 testing/web-platform/tests/navigation-timing/nav2-test-instance-accessible-from-the-start.html create mode 100644 testing/web-platform/tests/navigation-timing/nav2-test-instance-accessors.html create mode 100644 testing/web-platform/tests/navigation-timing/nav2-test-navigate-iframe.html create mode 100644 testing/web-platform/tests/navigation-timing/nav2-test-navigate-within-document.html create mode 100644 testing/web-platform/tests/navigation-timing/nav2-test-navigation-type-backforward.html create mode 100644 testing/web-platform/tests/navigation-timing/nav2-test-navigation-type-navigate.html create mode 100644 testing/web-platform/tests/navigation-timing/nav2-test-navigation-type-reload.html create mode 100644 testing/web-platform/tests/navigation-timing/nav2-test-redirect-chain-xserver-final-original-origin.html create mode 100644 testing/web-platform/tests/navigation-timing/nav2-test-redirect-chain-xserver-partial-opt-in.html create mode 100644 testing/web-platform/tests/navigation-timing/nav2-test-redirect-none.html create mode 100644 testing/web-platform/tests/navigation-timing/nav2-test-redirect-server.html create mode 100644 testing/web-platform/tests/navigation-timing/nav2-test-redirect-xserver.html create mode 100644 testing/web-platform/tests/navigation-timing/nav2-test-response-end-and-duration-before-during-and-after-load-event.html create mode 100644 testing/web-platform/tests/navigation-timing/nav2-test-unique-nav-instances.html create mode 100644 testing/web-platform/tests/navigation-timing/navigation-type-post-backforward.html create mode 100644 testing/web-platform/tests/navigation-timing/nested-unload-timing.html create mode 100644 testing/web-platform/tests/navigation-timing/po-navigation.html create mode 100644 testing/web-platform/tests/navigation-timing/prefetch-transfer-size-executor.html create mode 100644 testing/web-platform/tests/navigation-timing/prefetch-transfer-size-iframe.html create mode 100644 testing/web-platform/tests/navigation-timing/resources/blank-page-green-with-onunload.html create mode 100644 testing/web-platform/tests/navigation-timing/resources/blank-page-green.html create mode 100644 testing/web-platform/tests/navigation-timing/resources/blank-page-meta-redirect.html create mode 100644 testing/web-platform/tests/navigation-timing/resources/blank-page-unload.html create mode 100644 testing/web-platform/tests/navigation-timing/resources/blank-page-yellow-with-onunload.html create mode 100644 testing/web-platform/tests/navigation-timing/resources/blank-page-yellow.html create mode 100644 testing/web-platform/tests/navigation-timing/resources/blank_page_prefetch.html create mode 100644 testing/web-platform/tests/navigation-timing/resources/blank_page_prefetch.html.headers create mode 100644 testing/web-platform/tests/navigation-timing/resources/iframe-prefetch-transfer-size.html create mode 100644 testing/web-platform/tests/navigation-timing/resources/navigation-type-post-back.html create mode 100644 testing/web-platform/tests/navigation-timing/resources/navigation_type_post_back.py create mode 100644 testing/web-platform/tests/navigation-timing/resources/performance-attribute-sender.html create mode 100644 testing/web-platform/tests/navigation-timing/resources/respond-slowly.py create mode 100644 testing/web-platform/tests/navigation-timing/resources/secure-connection-interim.html create mode 100644 testing/web-platform/tests/navigation-timing/resources/secure-connection-interim.html.headers create mode 100644 testing/web-platform/tests/navigation-timing/resources/secure-connection-test.html create mode 100644 testing/web-platform/tests/navigation-timing/resources/webperftestharness.js create mode 100644 testing/web-platform/tests/navigation-timing/secure-connection-start-non-zero.https.html create mode 100644 testing/web-platform/tests/navigation-timing/secure-connection-start-reuse.https.html create mode 100644 testing/web-platform/tests/navigation-timing/supported-navigation-type.window.js create mode 100644 testing/web-platform/tests/navigation-timing/test-document-onload.html create mode 100644 testing/web-platform/tests/navigation-timing/test-document-open.html create mode 100644 testing/web-platform/tests/navigation-timing/test-document-readiness-exist.html create mode 100644 testing/web-platform/tests/navigation-timing/test-navigate-within-document.html create mode 100644 testing/web-platform/tests/navigation-timing/test-navigation-attributes-exist.html create mode 100644 testing/web-platform/tests/navigation-timing/test-navigation-redirectCount-none.html create mode 100644 testing/web-platform/tests/navigation-timing/test-navigation-type-backforward.html create mode 100644 testing/web-platform/tests/navigation-timing/test-navigation-type-enums.html create mode 100644 testing/web-platform/tests/navigation-timing/test-navigation-type-reload.html create mode 100644 testing/web-platform/tests/navigation-timing/test-no-previous-document.html create mode 100644 testing/web-platform/tests/navigation-timing/test-performance-attributes-exist-in-object.html create mode 100644 testing/web-platform/tests/navigation-timing/test-performance-attributes-exist.html create mode 100644 testing/web-platform/tests/navigation-timing/test-performance-attributes.sub.html create mode 100644 testing/web-platform/tests/navigation-timing/test-readwrite.html create mode 100644 testing/web-platform/tests/navigation-timing/test-timing-attributes-exist.html create mode 100644 testing/web-platform/tests/navigation-timing/test-timing-attributes-order.html create mode 100644 testing/web-platform/tests/navigation-timing/test-timing-client-redirect.html create mode 100644 testing/web-platform/tests/navigation-timing/test-timing-reload.html create mode 100644 testing/web-platform/tests/navigation-timing/test-timing-server-redirect.html create mode 100644 testing/web-platform/tests/navigation-timing/test-timing-xserver-redirect.html create mode 100644 testing/web-platform/tests/navigation-timing/test-unique-performance-objects.html create mode 100644 testing/web-platform/tests/navigation-timing/unload-event-same-origin-check.html (limited to 'testing/web-platform/tests/navigation-timing') diff --git a/testing/web-platform/tests/navigation-timing/META.yml b/testing/web-platform/tests/navigation-timing/META.yml new file mode 100644 index 0000000000..bfb0e0f1f6 --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/META.yml @@ -0,0 +1,5 @@ +spec: https://w3c.github.io/navigation-timing/ +suggested_reviewers: + - plehegar + - igrigorik + - yoavweiss diff --git a/testing/web-platform/tests/navigation-timing/buffered-flag.window.js b/testing/web-platform/tests/navigation-timing/buffered-flag.window.js new file mode 100644 index 0000000000..c6b1e0bc85 --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/buffered-flag.window.js @@ -0,0 +1,16 @@ +async_test(t => { + function checkEntryList(entries) { + assert_equals(entries.length, 1, "Only one navigation timing entry"); + assert_equals(entries[0].entryType, "navigation", "entryType is \"navigation\""); + assert_equals(entries[0].name, window.location.toString(), "name is the address of the document"); + } + // First observer creates second in callback to ensure the entry has been dispatched by the time + // the second observer begins observing. + new PerformanceObserver(t.step_func(entryList => { + checkEntryList(entryList.getEntries()); + // Second observer requires 'buffered: true' to see the navigation entry. + new PerformanceObserver(t.step_func_done(list => { + checkEntryList(list.getEntries()); + })).observe({type: 'navigation', buffered: true}); + })).observe({entryTypes: ["navigation"]}); +}, "PerformanceObserver with buffered flag sees previous navigation entry."); diff --git a/testing/web-platform/tests/navigation-timing/dom-interactive-image-document.html b/testing/web-platform/tests/navigation-timing/dom-interactive-image-document.html new file mode 100644 index 0000000000..36742f0eff --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/dom-interactive-image-document.html @@ -0,0 +1,25 @@ + + + + + Test domInteractive on image document. + + + + + + + +

Description

+

This tests that a image document has positive-value domInteractive.

+ + + \ No newline at end of file diff --git a/testing/web-platform/tests/navigation-timing/dom-interactive-media-document.html b/testing/web-platform/tests/navigation-timing/dom-interactive-media-document.html new file mode 100644 index 0000000000..e4e45725d8 --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/dom-interactive-media-document.html @@ -0,0 +1,25 @@ + + + + + Test domInteractive on media document. + + + + + + + +

Description

+

This tests that a media document has positive-value domInteractive.

+ + + \ No newline at end of file diff --git a/testing/web-platform/tests/navigation-timing/idlharness.window.js b/testing/web-platform/tests/navigation-timing/idlharness.window.js new file mode 100644 index 0000000000..72cf0c3a3d --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/idlharness.window.js @@ -0,0 +1,20 @@ +// META: script=/resources/WebIDLParser.js +// META: script=/resources/idlharness.js +// META: timeout=long + +'use strict'; + +// http://www.w3.org/TR/navigation-timing/ + +idl_test( + ['navigation-timing', 'hr-time'], + ['resource-timing', 'performance-timeline', 'dom', 'html'], + idlArray => { + idlArray.add_objects({ + Performance: ['performance'], + PerformanceNavigation: ['performance.navigation'], + PerformanceTiming: ['performance.timing'], + PerformanceNavigationTiming: ['performance.getEntriesByType("navigation")[0]'] + }); + } +); diff --git a/testing/web-platform/tests/navigation-timing/nav2-data-uri.html b/testing/web-platform/tests/navigation-timing/nav2-data-uri.html new file mode 100644 index 0000000000..851691d6c4 --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/nav2-data-uri.html @@ -0,0 +1,12 @@ + +data URL source for navigation-timing/nav2_test_open_data_uri.html + + + diff --git a/testing/web-platform/tests/navigation-timing/nav2-test-attributes-exist.html b/testing/web-platform/tests/navigation-timing/nav2-test-attributes-exist.html new file mode 100644 index 0000000000..b6048e061b --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/nav2-test-attributes-exist.html @@ -0,0 +1,67 @@ + + + + + Navigation Timing 2 WPT + + + + + + +

Description

+

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).

+ + + + diff --git a/testing/web-platform/tests/navigation-timing/nav2-test-attributes-values.html b/testing/web-platform/tests/navigation-timing/nav2-test-attributes-values.html new file mode 100644 index 0000000000..f13a8988fc --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/nav2-test-attributes-values.html @@ -0,0 +1,137 @@ + + + + + Navigation Timing 2 WPT + + + + + + + +

Description

+

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.

+ + + + diff --git a/testing/web-platform/tests/navigation-timing/nav2-test-document-open.html b/testing/web-platform/tests/navigation-timing/nav2-test-document-open.html new file mode 100644 index 0000000000..aa1097248d --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/nav2-test-document-open.html @@ -0,0 +1,102 @@ + + + + + Navigation Timing 2 WPT + + + + + + + +

Description

+

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.

+ + + + diff --git a/testing/web-platform/tests/navigation-timing/nav2-test-document-replaced.html b/testing/web-platform/tests/navigation-timing/nav2-test-document-replaced.html new file mode 100644 index 0000000000..5972f20e9b --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/nav2-test-document-replaced.html @@ -0,0 +1,60 @@ + + + + + Navigation Timing 2 WPT + + + + + + + +

+ Description

+

+ This test validates that a PerformanceNavigatingTiming corresponding to a detached document can't access a different document's state.

+ + + diff --git a/testing/web-platform/tests/navigation-timing/nav2-test-frame-removed.html b/testing/web-platform/tests/navigation-timing/nav2-test-frame-removed.html new file mode 100644 index 0000000000..0bef297d4e --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/nav2-test-frame-removed.html @@ -0,0 +1,27 @@ + + + + + Navigation Timing 2 WPT + + + + + + + +

+ Description

+

+ This test validates that PerformanceNavigationTiming::type()'s default value is navigate

+ + + diff --git a/testing/web-platform/tests/navigation-timing/nav2-test-instance-accessible-from-the-start.html b/testing/web-platform/tests/navigation-timing/nav2-test-instance-accessible-from-the-start.html new file mode 100644 index 0000000000..ad50c6a87d --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/nav2-test-instance-accessible-from-the-start.html @@ -0,0 +1,13 @@ + + + + diff --git a/testing/web-platform/tests/navigation-timing/nav2-test-instance-accessors.html b/testing/web-platform/tests/navigation-timing/nav2-test-instance-accessors.html new file mode 100644 index 0000000000..17f36832c9 --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/nav2-test-instance-accessors.html @@ -0,0 +1,78 @@ + + + + + Navigation Timing 2 WPT + + + + + + + +

Description

+

This test validates that nav timing 2 instance can be accessed by three different accessors once available: window.performance.getEntries()/getEntriesByType("navigation")/getEntriesByName("document")

+ + + + diff --git a/testing/web-platform/tests/navigation-timing/nav2-test-navigate-iframe.html b/testing/web-platform/tests/navigation-timing/nav2-test-navigate-iframe.html new file mode 100644 index 0000000000..0c144bda45 --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/nav2-test-navigate-iframe.html @@ -0,0 +1,40 @@ + + + + + PerformanceNavigationTiming.name updated in iframes + + + + + + + diff --git a/testing/web-platform/tests/navigation-timing/nav2-test-navigate-within-document.html b/testing/web-platform/tests/navigation-timing/nav2-test-navigate-within-document.html new file mode 100644 index 0000000000..75e6e113b6 --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/nav2-test-navigate-within-document.html @@ -0,0 +1,85 @@ + + + + + Navigation Timing 2 WPT + + + + + + +

Description

+

This test validates that all of the window.performance.getEntriesByType("navigation") attributes remain unchanged after an in document navigation (URL fragment change).

+ + + + diff --git a/testing/web-platform/tests/navigation-timing/nav2-test-navigation-type-backforward.html b/testing/web-platform/tests/navigation-timing/nav2-test-navigation-type-backforward.html new file mode 100644 index 0000000000..d0045415b8 --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/nav2-test-navigation-type-backforward.html @@ -0,0 +1,82 @@ + + + + + Navigation Timing 2 WPT + + + + + + + + +

+ Description

+

+ 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.

+ + + + diff --git a/testing/web-platform/tests/navigation-timing/nav2-test-navigation-type-navigate.html b/testing/web-platform/tests/navigation-timing/nav2-test-navigation-type-navigate.html new file mode 100644 index 0000000000..efaef1ec0b --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/nav2-test-navigation-type-navigate.html @@ -0,0 +1,32 @@ + + + + + Navigation Timing 2 WPT + + + + + + + + +

+ Description

+

+ This test validates the value of window.performance.getEntriesByType("navigation")[0].type to be navigate.

+ + + diff --git a/testing/web-platform/tests/navigation-timing/nav2-test-navigation-type-reload.html b/testing/web-platform/tests/navigation-timing/nav2-test-navigation-type-reload.html new file mode 100644 index 0000000000..0f03f07c57 --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/nav2-test-navigation-type-reload.html @@ -0,0 +1,54 @@ + + + + + Navigation Timing 2 WPT + + + + + + + +

Description

+

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 +

+

+ + + + diff --git a/testing/web-platform/tests/navigation-timing/nav2-test-redirect-chain-xserver-final-original-origin.html b/testing/web-platform/tests/navigation-timing/nav2-test-redirect-chain-xserver-final-original-origin.html new file mode 100644 index 0000000000..fdefa20250 --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/nav2-test-redirect-chain-xserver-final-original-origin.html @@ -0,0 +1,53 @@ + + + + + Navigation Timing 2 WPT + + + + + + + + + +

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 @@ + + + + + Navigation Timing 2 WPT + + + + + + + + + +

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 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 @@ + + + + + Navigation Timing 2 WPT + + + + + + +

Description

+

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 @@ + + + + + Navigation Timing 2 WPT + + + + + + + + + +

Description

+

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 @@ + + + + + Navigation Timing 2 WPT + + + + + + + + + +

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.

+ + + + + 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 @@ + + + + + Navigation Timing 2 WPT + + + + + + +

Description

+

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 Type Post Back Forward + + + + + + + + + diff --git a/testing/web-platform/tests/navigation-timing/nested-unload-timing.html b/testing/web-platform/tests/navigation-timing/nested-unload-timing.html new file mode 100644 index 0000000000..1130fb6840 --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/nested-unload-timing.html @@ -0,0 +1,62 @@ + + + + + + Navigation Timing: unload event with nested contexts + + + + + + + + + diff --git a/testing/web-platform/tests/navigation-timing/po-navigation.html b/testing/web-platform/tests/navigation-timing/po-navigation.html new file mode 100644 index 0000000000..a54fb2aff8 --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/po-navigation.html @@ -0,0 +1,29 @@ + + +PerformanceObservers: navigation + + +

PerformanceObservers: navigation

+

+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 @@ + + + + + Navigation Timing Transfert Size of Prefetched Page + + + + + + + + + + + diff --git a/testing/web-platform/tests/navigation-timing/prefetch-transfer-size-iframe.html b/testing/web-platform/tests/navigation-timing/prefetch-transfer-size-iframe.html new file mode 100644 index 0000000000..316f78b955 --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/prefetch-transfer-size-iframe.html @@ -0,0 +1,51 @@ + + + + + Navigation Timing Transfert Size of Prefetched Page + + + + + + + + + + + diff --git a/testing/web-platform/tests/navigation-timing/resources/blank-page-green-with-onunload.html b/testing/web-platform/tests/navigation-timing/resources/blank-page-green-with-onunload.html new file mode 100644 index 0000000000..2f401747b0 --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/resources/blank-page-green-with-onunload.html @@ -0,0 +1,11 @@ + + + + + Green Test Page + + + +

Placeholder

+ + diff --git a/testing/web-platform/tests/navigation-timing/resources/blank-page-green.html b/testing/web-platform/tests/navigation-timing/resources/blank-page-green.html new file mode 100644 index 0000000000..b8a1947b77 --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/resources/blank-page-green.html @@ -0,0 +1,10 @@ + + + + + Green Test Page + + +

Placeholder

+ + diff --git a/testing/web-platform/tests/navigation-timing/resources/blank-page-meta-redirect.html b/testing/web-platform/tests/navigation-timing/resources/blank-page-meta-redirect.html new file mode 100644 index 0000000000..4b4bda096c --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/resources/blank-page-meta-redirect.html @@ -0,0 +1,11 @@ + + + + + + Redirect Placeholder + + +

Placeholder

+ + diff --git a/testing/web-platform/tests/navigation-timing/resources/blank-page-unload.html b/testing/web-platform/tests/navigation-timing/resources/blank-page-unload.html new file mode 100644 index 0000000000..bb2a27f168 --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/resources/blank-page-unload.html @@ -0,0 +1,25 @@ + + + + + + Yellow Test Page + + + + +

Unload

+ + diff --git a/testing/web-platform/tests/navigation-timing/resources/blank-page-yellow-with-onunload.html b/testing/web-platform/tests/navigation-timing/resources/blank-page-yellow-with-onunload.html new file mode 100644 index 0000000000..771e0701d9 --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/resources/blank-page-yellow-with-onunload.html @@ -0,0 +1,11 @@ + + + + + Yellow Test Page + + + +

Placeholder

+ + \ No newline at end of file diff --git a/testing/web-platform/tests/navigation-timing/resources/blank-page-yellow.html b/testing/web-platform/tests/navigation-timing/resources/blank-page-yellow.html new file mode 100644 index 0000000000..4e5e1a000c --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/resources/blank-page-yellow.html @@ -0,0 +1,10 @@ + + + + + Yellow Test Page + + +

Placeholder

+ + \ No newline at end of file diff --git a/testing/web-platform/tests/navigation-timing/resources/blank_page_prefetch.html b/testing/web-platform/tests/navigation-timing/resources/blank_page_prefetch.html new file mode 100644 index 0000000000..1112ca28ec --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/resources/blank_page_prefetch.html @@ -0,0 +1,27 @@ + + + + + + Page to be Prefetched + + + + + + + + + diff --git a/testing/web-platform/tests/navigation-timing/resources/blank_page_prefetch.html.headers b/testing/web-platform/tests/navigation-timing/resources/blank_page_prefetch.html.headers new file mode 100644 index 0000000000..771aba7f94 --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/resources/blank_page_prefetch.html.headers @@ -0,0 +1 @@ +Cache-Control: max-age=300 diff --git a/testing/web-platform/tests/navigation-timing/resources/iframe-prefetch-transfer-size.html b/testing/web-platform/tests/navigation-timing/resources/iframe-prefetch-transfer-size.html new file mode 100644 index 0000000000..fde01775b7 --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/resources/iframe-prefetch-transfer-size.html @@ -0,0 +1,31 @@ + + + + + + Iframe Transfer Size Prefetch + + + +

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 @@ + + + + +
+ Post to page +
+ + + 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 @@ + + + + + diff --git a/testing/web-platform/tests/navigation-timing/test-document-readiness-exist.html b/testing/web-platform/tests/navigation-timing/test-document-readiness-exist.html new file mode 100644 index 0000000000..58f5659a09 --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/test-document-readiness-exist.html @@ -0,0 +1,49 @@ + + + + + document.readyState values exist during a navigation + + + + + + + + +

Description

+

This test validates that the "loading", "interactive" and "complete" + document.readyState states are available during a navigation.

+

Refresh this page to guarantee all readyState phases.

+
+ + diff --git a/testing/web-platform/tests/navigation-timing/test-navigate-within-document.html b/testing/web-platform/tests/navigation-timing/test-navigate-within-document.html new file mode 100644 index 0000000000..e17020b7bb --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/test-navigate-within-document.html @@ -0,0 +1,67 @@ + + + + + window.performance.timing in document navigation + + + + + + + + +

Description

+

This test validates that all of the window.performance.timing attributes remain unchanged after an in document navigation (URL fragment change).

+ +
+ + + diff --git a/testing/web-platform/tests/navigation-timing/test-navigation-attributes-exist.html b/testing/web-platform/tests/navigation-timing/test-navigation-attributes-exist.html new file mode 100644 index 0000000000..845523d1a2 --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/test-navigation-attributes-exist.html @@ -0,0 +1,26 @@ + + + + + window.performance.navigation attributes + + + + + + + + +

Description

+

This test validates that all of the window.performance.navigation attributes exist (but does not validate that their values are correct).

+ +
+ + + + diff --git a/testing/web-platform/tests/navigation-timing/test-navigation-redirectCount-none.html b/testing/web-platform/tests/navigation-timing/test-navigation-redirectCount-none.html new file mode 100644 index 0000000000..da94d24c74 --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/test-navigation-redirectCount-none.html @@ -0,0 +1,31 @@ + + + + + window.performance.navigation.redirectCount on a non-redirected navigation + + + + + + + + + +

Description

+

This test validates that the value of the window.performance.navigation.redirectCount attribute, as well as the window.performance.timing.redirectStart and redirectEnd attributes on a non-redirected navigation.

+ +
+ + + + diff --git a/testing/web-platform/tests/navigation-timing/test-navigation-type-backforward.html b/testing/web-platform/tests/navigation-timing/test-navigation-type-backforward.html new file mode 100644 index 0000000000..b5920953cb --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/test-navigation-type-backforward.html @@ -0,0 +1,96 @@ + + + + + window.navigation.type for back and forward navigations + + + + + + + + + + +

+ Description

+

+ This test validates the value of window.performance.navigation.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 frame.window.performance.type is checked for TYPE_BACK_FORWARD.

+ +

This test passes if all of the checks to the navigation.type are correct throughout the navigation + scenario and the frame below ends with a green background. Otherwise, this test fails.

+ +
+
+ + + diff --git a/testing/web-platform/tests/navigation-timing/test-navigation-type-enums.html b/testing/web-platform/tests/navigation-timing/test-navigation-type-enums.html new file mode 100644 index 0000000000..ecf6ddc89d --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/test-navigation-type-enums.html @@ -0,0 +1,28 @@ + + + + + window.performance.navigation enums + + + + + + + + +

Description

+

This test validates that the TYPE_* enumerations of window.performance.navigation exist and their values are correct.

+ +
+ + + + diff --git a/testing/web-platform/tests/navigation-timing/test-navigation-type-reload.html b/testing/web-platform/tests/navigation-timing/test-navigation-type-reload.html new file mode 100644 index 0000000000..d3331b8197 --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/test-navigation-type-reload.html @@ -0,0 +1,109 @@ + + + + + window.performance.navigation.type with a reloaded navigation + + + + + + + + + +

Description

+

This test validates the value of window.performance.navigation.type and the values of + window.performance.timing.* 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 +

+

+ +
+
+ + + diff --git a/testing/web-platform/tests/navigation-timing/test-no-previous-document.html b/testing/web-platform/tests/navigation-timing/test-no-previous-document.html new file mode 100644 index 0000000000..0bce16525c --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/test-no-previous-document.html @@ -0,0 +1,42 @@ + + + + + window.performance.timing attributes on an initial navigation + + + + + + + + + + + + +

Description

+

This test validates the unload event times are 0 when there is no previous document.

+ +

+ + + diff --git a/testing/web-platform/tests/navigation-timing/test-performance-attributes-exist-in-object.html b/testing/web-platform/tests/navigation-timing/test-performance-attributes-exist-in-object.html new file mode 100644 index 0000000000..25fa6b782e --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/test-performance-attributes-exist-in-object.html @@ -0,0 +1,29 @@ + + + + + window.performance attribute exists in an object + + + + + + + + + +

Description

+

This test validates that the window.performance object exists in an + object element (but does not validate that their values are correct).

+ +
+ + diff --git a/testing/web-platform/tests/navigation-timing/test-performance-attributes-exist.html b/testing/web-platform/tests/navigation-timing/test-performance-attributes-exist.html new file mode 100644 index 0000000000..ca3a6be5aa --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/test-performance-attributes-exist.html @@ -0,0 +1,23 @@ + + + + + window.performance attributes + + + + + + + + +

Description

+

This test validates that the navigation and timing attributes exist for window.performance + (but does not validate that their values are correct).

+
+ + + diff --git a/testing/web-platform/tests/navigation-timing/test-performance-attributes.sub.html b/testing/web-platform/tests/navigation-timing/test-performance-attributes.sub.html new file mode 100644 index 0000000000..50d027e80c --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/test-performance-attributes.sub.html @@ -0,0 +1,29 @@ + + + + + + + + + + diff --git a/testing/web-platform/tests/navigation-timing/test-readwrite.html b/testing/web-platform/tests/navigation-timing/test-readwrite.html new file mode 100644 index 0000000000..a078329dd4 --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/test-readwrite.html @@ -0,0 +1,28 @@ + + + + + window.performance is read/write + + + + + + + + + +

Description

+

This test validates that the window.performance object is read/write.

+
+ + + diff --git a/testing/web-platform/tests/navigation-timing/test-timing-attributes-exist.html b/testing/web-platform/tests/navigation-timing/test-timing-attributes-exist.html new file mode 100644 index 0000000000..5db07459b4 --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/test-timing-attributes-exist.html @@ -0,0 +1,28 @@ + + + + + window.performance.timing attributes + + + + + + + + +

Description

+

This test validates that all of the window.performance.timing attributes exist (but does not validate that their values are correct).

+ +
+ + + + diff --git a/testing/web-platform/tests/navigation-timing/test-timing-attributes-order.html b/testing/web-platform/tests/navigation-timing/test-timing-attributes-order.html new file mode 100644 index 0000000000..5e885ea7ec --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/test-timing-attributes-order.html @@ -0,0 +1,111 @@ + + + + + window.performance.timing attribute ordering on a simple navigation + + + + + + + + + + +

Description

+

This test validates the ordering of the window.performance.timing attributes.

+ +

This page should be loaded with a yellow background frame below which contains an unload event + handler.

+ +

After the page loads, the frame is navigated to a new blank page with a green background. At this point, the navigation timeline is verified

+ +

This test passes if all of the checks to the frame.window.performance.timing attributes are + correct throughout the navigation scenario and the frame below ends with a green background. + Otherwise, this test fails.

+ +

Setup

+ +
+
+ + + diff --git a/testing/web-platform/tests/navigation-timing/test-timing-client-redirect.html b/testing/web-platform/tests/navigation-timing/test-timing-client-redirect.html new file mode 100644 index 0000000000..c376f42bb7 --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/test-timing-client-redirect.html @@ -0,0 +1,56 @@ + + + + + window.performance.timing.redirect attributes on a client redirect navigation + + + + + + + + + + + +

Description

+

This test validates the values of the window.navigation.redirectCount and the + window.performance.timing.redirectStart/End times on a client side redirect.

+ +

+ + + diff --git a/testing/web-platform/tests/navigation-timing/test-timing-reload.html b/testing/web-platform/tests/navigation-timing/test-timing-reload.html new file mode 100644 index 0000000000..a660caf4ef --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/test-timing-reload.html @@ -0,0 +1,92 @@ + + + + + window.performance.timing attributes after a reloaded navigation + + + + + + + + + + +

Description

+

This test validates that the window.performance.timing attributes change when a page is reloaded.

+ +

This page should be loaded with a green background frame below. The frame will be automatically reloaded + and then verified that the window.performance.timing attributes have been updated to the new reloaded navigation timings.

+ +
+
+ + + + diff --git a/testing/web-platform/tests/navigation-timing/test-timing-server-redirect.html b/testing/web-platform/tests/navigation-timing/test-timing-server-redirect.html new file mode 100644 index 0000000000..16567e8997 --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/test-timing-server-redirect.html @@ -0,0 +1,49 @@ + + + + + window.performance.timing.redirect attributes on a same-origin server redirected navigation + + + + + + + + + + + +

Description

+

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/test-timing-xserver-redirect.html b/testing/web-platform/tests/navigation-timing/test-timing-xserver-redirect.html new file mode 100644 index 0000000000..a39f7c2642 --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/test-timing-xserver-redirect.html @@ -0,0 +1,72 @@ + + + + + window.performance.timing.redirect attributes on a cross-origin server redirected navigation + + + + + + + + + + + + +

Description

+

This test validates the values of the window.performance.redirectCount and the + window.performance.timing.redirectStart/End times for a cross-origin server side redirect navigation.

+ +
+
+ + + + diff --git a/testing/web-platform/tests/navigation-timing/test-unique-performance-objects.html b/testing/web-platform/tests/navigation-timing/test-unique-performance-objects.html new file mode 100644 index 0000000000..a8f7e6002d --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/test-unique-performance-objects.html @@ -0,0 +1,30 @@ + + + + + Each window object has a unique performance object + + + + + + + + + +

Description

+

This test validates that each window has a unique window.performance object.

+ +
+ + + diff --git a/testing/web-platform/tests/navigation-timing/unload-event-same-origin-check.html b/testing/web-platform/tests/navigation-timing/unload-event-same-origin-check.html new file mode 100644 index 0000000000..319d04462d --- /dev/null +++ b/testing/web-platform/tests/navigation-timing/unload-event-same-origin-check.html @@ -0,0 +1,125 @@ + + + + + Navigation Timing 2 WPT + + + + + + + + +

Description

+

This test validates that the values of window.performance.getEntriesByType("navigation")[0].(type/unloadEventEnd/unloadEventStart) are only exposed when the same-origin test passes.

+ + -- cgit v1.2.3