From 81213edb3fe2d484f8cfba170befcb584af1162b Mon Sep 17 00:00:00 2001 From: Nate Chapin Date: Wed, 20 Jul 2022 18:19:58 +0000 Subject: [PATCH] Implement navigateEvent.intercept() and navigateEvent.canIntercept Follows https://github.com/WICG/navigation-api/pull/235 intercept() works very similarly to transitionWhile(), except that instead of taking a mandatory Promise, it takes an optional handler function. If a function is provided and it returns a promise, navigation finish will be delayed until the Promise resolve, just as transitionWhile() delays navigation finish for its Promise. canIntercept is identical to canTransition. Intent to ship: https://groups.google.com/a/chromium.org/g/blink-dev/c/jyWqjAEv5LU Bug: 1336000 Change-Id: I94edd7fdc727080594f16fe4511cb7c302d88941 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3688177 Reviewed-by: Chris Harrelson Commit-Queue: Nate Chapin Reviewed-by: Domenic Denicola Cr-Commit-Position: refs/heads/main@{#1026325} NOKEYCHECK=True GitOrigin-RevId: d53817e29d5e857782ff8d977dbc3b89eb53831b --- .../devtools_protocol/browser_protocol.pdl | 1 + .../use_counter/metrics/web_feature.mojom | 1 + blink/renderer/bindings/generated_in_core.gni | 4 + blink/renderer/bindings/idl_in_core.gni | 1 + .../core/frame/deprecation/deprecation.cc | 3 + .../core/inspector/inspector_audits_issue.cc | 4 + .../core/inspector/inspector_audits_issue.h | 1 + blink/renderer/core/loader/document_loader.cc | 2 + .../core/navigation_api/navigate_event.cc | 86 +++++--- .../core/navigation_api/navigate_event.h | 19 +- .../core/navigation_api/navigate_event.idl | 6 +- .../navigation_api/navigate_event_init.idl | 2 +- .../core/navigation_api/navigation_api.cc | 47 +++-- .../navigation_intercept_options.idl | 10 + .../navigation-navigate-intercept.html | 21 ++ ...navigation-navigate-replace-intercept.html | 23 +++ .../navigation-reload-intercept.html | 21 ++ .../navigation-api/focus-reset/autofocus.html | 14 +- .../wpt/navigation-api/focus-reset/basic.html | 17 +- ...-focus-again-in-blur-during-intercept.html | 35 ++++ ...ocus-back-to-origial-during-intercept.html | 36 ++++ .../change-focus-during-intercept.html | 34 +++ ...ge-focus-then-remove-during-intercept.html | 40 ++++ .../focus-reset/multiple-intercept.html | 69 +++++++ ...ment-crossorigin-sameorigindomain.sub.html | 2 +- .../click-crossdocument-sameorigin.html | 2 +- ...ment-crossorigin-sameorigindomain.sub.html | 2 +- .../click-samedocument-crossorigin.html | 2 +- .../click-samedocument-sameorigin.html | 2 +- ...ment-crossorigin-sameorigindomain.sub.html | 2 +- .../location-crossdocument-sameorigin.html | 2 +- ...ment-crossorigin-sameorigindomain.sub.html | 2 +- .../location-samedocument-crossorigin.html | 2 +- .../location-samedocument-sameorigin.html | 2 +- ...ment-crossorigin-sameorigindomain.sub.html | 2 +- .../open-crossdocument-sameorigin.html | 2 +- ...ment-crossorigin-sameorigindomain.sub.html | 2 +- .../open-samedocument-crossorigin.html | 2 +- .../open-samedocument-sameorigin.html | 2 +- .../resources/cross-origin-iframe-helper.html | 3 +- ...ment-crossorigin-sameorigindomain.sub.html | 2 +- .../submit-crossdocument-sameorigin.html | 2 +- ...ment-crossorigin-sameorigindomain.sub.html | 2 +- .../submit-samedocument-crossorigin.html | 2 +- .../submit-samedocument-sameorigin.html | 2 +- .../navigate-event/event-constructor.html | 10 +- .../intercept-after-dispatch.html | 16 ++ .../intercept-and-navigate.html | 27 +++ .../intercept-canceled-event.html | 17 ++ .../intercept-cross-document-same-origin.html | 21 ++ .../intercept-cross-origin.html | 18 ++ .../intercept-detach-multiple.html | 18 ++ .../navigate-event/intercept-detach.html | 17 ++ .../intercept-handler-null-or-undefined.html | 21 ++ ...intercept-handler-returns-non-promise.html | 18 ++ .../intercept-handler-throws.html | 26 +++ .../intercept-history-pushState.html | 23 +++ .../intercept-history-replaceState.html | 23 +++ .../intercept-multiple-times-reject.html | 38 ++++ .../intercept-multiple-times.html | 41 ++++ .../intercept-navigation-back.html | 19 ++ .../intercept-on-synthetic-event.html | 17 ++ .../navigate-event/intercept-popstate.html | 26 +++ .../navigate-event/intercept-reject.html | 29 +++ .../navigate-event/intercept-resolve.html | 20 ++ .../intercept-same-document-history-back.html | 40 ++++ .../navigate-anchor-cross-origin.html | 2 +- ...avigate-anchor-download-userInitiated.html | 2 +- .../navigate-anchor-download.html | 2 +- .../navigate-anchor-fragment.html | 2 +- ...ate-anchor-same-origin-cross-document.html | 2 +- .../navigate-anchor-userInitiated.html | 2 +- .../navigate-anchor-with-target.html | 2 +- .../navigate-event/navigate-form-get.html | 2 +- .../navigate-form-userInitiated.html | 2 +- .../navigate-form-with-target.html | 2 +- .../navigate-event/navigate-form.html | 2 +- .../navigate-history-back-after-fragment.html | 2 +- ...navigate-history-back-after-pushState.html | 2 +- .../navigate-history-back-cross-document.html | 2 +- .../navigate-event/navigate-history-go-0.html | 2 +- .../navigate-history-pushState.html | 2 +- .../navigate-history-replaceState.html | 2 +- .../navigate-iframe-location.html | 2 +- .../navigate-event/navigate-location.html | 2 +- .../navigate-event/navigate-meta-refresh.html | 2 +- ...vigate-navigation-back-cross-document.html | 2 +- ...avigate-navigation-back-same-document.html | 2 +- .../navigate-navigation-navigate.html | 2 +- .../navigate-event/navigate-to-srcdoc.html | 2 +- .../navigate-window-open-self.html | 2 +- .../navigate-event/navigate-window-open.html | 2 +- .../signal-abort-intercept.html | 18 ++ ...nal-abort-window-stop-after-intercept.html | 40 ++++ .../key-id-location-reload-intercept.html | 23 +++ .../navigate-intercept-history-state.html | 14 ++ .../navigate-state-repeated-await.html | 2 +- .../navigate-state-repeated.html | 2 +- .../reload-state-and-info.html | 2 +- .../reload-state-undefined.html | 2 +- .../return-value/back-intercept-rejected.html | 28 +++ .../return-value/back-intercept.html | 25 +++ .../forward-intercept-rejected.html | 29 +++ .../return-value/forward-intercept.html | 28 +++ .../navigate-intercept-interrupted.html | 23 +++ .../navigate-intercept-rejected.html | 17 ++ .../return-value/navigate-intercept.html | 15 ++ .../reload-intercept-rejected.html | 17 ++ .../return-value/reload-intercept.html | 14 ++ .../return-value/reload.html | 2 +- .../traverseTo-intercept-rejected.html | 30 +++ .../return-value/traverseTo-intercept.html | 27 +++ ...-between-navigate-and-navigatesuccess.html | 2 +- .../ordering-and-transition/README.md | 6 +- .../anchor-download-intercept-reject.html | 54 +++++ .../anchor-download-intercept.html | 48 +++++ .../anchor-download.html | 2 +- .../back-same-document-intercept-reject.html | 54 +++++ .../back-same-document-intercept.html | 48 +++++ ...entrychange-before-popstate-intercept.html | 48 +++++ .../intercept-async.html | 55 +++++ .../location-href-double-intercept.html | 61 ++++++ .../location-href-intercept-reentrant.html | 60 ++++++ .../location-href-intercept-reject.html | 50 +++++ .../location-href-intercept.html | 44 ++++ .../navigate-double-intercept.html | 68 ++++++ .../navigate-in-transition-finished.html | 4 +- .../navigate-intercept-stop.html | 52 +++++ .../navigate-intercept.html | 47 +++++ ...ate-same-document-intercept-reentrant.html | 66 ++++++ ...vigate-same-document-intercept-reject.html | 53 +++++ .../reload-intercept-reject.html | 53 +++++ .../reload-intercept.html | 47 +++++ .../transition-finished-mark-as-handled.html | 2 +- .../transition-realms-and-identity.html | 2 +- .../dispose-same-document-intercept.html | 71 +++++++ ...e-same-document-reload-with-intercept.html | 17 ++ ...-same-document-replace-with-intercept.html | 36 ++++ .../after-transition-basic.html | 2 +- ...ory-scroll-restoration-during-promise.html | 7 +- ...transition-intercept-handler-modifies.html | 33 +++ .../after-transition-reject.html | 6 +- .../after-transition-timing.html | 25 ++- ...ith-history-scroll-restoration-manual.html | 2 +- .../scroll-restoration/manual-basic.html | 2 +- .../manual-immediate-restoreScroll.html | 2 +- .../manual-restoreScroll-after-dispatch.html | 7 +- .../manual-restoreScroll-after-resolve.html | 2 +- .../manual-restoreScroll-repeated.html | 2 +- .../restoreScroll-exceptions.html | 12 +- .../global-interface-listing-expected.txt | 2 + .../global-interface-listing-expected.txt | 2 + .../wpt_internal/navigation-api/README.md | 11 + .../anchor-click.html | 18 ++ .../currententrychange-event/constructor.html | 32 +++ .../history-back-same-doc.html | 24 +++ .../history-pushState.html | 16 ++ .../history-replaceState.html | 18 ++ .../location-api.html | 18 ++ ...om-initial-about-blank-same-doc-popup.html | 15 ++ ...ate-from-initial-about-blank-same-doc.html | 12 ++ .../navigate-from-initial-about-blank.html | 11 + .../navigation-back-forward-cross-doc.html | 20 ++ .../navigation-back-forward-same-doc.html | 40 ++++ .../navigation-navigate-cross-doc.html | 12 ++ .../navigation-navigate-preventDefault.html | 10 + ...navigation-navigate-replace-cross-doc.html | 12 ++ .../navigation-navigate-replace-same-doc.html | 23 +++ ...tion-navigate-replace-transitionWhile.html | 0 .../navigation-navigate-same-doc.html | 21 ++ .../navigation-navigate-transitionWhile.html | 0 .../navigation-reload-cross-doc.html | 12 ++ .../navigation-reload-transitionWhile.html | 0 .../navigation-updateCurrentEntry.html | 20 ++ .../currententrychange-event/not-on-load.html | 17 ++ .../currententrychange-event/properties.html | 14 ++ .../navigation-api/focus-reset/autofocus.html | 185 +++++++++++++++++ .../navigation-api/focus-reset/basic.html | 66 ++++++ ...-again-in-blur-during-transitionWhile.html | 0 ...ack-to-origial-during-transitionWhile.html | 0 .../change-focus-during-transitionWhile.html | 0 ...us-then-remove-during-transitionWhile.html | 0 .../focus-reset/multiple-transitionWhile.html | 0 .../focus-reset/resources/helpers.mjs | 73 +++++++ .../navigate-anchor-cross-origin.html | 24 +++ ...avigate-anchor-download-userInitiated.html | 29 +++ .../navigate-anchor-download.html | 34 +++ .../navigate-anchor-fragment.html | 25 +++ ...ate-anchor-same-origin-cross-document.html | 25 +++ .../navigate-anchor-userInitiated.html | 29 +++ .../navigate-anchor-with-target.html | 31 +++ ...ate-destination-getState-back-forward.html | 26 +++ ...avigate-destination-getState-navigate.html | 23 +++ .../navigate-event/navigate-form-get.html | 27 +++ .../navigate-event/navigate-form-reload.html | 28 +++ .../navigate-form-traverse.html | 44 ++++ .../navigate-form-userInitiated.html | 30 +++ .../navigate-form-with-target.html | 29 +++ .../navigate-event/navigate-form.html | 25 +++ .../navigate-history-back-after-fragment.html | 31 +++ ...navigate-history-back-after-pushState.html | 31 +++ .../navigate-history-back-cross-document.html | 32 +++ .../navigate-event/navigate-history-go-0.html | 27 +++ .../navigate-history-pushState.html | 29 +++ .../navigate-history-replaceState.html | 29 +++ .../navigate-iframe-location.html | 30 +++ .../navigate-event/navigate-location.html | 23 +++ .../navigate-event/navigate-meta-refresh.html | 27 +++ ...vigate-navigation-back-cross-document.html | 32 +++ ...avigate-navigation-back-same-document.html | 32 +++ .../navigate-navigation-navigate.html | 22 ++ .../navigate-to-javascript.html | 18 ++ .../navigate-event/navigate-to-srcdoc.html | 34 +++ .../navigate-window-open-self.html | 23 +++ .../navigate-event/navigate-window-open.html | 30 +++ .../navigatesuccess-cross-document.html | 14 ++ .../navigatesuccess-same-document.html | 10 + .../resources/meta-refresh.html | 5 + ...navigatesuccess-cross-document-helper.html | 6 + .../signal-abort-detach-in-onnavigate.html | 21 ++ .../signal-abort-preventDefault.html | 19 ++ .../signal-abort-transitionWhile.html | 0 ...ort-window-stop-after-transitionWhile.html | 0 ...ignal-abort-window-stop-in-onnavigate.html | 24 +++ .../signal-abort-window-stop.html | 23 +++ .../transitionWhile-after-dispatch.html | 0 .../transitionWhile-and-navigate.html | 0 .../transitionWhile-canceled-event.html | 0 ...itionWhile-cross-document-same-origin.html | 0 .../transitionWhile-cross-origin.html | 0 .../transitionWhile-detach.html | 0 .../transitionWhile-history-pushState.html | 0 .../transitionWhile-history-replaceState.html | 0 ...transitionWhile-multiple-times-reject.html | 0 .../transitionWhile-multiple-times.html | 0 .../transitionWhile-navigation-back.html | 0 .../transitionWhile-on-synthetic-event.html | 0 .../transitionWhile-popstate.html | 0 .../transitionWhile-reject.html | 0 .../transitionWhile-resolve.html | 0 ...itionWhile-same-document-history-back.html | 0 .../after-detach.html | 30 +++ .../current-basic.html | 107 ++++++++++ .../entries-across-origins.html | 33 +++ .../entries-after-bfcache-in-iframe.html | 36 ++++ .../entries-after-bfcache.html | 60 ++++++ .../entries-after-blank-navigation.html | 25 +++ .../entries-after-blob-navigation.html | 25 +++ ...-after-cross-document-forward-pruning.html | 33 +++ ...tries-after-javascript-url-navigation.html | 38 ++++ ...after-navigations-in-multiple-windows.html | 34 +++ .../entries-after-srcdoc-navigation.html | 25 +++ .../entries-array-equality.html | 8 + .../entries-in-new-javascript-url-iframe.html | 15 ++ .../entries-in-new-srcdoc-iframe.html | 15 ++ .../entries-when-inactive.html | 16 ++ .../entry-after-detach.html | 20 ++ .../index-not-in-entries.html | 24 +++ .../key-id-back-cross-document.html | 15 ++ .../key-id-back-same-document.html | 24 +++ ...ey-id-location-reload-transitionWhile.html | 0 .../key-id-location-reload.html | 18 ++ .../key-id-location-replace-cross-origin.html | 17 ++ .../key-id-location-replace.html | 18 ++ .../no-referrer-dynamic-url-censored.html | 33 +++ .../no-referrer-from-meta-url-censored.html | 32 +++ .../no-referrer-url-censored.html | 32 +++ .../opaque-origin-data-url.html | 17 ++ .../opaque-origin.html | 9 + .../resources/is_uuid.js | 3 + ...y-navigate-back-cross-document-helper.html | 27 +++ .../resources/no-referrer-meta.html | 3 + .../resources/no-referrer.html | 2 + .../resources/no-referrer.html.headers | 1 + .../resources/opaque-origin-page.html | 25 +++ .../resources/post-entries-length-to-top.html | 7 + .../resources/post-key-to-top.html | 4 + .../sameDocument-after-fragment-navigate.html | 30 +++ .../sameDocument-after-navigate-restore.html | 25 +++ .../sameDocument-after-navigate.html | 14 ++ .../state-after-navigate-restore.html | 27 +++ .../back-forward-multiple-frames.html | 74 +++++++ .../navigation-methods/disambigaute-back.html | 32 +++ .../disambigaute-forward.html | 40 ++++ ...disambigaute-traverseTo-back-multiple.html | 35 ++++ ...ambigaute-traverseTo-forward-multiple.html | 39 ++++ .../forward-to-pruned-entry.html | 31 +++ .../navigation-methods/navigate-base-url.html | 15 ++ ...navigate-from-initial-about-blank-src.html | 24 +++ .../navigate-from-initial-about-blank.html | 25 +++ .../navigate-history-state-replace.html | 16 ++ .../navigate-history-state.html | 16 ++ .../navigate-info-and-state.html | 18 ++ .../navigate-relative-url.html | 16 ++ .../navigate-replace-cross-document.html | 29 +++ .../navigate-replace-same-document.html | 21 ++ .../navigate-same-document.html | 23 +++ .../navigate-state-repeated-await.html | 13 ++ .../navigate-state-repeated.html | 20 ++ ...avigate-transitionWhile-history-state.html | 0 .../navigation-methods/reload-base-url.html | 16 ++ .../navigation-methods/reload-info.html | 47 +++++ .../reload-navigation-timing.html | 15 ++ .../navigation-methods/reload-no-args.html | 46 +++++ .../reload-state-and-info.html | 40 ++++ .../reload-state-undefined.html | 39 ++++ .../resources/fetch-event-test-worker.js | 7 + .../resources/navigate-parent.html | 6 + .../resources/navigate-sibling.html | 6 + .../resources/navigation-back.html | 6 + .../resources/page-with-base-url-common.html | 2 + .../resources/service-worker-page.html | 2 + .../resources/slow-no-store.py | 8 + .../return-value/back-204-205-download.html | 52 +++++ .../return-value/back-already-detached.html | 30 +++ .../return-value/back-beforeunload.html | 42 ++++ .../back-forward-initial-about-blank.html | 25 +++ .../back-forward-opaque-origin.html | 9 + .../back-forward-out-of-bounds.html | 16 ++ .../back-transitionWhile-rejected.html | 0 .../return-value/back-transitionWhile.html | 0 .../navigation-methods/return-value/back.html | 23 +++ .../forward-already-detached.html | 33 +++ .../return-value/forward-beforeunload.html | 45 ++++ .../forward-transitionWhile-rejected.html | 0 .../return-value/forward-transitionWhile.html | 0 .../return-value/forward.html | 24 +++ .../navigate-204-205-download.html | 42 ++++ .../navigate-already-detached.html | 19 ++ .../return-value/navigate-beforeunload.html | 31 +++ .../return-value/navigate-cross-document.html | 16 ++ .../navigate-detach-in-onnavigate.html | 18 ++ .../navigate-detach-in-serialization.html | 24 +++ .../return-value/navigate-file-url.html | 10 + ...te-initial-about-blank-cross-document.html | 21 ++ .../navigate-initial-about-blank.html | 20 ++ ...avigate-interrupted-within-onnavigate.html | 28 +++ .../return-value/navigate-interrupted.html | 21 ++ .../return-value/navigate-invalid-url.html | 10 + .../return-value/navigate-opaque-origin.html | 9 + .../return-value/navigate-preventDefault.html | 12 ++ .../navigate-push-initial-about-blank.html | 21 ++ .../navigate-push-javascript-url.html | 19 ++ .../navigate-push-not-loaded.html | 19 ++ .../return-value/navigate-push-same-url.html | 19 ++ ...rder-beforeunload-unserializablestate.html | 31 +++ ...on-order-detached-unserializablestate.html | 20 ++ ...jection-order-invalidurl-beforeunload.html | 31 +++ ...e-rejection-order-invalidurl-detached.html | 20 ++ ...ate-rejection-order-invalidurl-unload.html | 27 +++ ...-order-invalidurl-unserializablestate.html | 12 ++ ...tion-order-unload-unserializablestate.html | 27 +++ .../navigate-transitionWhile-interrupted.html | 0 .../navigate-transitionWhile-rejected.html | 0 .../navigate-transitionWhile.html | 0 .../return-value/navigate-unload.html | 27 +++ .../navigate-unserializable-state.html | 21 ++ .../return-value/navigate.html | 12 ++ .../return-value/reload-already-detached.html | 19 ++ .../return-value/reload-beforeunload.html | 31 +++ .../reload-detach-in-onnavigate.html | 18 ++ .../reload-detach-in-serialization.html | 24 +++ .../reload-initial-about-blank.html | 20 ++ .../return-value/reload-preventDefault.html | 12 ++ ...rder-beforeunload-unserializablestate.html | 31 +++ ...on-order-detached-unserializablestate.html | 20 ++ ...tion-order-unload-unserializablestate.html | 32 +++ .../reload-transitionWhile-rejected.html | 0 .../return-value/reload-transitionWhile.html | 0 .../return-value/reload-unload.html | 27 +++ .../reload-unserializable-state.html | 21 ++ .../return-value/reload.html | 16 ++ .../204-205-download-on-second-visit.py | 27 +++ .../back-forward-opaque-origin-page.html | 28 +++ .../return-value/resources/helpers.js | 92 +++++++++ .../navigate-opaque-origin-page.html | 16 ++ .../traverseTo-already-detached.html | 20 ++ .../return-value/traverseTo-beforeunload.html | 31 +++ ...verseTo-cross-document-preventDefault.html | 29 +++ .../return-value/traverseTo-current.html | 17 ++ .../traverseTo-detach-cross-document.html | 29 +++ .../traverseTo-detach-same-document.html | 28 +++ .../return-value/traverseTo-invalid-key.html | 10 + .../return-value/traverseTo-repeated.html | 24 +++ .../traverseTo-transitionWhile-rejected.html | 0 .../traverseTo-transitionWhile.html | 0 .../return-value/traverseTo.html | 25 +++ .../sandboxing-navigate-parent.html | 16 ++ .../sandboxing-navigate-sibling.html | 19 ++ .../traverseTo-after-adding-iframe.html | 34 +++ .../traverseTo-after-data-url.html | 33 +++ .../traverseTo-cross-document.html | 41 ++++ ...-between-navigate-and-navigatesuccess.html | 46 +++++ .../traverseTo-multiple-steps.html | 25 +++ ...traverseTo-navigates-multiple-iframes.html | 45 ++++ .../traverseTo-same-document.html | 43 ++++ ...averseTo-with-cross-origin-in-history.html | 37 ++++ .../ordering-and-transition/README.md | 26 +++ ...nchor-download-transitionWhile-reject.html | 0 .../anchor-download-transitionWhile.html | 0 .../anchor-download.html | 24 +++ ...-same-document-transitionWhile-reject.html | 0 .../back-same-document-transitionWhile.html | 0 .../back-same-document.html | 40 ++++ ...hange-before-popstate-transitionWhile.html | 0 .../currententrychange-dispose-ordering.html | 26 +++ .../location-href-canceled.html | 39 ++++ .../location-href-double-transitionWhile.html | 0 ...cation-href-transitionWhile-reentrant.html | 0 .../location-href-transitionWhile-reject.html | 0 .../location-href-transitionWhile.html | 0 ...e-204-205-download-then-same-document.html | 66 ++++++ .../navigate-canceled.html | 42 ++++ .../navigate-cross-document-double.html | 49 +++++ .../navigate-cross-document-event-order.html | 32 +++ .../navigate-double-transitionWhile.html | 0 .../navigate-in-transition-finished.html | 67 ++++++ ...me-document-transitionWhile-reentrant.html | 0 ...-same-document-transitionWhile-reject.html | 0 .../navigate-same-document.html | 39 ++++ .../navigate-transitionWhile-stop.html | 0 .../navigate-transitionWhile.html | 0 .../reload-canceled.html | 42 ++++ .../reload-transitionWhile-reject.html | 0 .../reload-transitionWhile.html | 0 .../resources/helpers.mjs | 193 ++++++++++++++++++ .../resources/notify-top-early.html | 7 + .../transition-cross-document.html | 44 ++++ .../transition-finished-mark-as-handled.html | 20 ++ .../transition-realms-and-identity.html | 41 ++++ .../dispose-after-bfcache.html | 32 +++ .../dispose-cross-document.html | 37 ++++ ...dispose-same-document-navigate-during.html | 50 +++++ ...-document-reload-with-transitionWhile.html | 0 ...document-replace-with-transitionWhile.html | 0 .../dispose-same-document-replaceState.html | 28 +++ ...dispose-same-document-transitionWhile.html | 0 .../dispose-same-document.html | 65 ++++++ .../after-transition-basic.html | 20 ++ ...ory-scroll-restoration-during-promise.html | 31 +++ .../after-transition-reject.html | 21 ++ .../after-transition-timing.html | 43 ++++ ...ith-history-scroll-restoration-manual.html | 23 +++ .../scroll-restoration/manual-basic.html | 20 ++ .../manual-immediate-restoreScroll.html | 24 +++ .../manual-restoreScroll-after-dispatch.html | 32 +++ .../manual-restoreScroll-after-resolve.html | 27 +++ .../manual-restoreScroll-repeated.html | 25 +++ .../restoreScroll-exceptions.html | 41 ++++ .../state/cross-document-away-and-back.html | 31 +++ .../cross-document-getState-undefined.html | 17 ++ .../state/cross-document-getState.html | 19 ++ .../state/cross-document-location-api.html | 20 ++ .../state/history-pushState.html | 11 + .../state/history-replaceState.html | 11 + .../navigation-api/state/location-reload.html | 19 ++ ...e-document-away-and-back-location-api.html | 47 +++++ ...document-away-and-back-navigation-api.html | 53 +++++ .../updateCurrentEntry-method/basic.html | 25 +++ .../cross-document-away-and-back.html | 31 +++ .../cross-document-location-api.html | 20 ++ ...itial-about-blank-unserializablestate.html | 13 ++ ...-not-fully-active-unserializablestate.html | 20 ++ .../history-pushState.html | 11 + .../history-replaceState.html | 11 + .../initial-about-blank.html | 13 ++ .../location-reload.html | 19 ++ .../updateCurrentEntry-method/no-args.html | 15 ++ .../not-fully-active.html | 20 ++ .../opaque-origin.html | 9 + .../resources/opaque-origin-page.html | 11 + ...e-document-away-and-back-location-api.html | 40 ++++ .../unserializable.html | 29 +++ 473 files changed, 9494 insertions(+), 155 deletions(-) create mode 100644 blink/renderer/core/navigation_api/navigation_intercept_options.idl create mode 100644 blink/web_tests/external/wpt/navigation-api/currententrychange-event/navigation-navigate-intercept.html create mode 100644 blink/web_tests/external/wpt/navigation-api/currententrychange-event/navigation-navigate-replace-intercept.html create mode 100644 blink/web_tests/external/wpt/navigation-api/currententrychange-event/navigation-reload-intercept.html create mode 100644 blink/web_tests/external/wpt/navigation-api/focus-reset/change-focus-again-in-blur-during-intercept.html create mode 100644 blink/web_tests/external/wpt/navigation-api/focus-reset/change-focus-back-to-origial-during-intercept.html create mode 100644 blink/web_tests/external/wpt/navigation-api/focus-reset/change-focus-during-intercept.html create mode 100644 blink/web_tests/external/wpt/navigation-api/focus-reset/change-focus-then-remove-during-intercept.html create mode 100644 blink/web_tests/external/wpt/navigation-api/focus-reset/multiple-intercept.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-after-dispatch.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-and-navigate.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-canceled-event.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-cross-document-same-origin.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-cross-origin.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-detach-multiple.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-detach.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-handler-null-or-undefined.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-handler-returns-non-promise.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-handler-throws.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-history-pushState.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-history-replaceState.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-multiple-times-reject.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-multiple-times.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-navigation-back.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-on-synthetic-event.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-popstate.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-reject.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-resolve.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-same-document-history-back.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigate-event/signal-abort-intercept.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigate-event/signal-abort-window-stop-after-intercept.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigation-history-entry/key-id-location-reload-intercept.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigation-methods/navigate-intercept-history-state.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/back-intercept-rejected.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/back-intercept.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/forward-intercept-rejected.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/forward-intercept.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-intercept-interrupted.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-intercept-rejected.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-intercept.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/reload-intercept-rejected.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/reload-intercept.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-intercept-rejected.html create mode 100644 blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-intercept.html create mode 100644 blink/web_tests/external/wpt/navigation-api/ordering-and-transition/anchor-download-intercept-reject.html create mode 100644 blink/web_tests/external/wpt/navigation-api/ordering-and-transition/anchor-download-intercept.html create mode 100644 blink/web_tests/external/wpt/navigation-api/ordering-and-transition/back-same-document-intercept-reject.html create mode 100644 blink/web_tests/external/wpt/navigation-api/ordering-and-transition/back-same-document-intercept.html create mode 100644 blink/web_tests/external/wpt/navigation-api/ordering-and-transition/currententrychange-before-popstate-intercept.html create mode 100644 blink/web_tests/external/wpt/navigation-api/ordering-and-transition/intercept-async.html create mode 100644 blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-double-intercept.html create mode 100644 blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-intercept-reentrant.html create mode 100644 blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-intercept-reject.html create mode 100644 blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-intercept.html create mode 100644 blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-double-intercept.html create mode 100644 blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-intercept-stop.html create mode 100644 blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-intercept.html create mode 100644 blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-same-document-intercept-reentrant.html create mode 100644 blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-same-document-intercept-reject.html create mode 100644 blink/web_tests/external/wpt/navigation-api/ordering-and-transition/reload-intercept-reject.html create mode 100644 blink/web_tests/external/wpt/navigation-api/ordering-and-transition/reload-intercept.html create mode 100644 blink/web_tests/external/wpt/navigation-api/per-entry-events/dispose-same-document-intercept.html create mode 100644 blink/web_tests/external/wpt/navigation-api/per-entry-events/dispose-same-document-reload-with-intercept.html create mode 100644 blink/web_tests/external/wpt/navigation-api/per-entry-events/dispose-same-document-replace-with-intercept.html create mode 100644 blink/web_tests/external/wpt/navigation-api/scroll-restoration/after-transition-intercept-handler-modifies.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/README.md create mode 100644 blink/web_tests/wpt_internal/navigation-api/currententrychange-event/anchor-click.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/currententrychange-event/constructor.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/currententrychange-event/history-back-same-doc.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/currententrychange-event/history-pushState.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/currententrychange-event/history-replaceState.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/currententrychange-event/location-api.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigate-from-initial-about-blank-same-doc-popup.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigate-from-initial-about-blank-same-doc.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigate-from-initial-about-blank.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-back-forward-cross-doc.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-back-forward-same-doc.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-navigate-cross-doc.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-navigate-preventDefault.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-navigate-replace-cross-doc.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-navigate-replace-same-doc.html rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/currententrychange-event/navigation-navigate-replace-transitionWhile.html (100%) create mode 100644 blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-navigate-same-doc.html rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/currententrychange-event/navigation-navigate-transitionWhile.html (100%) create mode 100644 blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-reload-cross-doc.html rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/currententrychange-event/navigation-reload-transitionWhile.html (100%) create mode 100644 blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-updateCurrentEntry.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/currententrychange-event/not-on-load.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/currententrychange-event/properties.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/focus-reset/autofocus.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/focus-reset/basic.html rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/focus-reset/change-focus-again-in-blur-during-transitionWhile.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/focus-reset/change-focus-back-to-origial-during-transitionWhile.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/focus-reset/change-focus-during-transitionWhile.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/focus-reset/change-focus-then-remove-during-transitionWhile.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/focus-reset/multiple-transitionWhile.html (100%) create mode 100644 blink/web_tests/wpt_internal/navigation-api/focus-reset/resources/helpers.mjs create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-anchor-cross-origin.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-anchor-download-userInitiated.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-anchor-download.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-anchor-fragment.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-anchor-same-origin-cross-document.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-anchor-userInitiated.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-anchor-with-target.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-destination-getState-back-forward.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-destination-getState-navigate.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-form-get.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-form-reload.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-form-traverse.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-form-userInitiated.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-form-with-target.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-form.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-history-back-after-fragment.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-history-back-after-pushState.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-history-back-cross-document.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-history-go-0.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-history-pushState.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-history-replaceState.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-iframe-location.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-location.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-meta-refresh.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-navigation-back-cross-document.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-navigation-back-same-document.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-navigation-navigate.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-to-javascript.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-to-srcdoc.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-window-open-self.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-window-open.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/navigatesuccess-cross-document.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/navigatesuccess-same-document.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/resources/meta-refresh.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/resources/navigatesuccess-cross-document-helper.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/signal-abort-detach-in-onnavigate.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/signal-abort-preventDefault.html rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/navigate-event/signal-abort-transitionWhile.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/navigate-event/signal-abort-window-stop-after-transitionWhile.html (100%) create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/signal-abort-window-stop-in-onnavigate.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigate-event/signal-abort-window-stop.html rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/navigate-event/transitionWhile-after-dispatch.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/navigate-event/transitionWhile-and-navigate.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/navigate-event/transitionWhile-canceled-event.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/navigate-event/transitionWhile-cross-document-same-origin.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/navigate-event/transitionWhile-cross-origin.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/navigate-event/transitionWhile-detach.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/navigate-event/transitionWhile-history-pushState.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/navigate-event/transitionWhile-history-replaceState.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/navigate-event/transitionWhile-multiple-times-reject.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/navigate-event/transitionWhile-multiple-times.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/navigate-event/transitionWhile-navigation-back.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/navigate-event/transitionWhile-on-synthetic-event.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/navigate-event/transitionWhile-popstate.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/navigate-event/transitionWhile-reject.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/navigate-event/transitionWhile-resolve.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/navigate-event/transitionWhile-same-document-history-back.html (100%) create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/after-detach.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/current-basic.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-across-origins.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-after-bfcache-in-iframe.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-after-bfcache.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-after-blank-navigation.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-after-blob-navigation.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-after-cross-document-forward-pruning.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-after-javascript-url-navigation.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-after-navigations-in-multiple-windows.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-after-srcdoc-navigation.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-array-equality.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-in-new-javascript-url-iframe.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-in-new-srcdoc-iframe.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-when-inactive.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entry-after-detach.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/index-not-in-entries.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/key-id-back-cross-document.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/key-id-back-same-document.html rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/navigation-history-entry/key-id-location-reload-transitionWhile.html (100%) create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/key-id-location-reload.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/key-id-location-replace-cross-origin.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/key-id-location-replace.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/no-referrer-dynamic-url-censored.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/no-referrer-from-meta-url-censored.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/no-referrer-url-censored.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/opaque-origin-data-url.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/opaque-origin.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/resources/is_uuid.js create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/resources/key-navigate-back-cross-document-helper.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/resources/no-referrer-meta.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/resources/no-referrer.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/resources/no-referrer.html.headers create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/resources/opaque-origin-page.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/resources/post-entries-length-to-top.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/resources/post-key-to-top.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/sameDocument-after-fragment-navigate.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/sameDocument-after-navigate-restore.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/sameDocument-after-navigate.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/state-after-navigate-restore.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/back-forward-multiple-frames.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/disambigaute-back.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/disambigaute-forward.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/disambigaute-traverseTo-back-multiple.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/disambigaute-traverseTo-forward-multiple.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/forward-to-pruned-entry.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-base-url.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-from-initial-about-blank-src.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-from-initial-about-blank.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-history-state-replace.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-history-state.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-info-and-state.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-relative-url.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-replace-cross-document.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-replace-same-document.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-same-document.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-state-repeated-await.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-state-repeated.html rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/navigation-methods/navigate-transitionWhile-history-state.html (100%) create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/reload-base-url.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/reload-info.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/reload-navigation-timing.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/reload-no-args.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/reload-state-and-info.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/reload-state-undefined.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/resources/fetch-event-test-worker.js create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/resources/navigate-parent.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/resources/navigate-sibling.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/resources/navigation-back.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/resources/page-with-base-url-common.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/resources/service-worker-page.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/resources/slow-no-store.py create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/back-204-205-download.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/back-already-detached.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/back-beforeunload.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/back-forward-initial-about-blank.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/back-forward-opaque-origin.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/back-forward-out-of-bounds.html rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/navigation-methods/return-value/back-transitionWhile-rejected.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/navigation-methods/return-value/back-transitionWhile.html (100%) create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/back.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/forward-already-detached.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/forward-beforeunload.html rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/navigation-methods/return-value/forward-transitionWhile-rejected.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/navigation-methods/return-value/forward-transitionWhile.html (100%) create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/forward.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-204-205-download.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-already-detached.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-beforeunload.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-cross-document.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-detach-in-onnavigate.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-detach-in-serialization.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-file-url.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-initial-about-blank-cross-document.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-initial-about-blank.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-interrupted-within-onnavigate.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-interrupted.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-invalid-url.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-opaque-origin.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-preventDefault.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-push-initial-about-blank.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-push-javascript-url.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-push-not-loaded.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-push-same-url.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-rejection-order-beforeunload-unserializablestate.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-rejection-order-detached-unserializablestate.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-rejection-order-invalidurl-beforeunload.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-rejection-order-invalidurl-detached.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-rejection-order-invalidurl-unload.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-rejection-order-invalidurl-unserializablestate.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-rejection-order-unload-unserializablestate.html rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/navigation-methods/return-value/navigate-transitionWhile-interrupted.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/navigation-methods/return-value/navigate-transitionWhile-rejected.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/navigation-methods/return-value/navigate-transitionWhile.html (100%) create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-unload.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-unserializable-state.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-already-detached.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-beforeunload.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-detach-in-onnavigate.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-detach-in-serialization.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-initial-about-blank.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-preventDefault.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-rejection-order-beforeunload-unserializablestate.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-rejection-order-detached-unserializablestate.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-rejection-order-unload-unserializablestate.html rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/navigation-methods/return-value/reload-transitionWhile-rejected.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/navigation-methods/return-value/reload-transitionWhile.html (100%) create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-unload.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-unserializable-state.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/resources/204-205-download-on-second-visit.py create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/resources/back-forward-opaque-origin-page.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/resources/helpers.js create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/resources/navigate-opaque-origin-page.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-already-detached.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-beforeunload.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-cross-document-preventDefault.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-current.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-detach-cross-document.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-detach-same-document.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-invalid-key.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-repeated.html rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/navigation-methods/return-value/traverseTo-transitionWhile-rejected.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/navigation-methods/return-value/traverseTo-transitionWhile.html (100%) create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/sandboxing-navigate-parent.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/sandboxing-navigate-sibling.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/traverseTo-after-adding-iframe.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/traverseTo-after-data-url.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/traverseTo-cross-document.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/traverseTo-detach-between-navigate-and-navigatesuccess.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/traverseTo-multiple-steps.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/traverseTo-navigates-multiple-iframes.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/traverseTo-same-document.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/navigation-methods/traverseTo-with-cross-origin-in-history.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/README.md rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/ordering-and-transition/anchor-download-transitionWhile-reject.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/ordering-and-transition/anchor-download-transitionWhile.html (100%) create mode 100644 blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/anchor-download.html rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/ordering-and-transition/back-same-document-transitionWhile-reject.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/ordering-and-transition/back-same-document-transitionWhile.html (100%) create mode 100644 blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/back-same-document.html rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/ordering-and-transition/currententrychange-before-popstate-transitionWhile.html (100%) create mode 100644 blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/currententrychange-dispose-ordering.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/location-href-canceled.html rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/ordering-and-transition/location-href-double-transitionWhile.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/ordering-and-transition/location-href-transitionWhile-reentrant.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/ordering-and-transition/location-href-transitionWhile-reject.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/ordering-and-transition/location-href-transitionWhile.html (100%) create mode 100644 blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/navigate-204-205-download-then-same-document.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/navigate-canceled.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/navigate-cross-document-double.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/navigate-cross-document-event-order.html rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/ordering-and-transition/navigate-double-transitionWhile.html (100%) create mode 100644 blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/navigate-in-transition-finished.html rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/ordering-and-transition/navigate-same-document-transitionWhile-reentrant.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/ordering-and-transition/navigate-same-document-transitionWhile-reject.html (100%) create mode 100644 blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/navigate-same-document.html rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/ordering-and-transition/navigate-transitionWhile-stop.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/ordering-and-transition/navigate-transitionWhile.html (100%) create mode 100644 blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/reload-canceled.html rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/ordering-and-transition/reload-transitionWhile-reject.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/ordering-and-transition/reload-transitionWhile.html (100%) create mode 100644 blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/resources/helpers.mjs create mode 100644 blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/resources/notify-top-early.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/transition-cross-document.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/transition-finished-mark-as-handled.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/transition-realms-and-identity.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/per-entry-events/dispose-after-bfcache.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/per-entry-events/dispose-cross-document.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/per-entry-events/dispose-same-document-navigate-during.html rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/per-entry-events/dispose-same-document-reload-with-transitionWhile.html (100%) rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/per-entry-events/dispose-same-document-replace-with-transitionWhile.html (100%) create mode 100644 blink/web_tests/wpt_internal/navigation-api/per-entry-events/dispose-same-document-replaceState.html rename blink/web_tests/{external/wpt => wpt_internal}/navigation-api/per-entry-events/dispose-same-document-transitionWhile.html (100%) create mode 100644 blink/web_tests/wpt_internal/navigation-api/per-entry-events/dispose-same-document.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/scroll-restoration/after-transition-basic.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/scroll-restoration/after-transition-change-history-scroll-restoration-during-promise.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/scroll-restoration/after-transition-reject.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/scroll-restoration/after-transition-timing.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/scroll-restoration/after-transition-with-history-scroll-restoration-manual.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/scroll-restoration/manual-basic.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/scroll-restoration/manual-immediate-restoreScroll.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/scroll-restoration/manual-restoreScroll-after-dispatch.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/scroll-restoration/manual-restoreScroll-after-resolve.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/scroll-restoration/manual-restoreScroll-repeated.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/scroll-restoration/restoreScroll-exceptions.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/state/cross-document-away-and-back.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/state/cross-document-getState-undefined.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/state/cross-document-getState.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/state/cross-document-location-api.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/state/history-pushState.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/state/history-replaceState.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/state/location-reload.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/state/same-document-away-and-back-location-api.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/state/same-document-away-and-back-navigation-api.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/basic.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/cross-document-away-and-back.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/cross-document-location-api.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/exception-order-initial-about-blank-unserializablestate.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/exception-order-not-fully-active-unserializablestate.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/history-pushState.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/history-replaceState.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/initial-about-blank.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/location-reload.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/no-args.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/not-fully-active.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/opaque-origin.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/resources/opaque-origin-page.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/same-document-away-and-back-location-api.html create mode 100644 blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/unserializable.html diff --git a/blink/public/devtools_protocol/browser_protocol.pdl b/blink/public/devtools_protocol/browser_protocol.pdl index ee606e466425..9ebd743ae78e 100644 --- a/blink/public/devtools_protocol/browser_protocol.pdl +++ b/blink/public/devtools_protocol/browser_protocol.pdl @@ -765,6 +765,7 @@ experimental domain Audits LocalCSSFileExtensionRejected MediaSourceAbortRemove MediaSourceDurationTruncatingBuffered + NavigateEventTransitionWhile NoSysexWebMIDIWithoutPermission NotificationInsecureOrigin NotificationPermissionRequestedIframe diff --git a/blink/public/mojom/use_counter/metrics/web_feature.mojom b/blink/public/mojom/use_counter/metrics/web_feature.mojom index 079c62bc1775..2ae5a54d3c64 100644 --- a/blink/public/mojom/use_counter/metrics/web_feature.mojom +++ b/blink/public/mojom/use_counter/metrics/web_feature.mojom @@ -3621,6 +3621,7 @@ enum WebFeature { kCookieDomainNonASCII = 4300, kClientHintsMetaEquivDelegateCH = 4301, kExpectCTHeader = 4302, + kNavigateEventTransitionWhile = 4303, // Add new features immediately above this line. Don't change assigned // numbers of any item, and don't reuse removed slots. diff --git a/blink/renderer/bindings/generated_in_core.gni b/blink/renderer/bindings/generated_in_core.gni index 6de84b7a7840..cb93879e2bad 100644 --- a/blink/renderer/bindings/generated_in_core.gni +++ b/blink/renderer/bindings/generated_in_core.gni @@ -55,6 +55,8 @@ generated_callback_function_sources_in_core = [ "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_mojo_watch_callback.h", "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_mutation_callback.cc", "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_mutation_callback.h", + "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_navigation_intercept_handler.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_navigation_intercept_handler.h", "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_no_argument_constructor.cc", "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_no_argument_constructor.h", "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_performance_observer_callback.cc", @@ -97,6 +99,8 @@ generated_dictionary_sources_in_core = [ "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_navigate_event_init.h", "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_navigation_current_entry_change_event_init.cc", "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_navigation_current_entry_change_event_init.h", + "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_navigation_intercept_options.cc", + "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_navigation_intercept_options.h", "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_navigation_navigate_options.cc", "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_navigation_navigate_options.h", "$root_gen_dir/third_party/blink/renderer/bindings/core/v8/v8_navigation_options.cc", diff --git a/blink/renderer/bindings/idl_in_core.gni b/blink/renderer/bindings/idl_in_core.gni index c1a40b254f97..a8ba436f0661 100644 --- a/blink/renderer/bindings/idl_in_core.gni +++ b/blink/renderer/bindings/idl_in_core.gni @@ -511,6 +511,7 @@ static_idl_files_in_core = get_path_info( "//third_party/blink/renderer/core/navigation_api/navigation_current_entry_change_event.idl", "//third_party/blink/renderer/core/navigation_api/navigation_destination.idl", "//third_party/blink/renderer/core/navigation_api/navigation_history_entry.idl", + "//third_party/blink/renderer/core/navigation_api/navigation_intercept_options.idl", "//third_party/blink/renderer/core/navigation_api/navigation_navigate_options.idl", "//third_party/blink/renderer/core/navigation_api/navigation_options.idl", "//third_party/blink/renderer/core/navigation_api/navigation_reload_options.idl", diff --git a/blink/renderer/core/frame/deprecation/deprecation.cc b/blink/renderer/core/frame/deprecation/deprecation.cc index dab6a6ed15f9..158534defff2 100644 --- a/blink/renderer/core/frame/deprecation/deprecation.cc +++ b/blink/renderer/core/frame/deprecation/deprecation.cc @@ -241,6 +241,9 @@ const DeprecationInfo GetDeprecationInfo(WebFeature feature) { case WebFeature::kIdentityInCanMakePaymentEvent: return DeprecationInfo::WithTranslation( feature, DeprecationIssueType::kIdentityInCanMakePaymentEvent); + case WebFeature::kNavigateEventTransitionWhile: + return DeprecationInfo::WithTranslation( + feature, DeprecationIssueType::kNavigateEventTransitionWhile); default: return DeprecationInfo::NotDeprecated(feature); } diff --git a/blink/renderer/core/inspector/inspector_audits_issue.cc b/blink/renderer/core/inspector/inspector_audits_issue.cc index 426cfb7588b3..e23d7d397991 100644 --- a/blink/renderer/core/inspector/inspector_audits_issue.cc +++ b/blink/renderer/core/inspector/inspector_audits_issue.cc @@ -505,6 +505,10 @@ void AuditsIssue::ReportDeprecationIssue(ExecutionContext* execution_context, type = protocol::Audits::DeprecationIssueTypeEnum:: MediaSourceDurationTruncatingBuffered; break; + case DeprecationIssueType::kNavigateEventTransitionWhile: + type = protocol::Audits::DeprecationIssueTypeEnum:: + NavigateEventTransitionWhile; + break; case DeprecationIssueType::kNoSysexWebMIDIWithoutPermission: type = protocol::Audits::DeprecationIssueTypeEnum:: NoSysexWebMIDIWithoutPermission; diff --git a/blink/renderer/core/inspector/inspector_audits_issue.h b/blink/renderer/core/inspector/inspector_audits_issue.h index 3458bd36e459..53714d3fe294 100644 --- a/blink/renderer/core/inspector/inspector_audits_issue.h +++ b/blink/renderer/core/inspector/inspector_audits_issue.h @@ -62,6 +62,7 @@ enum class DeprecationIssueType { kLocalCSSFileExtensionRejected, kMediaSourceAbortRemove, kMediaSourceDurationTruncatingBuffered, + kNavigateEventTransitionWhile, kNoSysexWebMIDIWithoutPermission, kNotDeprecated, kNotificationInsecureOrigin, diff --git a/blink/renderer/core/loader/document_loader.cc b/blink/renderer/core/loader/document_loader.cc index ade96a9d09c6..974eddf1fd42 100644 --- a/blink/renderer/core/loader/document_loader.cc +++ b/blink/renderer/core/loader/document_loader.cc @@ -826,6 +826,8 @@ void DocumentLoader::UpdateForSameDocumentNavigation( if (auto* navigation_api = NavigationApi::navigation(*frame_->DomWindow())) navigation_api->UpdateForNavigation(*history_item_, type); + if (!frame_) + return; // Aything except a history.pushState/replaceState is considered a new // navigation that resets whether the user has scrolled and fires popstate. diff --git a/blink/renderer/core/navigation_api/navigate_event.cc b/blink/renderer/core/navigation_api/navigate_event.cc index 7f2bcbd8457c..ebc4f9211dc6 100644 --- a/blink/renderer/core/navigation_api/navigate_event.cc +++ b/blink/renderer/core/navigation_api/navigate_event.cc @@ -6,12 +6,15 @@ #include "third_party/blink/public/mojom/devtools/console_message.mojom-shared.h" #include "third_party/blink/renderer/bindings/core/v8/v8_navigate_event_init.h" +#include "third_party/blink/renderer/bindings/core/v8/v8_navigation_intercept_handler.h" +#include "third_party/blink/renderer/bindings/core/v8/v8_navigation_intercept_options.h" #include "third_party/blink/renderer/bindings/core/v8/v8_navigation_transition_while_options.h" #include "third_party/blink/renderer/core/dom/abort_signal.h" #include "third_party/blink/renderer/core/dom/dom_exception.h" #include "third_party/blink/renderer/core/dom/element.h" #include "third_party/blink/renderer/core/event_interface_names.h" #include "third_party/blink/renderer/core/event_type_names.h" +#include "third_party/blink/renderer/core/frame/deprecation/deprecation.h" #include "third_party/blink/renderer/core/frame/local_dom_window.h" #include "third_party/blink/renderer/core/html/forms/form_data.h" #include "third_party/blink/renderer/core/inspector/console_message.h" @@ -27,7 +30,7 @@ NavigateEvent::NavigateEvent(ExecutionContext* context, ExecutionContextClient(context), navigation_type_(init->navigationType()), destination_(init->destination()), - can_transition_(init->canTransition()), + can_intercept_(init->canIntercept()), user_initiated_(init->userInitiated()), hash_change_(init->hashChange()), signal_(init->signal()), @@ -40,52 +43,51 @@ NavigateEvent::NavigateEvent(ExecutionContext* context, DCHECK(IsA(context)); } -void NavigateEvent::transitionWhile(ScriptState* script_state, - ScriptPromise newNavigationAction, - NavigationTransitionWhileOptions* options, - ExceptionState& exception_state) { +bool NavigateEvent::PerformSharedInteceptChecksAndSetup( + NavigationTransitionWhileOptions* options, + const String& function_name, + ExceptionState& exception_state) { if (!DomWindow()) { exception_state.ThrowDOMException( DOMExceptionCode::kInvalidStateError, - "transitionWhile() may not be called in a " - "detached window."); - return; + function_name + "() may not be called in a detached window."); + return false; } if (!isTrusted()) { exception_state.ThrowSecurityError( - "transitionWhile() may only be called on a " - "trusted event."); - return; + function_name + "() may only be called on a trusted event."); + return false; } - if (!can_transition_) { + if (!can_intercept_) { exception_state.ThrowSecurityError( "A navigation with URL '" + url_.ElidedString() + - "' cannot be intercepted by transitionWhile() in a window with origin " - "'" + + "' cannot be intercepted by in a window with origin '" + DomWindow()->GetSecurityOrigin()->ToString() + "' and URL '" + DomWindow()->Url().ElidedString() + "'."); - return; + return false; } if (!IsBeingDispatched()) { exception_state.ThrowDOMException( DOMExceptionCode::kInvalidStateError, - "transitionWhile() may only be called while the navigate event is " - "being dispatched."); + function_name + + "() may only be called while the navigate event is " + "being dispatched."); + return false; } if (defaultPrevented()) { exception_state.ThrowDOMException( DOMExceptionCode::kInvalidStateError, - "transitionWhile() may not be called if the event has been canceled."); - return; + function_name + "() may not be called if the event has been canceled."); + return false; } - if (navigation_action_promises_list_.IsEmpty()) + if (!HasNavigationActions()) { DomWindow()->document()->AddFocusedElementChangeObserver(this); - navigation_action_promises_list_.push_back(newNavigationAction); + } if (options->hasFocusReset()) { if (focus_reset_behavior_ && @@ -117,12 +119,47 @@ void NavigateEvent::transitionWhile(ScriptState* script_state, } scroll_restoration_behavior_ = options->scrollRestoration(); } + return true; +} + +void NavigateEvent::transitionWhile(ScriptPromise newNavigationAction, + NavigationTransitionWhileOptions* options, + ExceptionState& exception_state) { + if (DomWindow()) { + Deprecation::CountDeprecation(DomWindow(), + WebFeature::kNavigateEventTransitionWhile); + } + + if (PerformSharedInteceptChecksAndSetup(options, "transitionWhile", + exception_state)) { + has_navigation_actions_ = true; + navigation_action_promises_list_.push_back(newNavigationAction); + } +} + +void NavigateEvent::intercept(NavigationInterceptOptions* options, + ExceptionState& exception_state) { + if (PerformSharedInteceptChecksAndSetup(options, "intercept", + exception_state)) { + has_navigation_actions_ = true; + if (options->hasHandler()) + navigation_action_handlers_list_.push_back(options->handler()); + } +} + +void NavigateEvent::FinalizeNavigationActionPromisesList() { + for (auto& function : navigation_action_handlers_list_) { + ScriptPromise result; + if (function->Invoke(this).To(&result)) + navigation_action_promises_list_.push_back(result); + } + navigation_action_handlers_list_.clear(); } void NavigateEvent::ResetFocusIfNeeded() { // We only do focus reset if transitionWhile() was called, opting us into the // new default behavior which the navigation API provides. - if (navigation_action_promises_list_.IsEmpty()) + if (!HasNavigationActions()) return; auto* document = DomWindow()->document(); document->RemoveFocusedElementChangeObserver(this); @@ -150,12 +187,12 @@ void NavigateEvent::ResetFocusIfNeeded() { } void NavigateEvent::DidChangeFocus() { - DCHECK(!navigation_action_promises_list_.IsEmpty()); + DCHECK(HasNavigationActions()); did_change_focus_during_transition_while_ = true; } bool NavigateEvent::ShouldSendAxEvents() const { - return !navigation_action_promises_list_.IsEmpty(); + return HasNavigationActions(); } void NavigateEvent::restoreScroll(ExceptionState& exception_state) { @@ -231,6 +268,7 @@ void NavigateEvent::Trace(Visitor* visitor) const { visitor->Trace(form_data_); visitor->Trace(info_); visitor->Trace(navigation_action_promises_list_); + visitor->Trace(navigation_action_handlers_list_); } } // namespace blink diff --git a/blink/renderer/core/navigation_api/navigate_event.h b/blink/renderer/core/navigation_api/navigate_event.h index b13728e18e88..f133b1d769fa 100644 --- a/blink/renderer/core/navigation_api/navigate_event.h +++ b/blink/renderer/core/navigation_api/navigate_event.h @@ -25,10 +25,12 @@ namespace blink { class AbortSignal; class NavigationDestination; class NavigateEventInit; +class NavigationInterceptOptions; class NavigationTransitionWhileOptions; class ExceptionState; class FormData; class ScriptPromise; +class V8NavigationInterceptHandler; class NavigateEvent final : public Event, public ExecutionContextClient, @@ -50,7 +52,7 @@ class NavigateEvent final : public Event, String navigationType() { return navigation_type_; } NavigationDestination* destination() { return destination_; } - bool canTransition() const { return can_transition_; } + bool canIntercept() const { return can_intercept_; } bool userInitiated() const { return user_initiated_; } bool hashChange() const { return hash_change_; } AbortSignal* signal() { return signal_; } @@ -58,10 +60,10 @@ class NavigateEvent final : public Event, String downloadRequest() const { return download_request_; } ScriptValue info() const { return info_; } - void transitionWhile(ScriptState*, - ScriptPromise newNavigationAction, + void transitionWhile(ScriptPromise newNavigationAction, NavigationTransitionWhileOptions*, ExceptionState&); + void intercept(NavigationInterceptOptions*, ExceptionState&); void restoreScroll(ExceptionState&); void RestoreScrollAfterTransitionIfNeeded(); @@ -69,6 +71,9 @@ class NavigateEvent final : public Event, const HeapVector& GetNavigationActionPromisesList() { return navigation_action_promises_list_; } + bool HasNavigationActions() const { return has_navigation_actions_; } + void FinalizeNavigationActionPromisesList(); + void ResetFocusIfNeeded(); bool ShouldSendAxEvents() const; @@ -81,12 +86,15 @@ class NavigateEvent final : public Event, void Trace(Visitor*) const final; private: + bool PerformSharedInteceptChecksAndSetup(NavigationTransitionWhileOptions*, + const String& function_name, + ExceptionState&); void RestoreScrollInternal(); bool InManualScrollRestorationMode(); String navigation_type_; Member destination_; - bool can_transition_; + bool can_intercept_; bool user_initiated_; bool hash_change_; Member signal_; @@ -99,7 +107,10 @@ class NavigateEvent final : public Event, absl::optional history_item_view_state_; KURL url_; + bool has_navigation_actions_ = false; HeapVector navigation_action_promises_list_; + HeapVector> + navigation_action_handlers_list_; enum class ManualRestoreState { kNotRestored, kRestored, kDone }; ManualRestoreState restore_state_ = ManualRestoreState::kNotRestored; diff --git a/blink/renderer/core/navigation_api/navigate_event.idl b/blink/renderer/core/navigation_api/navigate_event.idl index 9db202e7dcb2..860745053362 100644 --- a/blink/renderer/core/navigation_api/navigate_event.idl +++ b/blink/renderer/core/navigation_api/navigate_event.idl @@ -11,7 +11,8 @@ readonly attribute NavigationNavigationType navigationType; readonly attribute NavigationDestination destination; - readonly attribute boolean canTransition; + [ImplementedAs=canIntercept] readonly attribute boolean canTransition; + readonly attribute boolean canIntercept; readonly attribute boolean userInitiated; readonly attribute boolean hashChange; readonly attribute AbortSignal signal; @@ -19,6 +20,7 @@ readonly attribute DOMString? downloadRequest; readonly attribute any info; - [CallWith=ScriptState, RaisesException] void transitionWhile(Promise newNavigationAction, optional NavigationTransitionWhileOptions options = {}); + [RaisesException] void transitionWhile(Promise newNavigationAction, optional NavigationTransitionWhileOptions options = {}); + [RaisesException] void intercept(optional NavigationInterceptOptions options = {}); [RaisesException] void restoreScroll(); }; diff --git a/blink/renderer/core/navigation_api/navigate_event_init.idl b/blink/renderer/core/navigation_api/navigate_event_init.idl index a74566f18de0..5b3a893c0c76 100644 --- a/blink/renderer/core/navigation_api/navigate_event_init.idl +++ b/blink/renderer/core/navigation_api/navigate_event_init.idl @@ -14,7 +14,7 @@ enum NavigationNavigationType { dictionary NavigateEventInit : EventInit { NavigationNavigationType navigationType = "push"; required NavigationDestination destination; - boolean canTransition = false; + boolean canIntercept = false; boolean userInitiated = false; boolean hashChange = false; required AbortSignal signal; diff --git a/blink/renderer/core/navigation_api/navigation_api.cc b/blink/renderer/core/navigation_api/navigation_api.cc index a1e2ad3411f2..0ecd490bd0b2 100644 --- a/blink/renderer/core/navigation_api/navigation_api.cc +++ b/blink/renderer/core/navigation_api/navigation_api.cc @@ -310,20 +310,41 @@ void NavigationApi::UpdateForNavigation(HistoryItem& item, // Note how reload types don't update the current entry or dispose any // entries. - // It's important to do this before firing dispose events, since dispose - // events could start another navigation or otherwise mess with - // ongoing_navigation_. + // It's important to do this before firing dispose events, since + // currententrychange or dispose events below could start another navigation + // or otherwise mess with ongoing_navigation_. In that case, waiting to call + // NotifyAboutTheCommittedToEntry() leads to the committed promise rejecting, + // even though we have already committed and the promise should definitely + // fulfill. if (ongoing_navigation_) { ongoing_navigation_->NotifyAboutTheCommittedToEntry( entries_[current_entry_index_], type); } + NavigateEvent* ongoing_navigate_event = ongoing_navigate_event_; + + // Entering a MicrotasksScope here allows us to defer microtasks from running + // immediately after the currententrychange and dispose events if there is an + // event listener for any of those events. This ensures a stable + // relative ordering of the navigateResult.committed promise (fulfilled in + // NotifyAboutTheCommittedToEntry() above) and any intercept() handlers (run + // in FinalizeNavigationActionPromisesList() below). intercept() handlers must + // execute first. + // Without the microtasks scope deferring promise continuations, the order + // inverts when committing a browser-initiated same-document navigation and + // an event listener is present for either currententrychange or dispose. + v8::MicrotasksScope scope(GetSupplementable()->GetIsolate(), + v8::MicrotasksScope::kRunMicrotasks); + auto* init = NavigationCurrentEntryChangeEventInit::Create(); init->setNavigationType(DetermineNavigationType(type)); init->setFrom(old_current); DispatchEvent(*NavigationCurrentEntryChangeEvent::Create( event_type_names::kCurrententrychange, init)); + if (ongoing_navigate_event) + ongoing_navigate_event->FinalizeNavigationActionPromisesList(); + for (const auto& disposed_entry : disposed_entries) { disposed_entry->DispatchEvent(*Event::Create(event_type_names::kDispose)); } @@ -758,7 +779,7 @@ NavigationApi::DispatchResult NavigationApi::DispatchNavigateEvent( init->setDestination(destination); init->setCancelable(params.frame_load_type != WebFrameLoadType::kBackForward); - init->setCanTransition( + init->setCanIntercept( CanChangeToUrlForHistoryApi( params.url, GetSupplementable()->GetSecurityOrigin(), current_url) && (params.event_type != NavigateEventType::kCrossDocument || @@ -792,8 +813,7 @@ NavigationApi::DispatchResult NavigationApi::DispatchNavigateEvent( return DispatchResult::kAbort; } - auto promise_list = navigate_event->GetNavigationActionPromisesList(); - if (!promise_list.IsEmpty()) { + if (navigate_event->HasNavigationActions()) { transition_ = MakeGarbageCollected( script_state, navigation_type, currentEntry()); @@ -813,11 +833,12 @@ NavigationApi::DispatchResult NavigationApi::DispatchNavigateEvent( params.is_synchronously_committed_same_document); } - if (!promise_list.IsEmpty() || + if (navigate_event->HasNavigationActions() || params.event_type != NavigateEventType::kCrossDocument) { NavigateReaction::ReactType react_type = - promise_list.IsEmpty() ? NavigateReaction::ReactType::kImmediate - : NavigateReaction::ReactType::kTransitionWhile; + navigate_event->HasNavigationActions() + ? NavigateReaction::ReactType::kTransitionWhile + : NavigateReaction::ReactType::kImmediate; // There is a subtle timing difference between the fast-path for zero // promises and the path for 1+ promises, in both spec and implementation. @@ -827,6 +848,7 @@ NavigationApi::DispatchResult NavigationApi::DispatchNavigateEvent( // finished promise, ...) that the difference is pretty easily observable by // web developers and web platform tests. So, let's make sure we always go // down the 1+ promises path. + auto promise_list = navigate_event->GetNavigationActionPromisesList(); const HeapVector& tweaked_promise_list = promise_list.IsEmpty() ? HeapVector( @@ -842,8 +864,9 @@ NavigationApi::DispatchResult NavigationApi::DispatchNavigateEvent( // navigations, because they might later get interrupted by another // navigation, in which case we need to reject the promises and so on. - return promise_list.IsEmpty() ? DispatchResult::kContinue - : DispatchResult::kTransitionWhile; + return navigate_event->HasNavigationActions() + ? DispatchResult::kTransitionWhile + : DispatchResult::kContinue; } void NavigationApi::InformAboutCanceledNavigation( @@ -890,7 +913,7 @@ void NavigationApi::ContextDestroyed() { bool NavigationApi::HasNonDroppedOngoingNavigation() const { bool has_ongoing_transition_while = ongoing_navigate_event_ && - !ongoing_navigate_event_->GetNavigationActionPromisesList().IsEmpty(); + ongoing_navigate_event_->HasNavigationActions(); return has_ongoing_transition_while && !has_dropped_navigation_; } diff --git a/blink/renderer/core/navigation_api/navigation_intercept_options.idl b/blink/renderer/core/navigation_api/navigation_intercept_options.idl new file mode 100644 index 000000000000..14c957096269 --- /dev/null +++ b/blink/renderer/core/navigation_api/navigation_intercept_options.idl @@ -0,0 +1,10 @@ +// Copyright 2021 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// https://wicg.github.io/navigation-api/ +callback NavigationInterceptHandler = Promise(); + +dictionary NavigationInterceptOptions : NavigationTransitionWhileOptions { + NavigationInterceptHandler handler; +}; diff --git a/blink/web_tests/external/wpt/navigation-api/currententrychange-event/navigation-navigate-intercept.html b/blink/web_tests/external/wpt/navigation-api/currententrychange-event/navigation-navigate-intercept.html new file mode 100644 index 000000000000..af0fe104f944 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/currententrychange-event/navigation-navigate-intercept.html @@ -0,0 +1,21 @@ + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/currententrychange-event/navigation-navigate-replace-intercept.html b/blink/web_tests/external/wpt/navigation-api/currententrychange-event/navigation-navigate-replace-intercept.html new file mode 100644 index 000000000000..33209202d8ce --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/currententrychange-event/navigation-navigate-replace-intercept.html @@ -0,0 +1,23 @@ + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/currententrychange-event/navigation-reload-intercept.html b/blink/web_tests/external/wpt/navigation-api/currententrychange-event/navigation-reload-intercept.html new file mode 100644 index 000000000000..275e23363c9b --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/currententrychange-event/navigation-reload-intercept.html @@ -0,0 +1,21 @@ + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/focus-reset/autofocus.html b/blink/web_tests/external/wpt/navigation-api/focus-reset/autofocus.html index 4418dfa76cde..60444473673b 100644 --- a/blink/web_tests/external/wpt/navigation-api/focus-reset/autofocus.html +++ b/blink/web_tests/external/wpt/navigation-api/focus-reset/autofocus.html @@ -23,7 +23,7 @@ assert_equals(document.activeElement, decoy, "focus() worked"); navigation.addEventListener("navigate", e => { - e.transitionWhile(Promise.resolve()); + e.intercept(); }, { once: true }); const { committed, finished } = navigation.navigate("#1"); @@ -44,7 +44,7 @@ assert_equals(document.activeElement, decoy, "focus() worked"); navigation.addEventListener("navigate", e => { - e.transitionWhile(Promise.resolve()); + e.intercept(); }, { once: true }); const { committed, finished } = navigation.navigate("#1"); @@ -65,7 +65,7 @@ assert_equals(document.activeElement, decoy, "focus() worked"); navigation.addEventListener("navigate", e => { - e.transitionWhile(Promise.resolve()); + e.intercept(); }, { once: true }); const { committed, finished } = navigation.navigate("#1"); @@ -88,7 +88,7 @@ assert_equals(document.activeElement, decoy, "focus() worked"); navigation.addEventListener("navigate", e => { - e.transitionWhile(Promise.resolve()); + e.intercept(); }, { once: true }); const { committed, finished } = navigation.navigate("#1"); @@ -111,7 +111,7 @@ assert_equals(document.activeElement, decoy, "focus() worked"); navigation.addEventListener("navigate", e => { - e.transitionWhile(Promise.resolve()); + e.intercept(); }, { once: true }); const { committed, finished } = navigation.navigate("#1"); @@ -134,7 +134,7 @@ assert_equals(document.activeElement, decoy, "focus() worked"); navigation.addEventListener("navigate", e => { - e.transitionWhile(Promise.resolve()); + e.intercept(); }, { once: true }); const { committed, finished } = navigation.navigate("#1"); @@ -156,7 +156,7 @@ assert_equals(document.activeElement, decoy, "focus() worked"); navigation.addEventListener("navigate", e => { - e.transitionWhile(Promise.resolve()); + e.intercept(); }, { once: true }); const { committed, finished } = navigation.navigate("#1"); diff --git a/blink/web_tests/external/wpt/navigation-api/focus-reset/basic.html b/blink/web_tests/external/wpt/navigation-api/focus-reset/basic.html index 1ffaa022ee4b..f5a30972b0e5 100644 --- a/blink/web_tests/external/wpt/navigation-api/focus-reset/basic.html +++ b/blink/web_tests/external/wpt/navigation-api/focus-reset/basic.html @@ -12,7 +12,7 @@ navigation.addEventListener("navigate", e => { assert_throws_js(TypeError, () => { - e.transitionWhile(Promise.resolve(), { focusReset: "invalid" }); + e.intercept({ focusReset: "invalid" }); }); throwAssertionHappened = true; }, { once: true }); @@ -27,40 +27,37 @@ testFocusWasReset(t => { navigation.addEventListener("navigate", e => { - e.transitionWhile(Promise.resolve()); + e.intercept(); }, { once: true }); }, "Resets the focus when no focusReset option is provided"); testFocusWasReset(t => { navigation.addEventListener("navigate", e => { - e.transitionWhile(Promise.resolve()); + e.intercept(); }, { once: true }); }, "Resets the focus when focusReset is explicitly set to undefined"); testFocusWasReset(t => { navigation.addEventListener("navigate", e => { - e.transitionWhile(new Promise(r => t.step_timeout(r, 5))); + e.intercept({ handler: () => new Promise(r => t.step_timeout(r, 5)) }); }, { once: true }); }, "Resets the focus when no focusReset option is provided (nontrivial fulfilled promise)"); testFocusWasReset(t => { navigation.addEventListener("navigate", e => { - e.transitionWhile(Promise.reject()); + e.intercept({ handler: () => Promise.reject() }); }, { once: true }); }, "Resets the focus when no focusReset option is provided (rejected promise)"); testFocusWasReset(t => { navigation.addEventListener("navigate", e => { - e.transitionWhile( - Promise.resolve(), - { focusReset: "after-transition" } - ); + e.intercept({ focusReset: "after-transition" }); }, { once: true }); }, "Resets the focus when focusReset is explicitly set to 'after-transition'"); testFocusWasNotReset(t => { navigation.addEventListener("navigate", e => { - e.transitionWhile(Promise.resolve(), { focusReset: "manual" }); + e.intercept({ focusReset: "manual" }); }); }, "Does not reset the focus when focusReset is set to 'manual'"); diff --git a/blink/web_tests/external/wpt/navigation-api/focus-reset/change-focus-again-in-blur-during-intercept.html b/blink/web_tests/external/wpt/navigation-api/focus-reset/change-focus-again-in-blur-during-intercept.html new file mode 100644 index 000000000000..a7339c97883f --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/focus-reset/change-focus-again-in-blur-during-intercept.html @@ -0,0 +1,35 @@ + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/focus-reset/change-focus-back-to-origial-during-intercept.html b/blink/web_tests/external/wpt/navigation-api/focus-reset/change-focus-back-to-origial-during-intercept.html new file mode 100644 index 000000000000..4e5b9dfb6aa3 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/focus-reset/change-focus-back-to-origial-during-intercept.html @@ -0,0 +1,36 @@ + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/focus-reset/change-focus-during-intercept.html b/blink/web_tests/external/wpt/navigation-api/focus-reset/change-focus-during-intercept.html new file mode 100644 index 000000000000..0593231a3900 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/focus-reset/change-focus-during-intercept.html @@ -0,0 +1,34 @@ + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/focus-reset/change-focus-then-remove-during-intercept.html b/blink/web_tests/external/wpt/navigation-api/focus-reset/change-focus-then-remove-during-intercept.html new file mode 100644 index 000000000000..a5d8062ce085 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/focus-reset/change-focus-then-remove-during-intercept.html @@ -0,0 +1,40 @@ + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/focus-reset/multiple-intercept.html b/blink/web_tests/external/wpt/navigation-api/focus-reset/multiple-intercept.html new file mode 100644 index 000000000000..75e38c98a40f --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/focus-reset/multiple-intercept.html @@ -0,0 +1,69 @@ + + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/click-crossdocument-crossorigin-sameorigindomain.sub.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/click-crossdocument-crossorigin-sameorigindomain.sub.html index d162d8ddb883..676672a230f1 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/click-crossdocument-crossorigin-sameorigindomain.sub.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/click-crossdocument-crossorigin-sameorigindomain.sub.html @@ -24,7 +24,7 @@ iframe.contentWindow.navigation.onnavigate = t.step_func_done(e => { assert_equals(e.navigationType, "push", "navigationType"); assert_true(e.cancelable, "cancelable"); - assert_true(e.canTransition, "canTransition"); + assert_true(e.canIntercept, "canIntercept"); assert_false(e.userInitiated, "userInitiated"); assert_false(e.hashChange, "hashChange"); assert_equals(e.formData, null, "formData"); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/click-crossdocument-sameorigin.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/click-crossdocument-sameorigin.html index 928d202045e3..41c3ca71eef1 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/click-crossdocument-sameorigin.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/click-crossdocument-sameorigin.html @@ -12,7 +12,7 @@ i.contentWindow.navigation.onnavigate = t.step_func_done(e => { assert_equals(e.navigationType, "push", "navigationType"); assert_true(e.cancelable, "cancelable"); - assert_true(e.canTransition, "canTransition"); + assert_true(e.canIntercept, "canIntercept"); assert_false(e.userInitiated, "userInitiated"); assert_false(e.hashChange, "hashChange"); assert_equals(e.formData, null, "formData"); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/click-samedocument-crossorigin-sameorigindomain.sub.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/click-samedocument-crossorigin-sameorigindomain.sub.html index b7d284088081..a467ecf9d73d 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/click-samedocument-crossorigin-sameorigindomain.sub.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/click-samedocument-crossorigin-sameorigindomain.sub.html @@ -24,7 +24,7 @@ iframe.contentWindow.navigation.onnavigate = t.step_func_done(e => { assert_equals(e.navigationType, "push", "navigationType"); assert_true(e.cancelable, "cancelable"); - assert_true(e.canTransition, "canTransition"); + assert_true(e.canIntercept, "canIntercept"); assert_false(e.userInitiated, "userInitiated"); assert_true(e.hashChange, "hashChange"); assert_equals(e.formData, null, "formData"); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/click-samedocument-crossorigin.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/click-samedocument-crossorigin.html index 32bc4cd291ac..b9fa97f6d526 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/click-samedocument-crossorigin.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/click-samedocument-crossorigin.html @@ -22,7 +22,7 @@ window.onmessage = t.step_func_done(e => { assert_equals(e.data.navigationType, "push", "navigationType"); assert_true(e.data.cancelable, "cancelable"); - assert_true(e.data.canTransition, "canTransition"); + assert_true(e.data.canIntercept, "canIntercept"); assert_false(e.data.userInitiated, "userInitiated"); assert_true(e.data.hashChange, "hashChange"); assert_equals(e.data.formData, null, "formData"); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/click-samedocument-sameorigin.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/click-samedocument-sameorigin.html index fc815abb39eb..566bea3dc7e9 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/click-samedocument-sameorigin.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/click-samedocument-sameorigin.html @@ -10,7 +10,7 @@ i.contentWindow.navigation.onnavigate = t.step_func_done(e => { assert_equals(e.navigationType, "push", "navigationType"); assert_true(e.cancelable, "cancelable"); - assert_true(e.canTransition, "canTransition"); + assert_true(e.canIntercept, "canIntercept"); assert_false(e.userInitiated, "userInitiated"); assert_true(e.hashChange, "hashChange"); assert_equals(e.formData, null, "formData"); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/location-crossdocument-crossorigin-sameorigindomain.sub.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/location-crossdocument-crossorigin-sameorigindomain.sub.html index 24824b12177d..77a5873c0838 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/location-crossdocument-crossorigin-sameorigindomain.sub.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/location-crossdocument-crossorigin-sameorigindomain.sub.html @@ -17,7 +17,7 @@ iframe.contentWindow.navigation.onnavigate = t.step_func_done(e => { assert_equals(e.navigationType, "push", "navigationType"); assert_true(e.cancelable, "cancelable"); - assert_true(e.canTransition, "canTransition"); + assert_true(e.canIntercept, "canIntercept"); assert_false(e.userInitiated, "userInitiated"); assert_false(e.hashChange, "hashChange"); assert_equals(e.formData, null, "formData"); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/location-crossdocument-sameorigin.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/location-crossdocument-sameorigin.html index 1ac3eef87477..41ac1b037506 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/location-crossdocument-sameorigin.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/location-crossdocument-sameorigin.html @@ -9,7 +9,7 @@ i.contentWindow.navigation.onnavigate = t.step_func_done(e => { assert_equals(e.navigationType, "push", "navigationType"); assert_true(e.cancelable, "cancelable"); - assert_true(e.canTransition, "canTransition"); + assert_true(e.canIntercept, "canIntercept"); assert_false(e.userInitiated, "userInitiated"); assert_false(e.hashChange, "hashChange"); assert_equals(e.formData, null, "formData"); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/location-samedocument-crossorigin-sameorigindomain.sub.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/location-samedocument-crossorigin-sameorigindomain.sub.html index 96032c14ac60..1eda74e98283 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/location-samedocument-crossorigin-sameorigindomain.sub.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/location-samedocument-crossorigin-sameorigindomain.sub.html @@ -17,7 +17,7 @@ iframe.contentWindow.navigation.onnavigate = t.step_func_done(e => { assert_equals(e.navigationType, "push", "navigationType"); assert_true(e.cancelable, "cancelable"); - assert_true(e.canTransition, "canTransition"); + assert_true(e.canIntercept, "canIntercept"); assert_false(e.userInitiated, "userInitiated"); assert_true(e.hashChange, "hashChange"); assert_equals(e.formData, null, "formData"); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/location-samedocument-crossorigin.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/location-samedocument-crossorigin.html index 8a58be7a2b41..5679236a7ddc 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/location-samedocument-crossorigin.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/location-samedocument-crossorigin.html @@ -15,7 +15,7 @@ window.onmessage = t.step_func_done(e => { assert_equals(e.data.navigationType, "push", "navigationType"); assert_true(e.data.cancelable, "cancelable"); - assert_true(e.data.canTransition, "canTransition"); + assert_true(e.data.canIntercept, "canIntercept"); assert_false(e.data.userInitiated, "userInitiated"); assert_true(e.data.hashChange, "hashChange"); assert_equals(e.data.formData, null, "formData"); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/location-samedocument-sameorigin.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/location-samedocument-sameorigin.html index 3901b9ddbccc..a7e4181c3a19 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/location-samedocument-sameorigin.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/location-samedocument-sameorigin.html @@ -9,7 +9,7 @@ i.contentWindow.navigation.onnavigate = t.step_func_done(e => { assert_equals(e.navigationType, "push", "navigationType"); assert_true(e.cancelable, "cancelable"); - assert_true(e.canTransition, "canTransition"); + assert_true(e.canIntercept, "canIntercept"); assert_false(e.userInitiated, "userInitiated"); assert_true(e.hashChange, "hashChange"); assert_equals(e.formData, null, "formData"); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/open-crossdocument-crossorigin-sameorigindomain.sub.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/open-crossdocument-crossorigin-sameorigindomain.sub.html index d386e487a333..ea9ea479c347 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/open-crossdocument-crossorigin-sameorigindomain.sub.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/open-crossdocument-crossorigin-sameorigindomain.sub.html @@ -18,7 +18,7 @@ iframe.contentWindow.navigation.onnavigate = t.step_func_done(e => { assert_equals(e.navigationType, "push", "navigationType"); assert_true(e.cancelable, "cancelable"); - assert_true(e.canTransition, "canTransition"); + assert_true(e.canIntercept, "canIntercept"); assert_false(e.userInitiated, "userInitiated"); assert_false(e.hashChange, "hashChange"); assert_equals(e.formData, null, "formData"); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/open-crossdocument-sameorigin.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/open-crossdocument-sameorigin.html index a899dd86a3a7..478483e238d7 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/open-crossdocument-sameorigin.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/open-crossdocument-sameorigin.html @@ -9,7 +9,7 @@ i.contentWindow.navigation.onnavigate = t.step_func_done(e => { assert_equals(e.navigationType, "push", "navigationType"); assert_true(e.cancelable, "cancelable"); - assert_true(e.canTransition, "canTransition"); + assert_true(e.canIntercept, "canIntercept"); assert_false(e.userInitiated, "userInitiated"); assert_false(e.hashChange, "hashChange"); assert_equals(e.formData, null, "formData"); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/open-samedocument-crossorigin-sameorigindomain.sub.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/open-samedocument-crossorigin-sameorigindomain.sub.html index b44303c18b8b..324adb32a459 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/open-samedocument-crossorigin-sameorigindomain.sub.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/open-samedocument-crossorigin-sameorigindomain.sub.html @@ -18,7 +18,7 @@ iframe.contentWindow.navigation.onnavigate = t.step_func_done(e => { assert_equals(e.navigationType, "push", "navigationType"); assert_true(e.cancelable, "cancelable"); - assert_true(e.canTransition, "canTransition"); + assert_true(e.canIntercept, "canIntercept"); assert_false(e.userInitiated, "userInitiated"); assert_true(e.hashChange, "hashChange"); assert_equals(e.formData, null, "formData"); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/open-samedocument-crossorigin.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/open-samedocument-crossorigin.html index 65f062fcd578..23dceb042048 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/open-samedocument-crossorigin.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/open-samedocument-crossorigin.html @@ -16,7 +16,7 @@ window.onmessage = t.step_func_done(e => { assert_equals(e.data.navigationType, "push", "navigationType"); assert_true(e.data.cancelable, "cancelable"); - assert_true(e.data.canTransition, "canTransition"); + assert_true(e.data.canIntercept, "canIntercept"); assert_false(e.data.userInitiated, "userInitiated"); assert_true(e.data.hashChange, "hashChange"); assert_equals(e.data.formData, null, "formData"); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/open-samedocument-sameorigin.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/open-samedocument-sameorigin.html index 3f3c38d85062..9ca853180343 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/open-samedocument-sameorigin.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/open-samedocument-sameorigin.html @@ -9,7 +9,7 @@ i.contentWindow.navigation.onnavigate = t.step_func_done(e => { assert_equals(e.navigationType, "push", "navigationType"); assert_true(e.cancelable, "cancelable"); - assert_true(e.canTransition, "canTransition"); + assert_true(e.canIntercept, "canIntercept"); assert_false(e.userInitiated, "userInitiated"); assert_true(e.hashChange, "hashChange"); assert_equals(e.formData, null, "formData"); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/resources/cross-origin-iframe-helper.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/resources/cross-origin-iframe-helper.html index 96e8a0c1e654..3393a2ecaa9e 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/resources/cross-origin-iframe-helper.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/cross-window/resources/cross-origin-iframe-helper.html @@ -1,9 +1,10 @@ + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-and-navigate.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-and-navigate.html new file mode 100644 index 000000000000..dfbb67b6b6b1 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-and-navigate.html @@ -0,0 +1,27 @@ + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-canceled-event.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-canceled-event.html new file mode 100644 index 000000000000..d4b9633c1a37 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-canceled-event.html @@ -0,0 +1,17 @@ + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-cross-document-same-origin.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-cross-document-same-origin.html new file mode 100644 index 000000000000..0d610cce4f50 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-cross-document-same-origin.html @@ -0,0 +1,21 @@ + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-cross-origin.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-cross-origin.html new file mode 100644 index 000000000000..b367df546c6a --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-cross-origin.html @@ -0,0 +1,18 @@ + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-detach-multiple.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-detach-multiple.html new file mode 100644 index 000000000000..5b6a62328491 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-detach-multiple.html @@ -0,0 +1,18 @@ + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-detach.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-detach.html new file mode 100644 index 000000000000..b5ce45aa29c3 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-detach.html @@ -0,0 +1,17 @@ + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-handler-null-or-undefined.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-handler-null-or-undefined.html new file mode 100644 index 000000000000..7f5bd6b19f83 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-handler-null-or-undefined.html @@ -0,0 +1,21 @@ + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-handler-returns-non-promise.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-handler-returns-non-promise.html new file mode 100644 index 000000000000..96116e929533 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-handler-returns-non-promise.html @@ -0,0 +1,18 @@ + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-handler-throws.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-handler-throws.html new file mode 100644 index 000000000000..769f67599974 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-handler-throws.html @@ -0,0 +1,26 @@ + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-history-pushState.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-history-pushState.html new file mode 100644 index 000000000000..aad08b742ef4 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-history-pushState.html @@ -0,0 +1,23 @@ + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-history-replaceState.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-history-replaceState.html new file mode 100644 index 000000000000..16edec8596e4 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-history-replaceState.html @@ -0,0 +1,23 @@ + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-multiple-times-reject.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-multiple-times-reject.html new file mode 100644 index 000000000000..0b0f1f0b8e83 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-multiple-times-reject.html @@ -0,0 +1,38 @@ + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-multiple-times.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-multiple-times.html new file mode 100644 index 000000000000..6deaeeb507de --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-multiple-times.html @@ -0,0 +1,41 @@ + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-navigation-back.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-navigation-back.html new file mode 100644 index 000000000000..8babf2bcdcc5 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-navigation-back.html @@ -0,0 +1,19 @@ + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-on-synthetic-event.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-on-synthetic-event.html new file mode 100644 index 000000000000..3a4b54de5e9c --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-on-synthetic-event.html @@ -0,0 +1,17 @@ + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-popstate.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-popstate.html new file mode 100644 index 000000000000..f5f9d82be7f7 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-popstate.html @@ -0,0 +1,26 @@ + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-reject.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-reject.html new file mode 100644 index 000000000000..4c5ec0163d1a --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-reject.html @@ -0,0 +1,29 @@ + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-resolve.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-resolve.html new file mode 100644 index 000000000000..b60d89b5dfee --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-resolve.html @@ -0,0 +1,20 @@ + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-same-document-history-back.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-same-document-history-back.html new file mode 100644 index 000000000000..6faabe196465 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/intercept-same-document-history-back.html @@ -0,0 +1,40 @@ + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-anchor-cross-origin.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-anchor-cross-origin.html index 38b7d584b885..d8f2e383124b 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-anchor-cross-origin.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-anchor-cross-origin.html @@ -7,7 +7,7 @@ navigation.onnavigate = t.step_func_done(e => { assert_equals(e.navigationType, "push"); assert_true(e.cancelable); - assert_false(e.canTransition); + assert_false(e.canIntercept); assert_false(e.userInitiated); assert_false(e.hashChange); assert_equals(e.formData, null); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-anchor-download-userInitiated.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-anchor-download-userInitiated.html index c42f389ba67b..90a612b75886 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-anchor-download-userInitiated.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-anchor-download-userInitiated.html @@ -11,7 +11,7 @@ navigation.onnavigate = t.step_func(e => { assert_equals(e.navigationType, "push"); assert_true(e.cancelable); - assert_true(e.canTransition); + assert_true(e.canIntercept); assert_true(e.userInitiated); assert_false(e.hashChange); assert_equals(e.downloadRequest, ""); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-anchor-download.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-anchor-download.html index 5615e3473844..c5ca306b7908 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-anchor-download.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-anchor-download.html @@ -14,7 +14,7 @@ navigation.onnavigate = t.step_func_done(e => { assert_equals(e.navigationType, "push"); assert_true(e.cancelable); - assert_true(e.canTransition); + assert_true(e.canIntercept); assert_false(e.userInitiated); assert_false(e.hashChange); assert_equals(e.downloadRequest, download_attr); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-anchor-fragment.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-anchor-fragment.html index 591ed73dbf16..b7706b7debea 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-anchor-fragment.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-anchor-fragment.html @@ -7,7 +7,7 @@ navigation.onnavigate = t.step_func(e => { assert_equals(e.navigationType, "push"); assert_true(e.cancelable); - assert_true(e.canTransition); + assert_true(e.canIntercept); assert_false(e.userInitiated); assert_true(e.hashChange); assert_equals(e.downloadRequest, null); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-anchor-same-origin-cross-document.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-anchor-same-origin-cross-document.html index 822f2f33ba4d..b8e925a4dbac 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-anchor-same-origin-cross-document.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-anchor-same-origin-cross-document.html @@ -7,7 +7,7 @@ navigation.onnavigate = t.step_func_done(e => { assert_equals(e.navigationType, "push"); assert_true(e.cancelable); - assert_true(e.canTransition); + assert_true(e.canIntercept); assert_false(e.userInitiated); assert_false(e.hashChange); assert_equals(e.formData, null); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-anchor-userInitiated.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-anchor-userInitiated.html index 832a3f843e22..b746bbe3f028 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-anchor-userInitiated.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-anchor-userInitiated.html @@ -10,7 +10,7 @@ navigation.onnavigate = t.step_func(e => { assert_equals(e.navigationType, "push"); assert_true(e.cancelable); - assert_true(e.canTransition); + assert_true(e.canIntercept); assert_true(e.userInitiated); assert_true(e.hashChange); assert_equals(e.formData, null); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-anchor-with-target.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-anchor-with-target.html index a0de04d5ea44..c2053a37b09a 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-anchor-with-target.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-anchor-with-target.html @@ -12,7 +12,7 @@ iframe.contentWindow.navigation.onnavigate = t.step_func_done(e => { assert_equals(e.navigationType, "push"); assert_true(e.cancelable); - assert_true(e.canTransition); + assert_true(e.canIntercept); assert_false(e.userInitiated); assert_false(e.hashChange); assert_equals(e.formData, null); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-form-get.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-form-get.html index d3cafa1b3fa3..69a49eb08a67 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-form-get.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-form-get.html @@ -9,7 +9,7 @@ assert_equals(e.navigationType, "replace"); assert_true(e.cancelable); - assert_true(e.canTransition); + assert_true(e.canIntercept); assert_false(e.userInitiated); assert_false(e.hashChange); assert_equals(e.downloadRequest, null); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-form-userInitiated.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-form-userInitiated.html index d6fc712c26a0..454f0773962f 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-form-userInitiated.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-form-userInitiated.html @@ -14,7 +14,7 @@ assert_equals(e.navigationType, "push"); assert_true(e.cancelable); - assert_true(e.canTransition); + assert_true(e.canIntercept); assert_true(e.userInitiated); assert_false(e.hashChange); assert_equals(e.downloadRequest, null); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-form-with-target.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-form-with-target.html index 12cafe5eb081..b23ab3a70ccb 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-form-with-target.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-form-with-target.html @@ -11,7 +11,7 @@ iframe.contentWindow.navigation.onnavigate = t.step_func_done(e => { assert_equals(e.navigationType, "push"); assert_true(e.cancelable); - assert_true(e.canTransition); + assert_true(e.canIntercept); assert_false(e.userInitiated); assert_false(e.hashChange); assert_equals(e.downloadRequest, null); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-form.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-form.html index bc120420ca3c..b537a9b58f09 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-form.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-form.html @@ -9,7 +9,7 @@ assert_equals(e.navigationType, "replace"); assert_true(e.cancelable); - assert_true(e.canTransition); + assert_true(e.canIntercept); assert_false(e.userInitiated); assert_false(e.hashChange); assert_equals(e.downloadRequest, null); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-history-back-after-fragment.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-history-back-after-fragment.html index ddabfaeef5af..976754f28a88 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-history-back-after-fragment.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-history-back-after-fragment.html @@ -13,7 +13,7 @@ navigation.onnavigate = t.step_func_done(e => { assert_equals(e.navigationType, "traverse"); assert_false(e.cancelable); - assert_true(e.canTransition); + assert_true(e.canIntercept); assert_false(e.userInitiated); assert_true(e.hashChange); assert_equals(e.downloadRequest, null); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-history-back-after-pushState.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-history-back-after-pushState.html index 074aa7156815..4d870fb2ae6d 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-history-back-after-pushState.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-history-back-after-pushState.html @@ -13,7 +13,7 @@ navigation.onnavigate = t.step_func_done(e => { assert_equals(e.navigationType, "traverse"); assert_false(e.cancelable); - assert_true(e.canTransition); + assert_true(e.canIntercept); assert_false(e.userInitiated); assert_false(e.hashChange); assert_equals(e.downloadRequest, null); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-history-back-cross-document.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-history-back-cross-document.html index 967cf5db0cdb..cd7be6e9ad37 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-history-back-cross-document.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-history-back-cross-document.html @@ -12,7 +12,7 @@ i.contentWindow.navigation.onnavigate = t.step_func_done(e => { assert_equals(e.navigationType, "traverse"); assert_false(e.cancelable); - assert_false(e.canTransition); + assert_false(e.canIntercept); assert_false(e.userInitiated); assert_false(e.hashChange); assert_equals(e.downloadRequest, null); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-history-go-0.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-history-go-0.html index f7453e4805f8..96d98cf44c82 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-history-go-0.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-history-go-0.html @@ -8,7 +8,7 @@ i.contentWindow.navigation.onnavigate = t.step_func_done(e => { assert_equals(e.navigationType, "reload"); assert_true(e.cancelable); - assert_true(e.canTransition); + assert_true(e.canIntercept); assert_false(e.userInitiated); assert_false(e.hashChange); assert_equals(e.downloadRequest, null); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-history-pushState.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-history-pushState.html index 0651c529daa3..2f8c81c7090c 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-history-pushState.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-history-pushState.html @@ -7,7 +7,7 @@ navigation.onnavigate = t.step_func(e => { assert_equals(e.navigationType, "push"); assert_true(e.cancelable); - assert_true(e.canTransition); + assert_true(e.canIntercept); assert_false(e.userInitiated); assert_false(e.hashChange); assert_equals(e.downloadRequest, null); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-history-replaceState.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-history-replaceState.html index d0fe5d949ba1..d8417fbfd308 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-history-replaceState.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-history-replaceState.html @@ -7,7 +7,7 @@ navigation.onnavigate = t.step_func(e => { assert_equals(e.navigationType, "replace"); assert_true(e.cancelable); - assert_true(e.canTransition); + assert_true(e.canIntercept); assert_false(e.userInitiated); assert_false(e.hashChange); assert_equals(e.downloadRequest, null); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-iframe-location.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-iframe-location.html index cbf16c896a85..059b99501183 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-iframe-location.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-iframe-location.html @@ -11,7 +11,7 @@ iframe.contentWindow.navigation.onnavigate = t.step_func_done(e => { assert_equals(e.navigationType, "push"); assert_true(e.cancelable); - assert_true(e.canTransition); + assert_true(e.canIntercept); assert_false(e.userInitiated); assert_true(e.hashChange); assert_equals(e.downloadRequest, null); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-location.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-location.html index 998da50994ca..c5aa0be97a47 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-location.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-location.html @@ -7,7 +7,7 @@ navigation.onnavigate = t.step_func_done(e => { assert_equals(e.navigationType, "replace"); assert_true(e.cancelable); - assert_true(e.canTransition); + assert_true(e.canIntercept); assert_false(e.userInitiated); assert_true(e.hashChange); assert_equals(e.downloadRequest, null); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-meta-refresh.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-meta-refresh.html index 9077fec5fa05..1f8ed306851f 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-meta-refresh.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-meta-refresh.html @@ -10,7 +10,7 @@ i.contentWindow.navigation.onnavigate = t.step_func_done(e => { assert_equals(e.navigationType, "reload"); assert_true(e.cancelable); - assert_true(e.canTransition); + assert_true(e.canIntercept); assert_false(e.userInitiated); assert_false(e.hashChange); assert_equals(e.downloadRequest, null); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-navigation-back-cross-document.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-navigation-back-cross-document.html index 4847ac8f1be9..214644066e1d 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-navigation-back-cross-document.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-navigation-back-cross-document.html @@ -12,7 +12,7 @@ i.contentWindow.navigation.onnavigate = t.step_func_done(e => { assert_equals(e.navigationType, "traverse"); assert_false(e.cancelable); - assert_false(e.canTransition); + assert_false(e.canIntercept); assert_false(e.userInitiated); assert_false(e.hashChange); assert_equals(e.downloadRequest, null); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-navigation-back-same-document.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-navigation-back-same-document.html index 626ea33136ad..8753e6b1c86b 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-navigation-back-same-document.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-navigation-back-same-document.html @@ -12,7 +12,7 @@ navigation.onnavigate = t.step_func_done(e => { assert_equals(e.navigationType, "traverse"); assert_false(e.cancelable); - assert_true(e.canTransition); + assert_true(e.canIntercept); assert_false(e.userInitiated); assert_true(e.hashChange); assert_equals(e.downloadRequest, null); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-navigation-navigate.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-navigation-navigate.html index adc71a324379..76f98c723610 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-navigation-navigate.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-navigation-navigate.html @@ -6,7 +6,7 @@ navigation.onnavigate = t.step_func_done(e => { assert_equals(e.navigationType, "replace"); assert_true(e.cancelable); - assert_true(e.canTransition); + assert_true(e.canIntercept); assert_false(e.userInitiated); assert_true(e.hashChange); assert_equals(e.downloadRequest, null); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-to-srcdoc.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-to-srcdoc.html index 996fecfceaf6..26ad135b6ad0 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-to-srcdoc.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-to-srcdoc.html @@ -11,7 +11,7 @@ iframe.contentWindow.navigation.onnavigate = t.step_func(e => { assert_equals(e.navigationType, "push"); assert_true(e.cancelable, "cancelable"); - assert_false(e.canTransition, "canTransition"); + assert_false(e.canIntercept, "canIntercept"); assert_false(e.userInitiated, "userInitiated"); assert_false(e.hashChange, "hashChange"); assert_equals(e.downloadRequest, null); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-window-open-self.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-window-open-self.html index cdfc57c4a022..274c8bc4d576 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-window-open-self.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-window-open-self.html @@ -6,7 +6,7 @@ navigation.onnavigate = t.step_func_done(e => { assert_equals(e.navigationType, "push"); assert_true(e.cancelable); - assert_true(e.canTransition); + assert_true(e.canIntercept); assert_false(e.userInitiated); assert_true(e.hashChange); assert_equals(e.downloadRequest, null); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-window-open.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-window-open.html index aef333abc4d1..afc998271f6e 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-window-open.html +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/navigate-window-open.html @@ -11,7 +11,7 @@ iframe.contentWindow.navigation.onnavigate = t.step_func_done(e => { assert_equals(e.navigationType, "push"); assert_true(e.cancelable); - assert_true(e.canTransition); + assert_true(e.canIntercept); assert_false(e.userInitiated); assert_true(e.hashChange); assert_equals(e.downloadRequest, null); diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/signal-abort-intercept.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/signal-abort-intercept.html new file mode 100644 index 000000000000..1e92d8e445f6 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/signal-abort-intercept.html @@ -0,0 +1,18 @@ + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/signal-abort-window-stop-after-intercept.html b/blink/web_tests/external/wpt/navigation-api/navigate-event/signal-abort-window-stop-after-intercept.html new file mode 100644 index 000000000000..51ba7753a8a9 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/navigate-event/signal-abort-window-stop-after-intercept.html @@ -0,0 +1,40 @@ + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigation-history-entry/key-id-location-reload-intercept.html b/blink/web_tests/external/wpt/navigation-api/navigation-history-entry/key-id-location-reload-intercept.html new file mode 100644 index 000000000000..62ce0974399e --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/navigation-history-entry/key-id-location-reload-intercept.html @@ -0,0 +1,23 @@ + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigation-methods/navigate-intercept-history-state.html b/blink/web_tests/external/wpt/navigation-api/navigation-methods/navigate-intercept-history-state.html new file mode 100644 index 000000000000..7faf6ffb5a29 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/navigation-methods/navigate-intercept-history-state.html @@ -0,0 +1,14 @@ + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigation-methods/navigate-state-repeated-await.html b/blink/web_tests/external/wpt/navigation-api/navigation-methods/navigate-state-repeated-await.html index a003992d66a3..539b3dc1da9d 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigation-methods/navigate-state-repeated-await.html +++ b/blink/web_tests/external/wpt/navigation-api/navigation-methods/navigate-state-repeated-await.html @@ -3,7 +3,7 @@ + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/back-intercept.html b/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/back-intercept.html new file mode 100644 index 000000000000..2654045c2b00 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/back-intercept.html @@ -0,0 +1,25 @@ + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/forward-intercept-rejected.html b/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/forward-intercept-rejected.html new file mode 100644 index 000000000000..9e86dcca1976 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/forward-intercept-rejected.html @@ -0,0 +1,29 @@ + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/forward-intercept.html b/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/forward-intercept.html new file mode 100644 index 000000000000..ce4ab3217070 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/forward-intercept.html @@ -0,0 +1,28 @@ + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-intercept-interrupted.html b/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-intercept-interrupted.html new file mode 100644 index 000000000000..36403c892c6c --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-intercept-interrupted.html @@ -0,0 +1,23 @@ + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-intercept-rejected.html b/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-intercept-rejected.html new file mode 100644 index 000000000000..79c8bd803e34 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-intercept-rejected.html @@ -0,0 +1,17 @@ + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-intercept.html b/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-intercept.html new file mode 100644 index 000000000000..a9946c71ff3a --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-intercept.html @@ -0,0 +1,15 @@ + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/reload-intercept-rejected.html b/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/reload-intercept-rejected.html new file mode 100644 index 000000000000..93cd75c2b998 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/reload-intercept-rejected.html @@ -0,0 +1,17 @@ + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/reload-intercept.html b/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/reload-intercept.html new file mode 100644 index 000000000000..92f1636a6e85 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/reload-intercept.html @@ -0,0 +1,14 @@ + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/reload.html b/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/reload.html index 028d5855701a..388f0d94b503 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/reload.html +++ b/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/reload.html @@ -12,5 +12,5 @@ assertNeverSettles(t, result, i.contentWindow); await new Promise(resolve => i.onload = () => t.step_timeout(resolve, 0)); -}, "reload() promises never settle (without transitionWhile())"); +}, "reload() promises never settle (without intercept())"); diff --git a/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-intercept-rejected.html b/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-intercept-rejected.html new file mode 100644 index 000000000000..f934eae5d4c1 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-intercept-rejected.html @@ -0,0 +1,30 @@ + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-intercept.html b/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-intercept.html new file mode 100644 index 000000000000..a4cb4e711d8c --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-intercept.html @@ -0,0 +1,27 @@ + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigation-methods/traverseTo-detach-between-navigate-and-navigatesuccess.html b/blink/web_tests/external/wpt/navigation-api/navigation-methods/traverseTo-detach-between-navigate-and-navigatesuccess.html index 25dd13464962..a0a291888786 100644 --- a/blink/web_tests/external/wpt/navigation-api/navigation-methods/traverseTo-detach-between-navigate-and-navigatesuccess.html +++ b/blink/web_tests/external/wpt/navigation-api/navigation-methods/traverseTo-detach-between-navigate-and-navigatesuccess.html @@ -20,7 +20,7 @@ let result; i.contentWindow.navigation.onnavigate = t.step_func(e => { - e.transitionWhile(new Promise(resolve => () => t.step_timeout(resolve, 2))); + e.intercept({ handler: () => new Promise(resolve => t.step_timeout(resolve, 2)) }); t.step_timeout(() => i.remove(), 1); }); diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/README.md b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/README.md index 653dd2198c3a..628b22ec48b7 100644 --- a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/README.md +++ b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/README.md @@ -15,10 +15,10 @@ Note: existing for `currententrychange` causes code to run, and thus microtasks to run, at a very specific point in the navigation-commit lifecycle. We want to test that it doesn't impact the ordering. -* Similarly we test that `transitionWhile(Promise.resolve())` does not change - the ordering compared to no `transitionWhile()` call, for same-document +* Similarly we test that `intercept()` does not change + the ordering compared to no `intercept()` call, for same-document navigations, by trying to ensure most variants have appropriate - `transitionWhile()` counterparts with similar orderings. + `intercept()` counterparts with similar orderings. TODOs: diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/anchor-download-intercept-reject.html b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/anchor-download-intercept-reject.html new file mode 100644 index 000000000000..4869cedd2528 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/anchor-download-intercept-reject.html @@ -0,0 +1,54 @@ + + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/anchor-download-intercept.html b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/anchor-download-intercept.html new file mode 100644 index 000000000000..23326c827b7a --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/anchor-download-intercept.html @@ -0,0 +1,48 @@ + + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/anchor-download.html b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/anchor-download.html index 0490069c7aa4..c6af13c3e061 100644 --- a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/anchor-download.html +++ b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/anchor-download.html @@ -20,5 +20,5 @@ i.contentWindow.navigation.onnavigateerror = t.unreached_func("navigateerror must not fire"); await new Promise(resolve => t.step_timeout(resolve, 20)); assert_true(navigate_called); -}, " fires navigate, but not navigatesuccess or navigateerror when not intercepted by transitionWhile()"); +}, " fires navigate, but not navigatesuccess or navigateerror when not intercepted by intercept()"); diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/back-same-document-intercept-reject.html b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/back-same-document-intercept-reject.html new file mode 100644 index 000000000000..c0d4f5502713 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/back-same-document-intercept-reject.html @@ -0,0 +1,54 @@ + + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/back-same-document-intercept.html b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/back-same-document-intercept.html new file mode 100644 index 000000000000..7bd248bc9c5a --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/back-same-document-intercept.html @@ -0,0 +1,48 @@ + + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/currententrychange-before-popstate-intercept.html b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/currententrychange-before-popstate-intercept.html new file mode 100644 index 000000000000..c51c7c444cb9 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/currententrychange-before-popstate-intercept.html @@ -0,0 +1,48 @@ + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/intercept-async.html b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/intercept-async.html new file mode 100644 index 000000000000..f2ca0969506b --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/intercept-async.html @@ -0,0 +1,55 @@ + + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-double-intercept.html b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-double-intercept.html new file mode 100644 index 000000000000..36ae5ce4ab52 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-double-intercept.html @@ -0,0 +1,61 @@ + + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-intercept-reentrant.html b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-intercept-reentrant.html new file mode 100644 index 000000000000..3fabf52bfbab --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-intercept-reentrant.html @@ -0,0 +1,60 @@ + + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-intercept-reject.html b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-intercept-reject.html new file mode 100644 index 000000000000..b4aeb726b3b5 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-intercept-reject.html @@ -0,0 +1,50 @@ + + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-intercept.html b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-intercept.html new file mode 100644 index 000000000000..bb861d37ae54 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-intercept.html @@ -0,0 +1,44 @@ + + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-double-intercept.html b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-double-intercept.html new file mode 100644 index 000000000000..6ce67b9af644 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-double-intercept.html @@ -0,0 +1,68 @@ + + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-in-transition-finished.html b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-in-transition-finished.html index 8c74ba2f632f..9251cfe049d3 100644 --- a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-in-transition-finished.html +++ b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-in-transition-finished.html @@ -32,7 +32,7 @@ })); navigation.addEventListener("navigate", e => { - e.transitionWhile(Promise.resolve()); + e.intercept({ handler() { recorder.record("handler run"); } }); if (location.hash === "#1") { fromHash1 = navigation.currentEntry; @@ -50,6 +50,7 @@ /* event name, location.hash value, navigation.transition properties */ ["navigate", "", null], ["currententrychange", "#1", { from: fromStart, navigationType: "push" }], + ["handler run", "#1", { from: fromStart, navigationType: "push" }], ["committed fulfilled 1", "#1", { from: fromStart, navigationType: "push" }], ["promise microtask", "#1", { from: fromStart, navigationType: "push" }], ["navigatesuccess", "#1", { from: fromStart, navigationType: "push" }], @@ -58,6 +59,7 @@ ["navigate", "#1", null], ["currententrychange", "#2", { from: fromHash1, navigationType: "push" }], + ["handler run", "#2", { from: fromHash1, navigationType: "push" }], ["committed fulfilled 2", "#2", { from: fromHash1, navigationType: "push" }], ["navigatesuccess", "#2", { from: fromHash1, navigationType: "push" }], ["finished fulfilled 2", "#2", null], diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-intercept-stop.html b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-intercept-stop.html new file mode 100644 index 000000000000..5d126a8c2ff9 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-intercept-stop.html @@ -0,0 +1,52 @@ + + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-intercept.html b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-intercept.html new file mode 100644 index 000000000000..f76f20bf85ef --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-intercept.html @@ -0,0 +1,47 @@ + + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-same-document-intercept-reentrant.html b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-same-document-intercept-reentrant.html new file mode 100644 index 000000000000..86f4e0673135 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-same-document-intercept-reentrant.html @@ -0,0 +1,66 @@ + + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-same-document-intercept-reject.html b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-same-document-intercept-reject.html new file mode 100644 index 000000000000..88c668e0e99e --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-same-document-intercept-reject.html @@ -0,0 +1,53 @@ + + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/reload-intercept-reject.html b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/reload-intercept-reject.html new file mode 100644 index 000000000000..334d2108ecdc --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/reload-intercept-reject.html @@ -0,0 +1,53 @@ + + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/reload-intercept.html b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/reload-intercept.html new file mode 100644 index 000000000000..8d4160a4d959 --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/reload-intercept.html @@ -0,0 +1,47 @@ + + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/transition-finished-mark-as-handled.html b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/transition-finished-mark-as-handled.html index 859e07df1397..fa38b822166e 100644 --- a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/transition-finished-mark-as-handled.html +++ b/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/transition-finished-mark-as-handled.html @@ -5,7 +5,7 @@ + + diff --git a/blink/web_tests/external/wpt/navigation-api/per-entry-events/dispose-same-document-reload-with-intercept.html b/blink/web_tests/external/wpt/navigation-api/per-entry-events/dispose-same-document-reload-with-intercept.html new file mode 100644 index 000000000000..1e083714f65e --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/per-entry-events/dispose-same-document-reload-with-intercept.html @@ -0,0 +1,17 @@ + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/per-entry-events/dispose-same-document-replace-with-intercept.html b/blink/web_tests/external/wpt/navigation-api/per-entry-events/dispose-same-document-replace-with-intercept.html new file mode 100644 index 000000000000..4e492e30aede --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/per-entry-events/dispose-same-document-replace-with-intercept.html @@ -0,0 +1,36 @@ + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/scroll-restoration/after-transition-basic.html b/blink/web_tests/external/wpt/navigation-api/scroll-restoration/after-transition-basic.html index 647b12ba7d01..8270f8e2ad33 100644 --- a/blink/web_tests/external/wpt/navigation-api/scroll-restoration/after-transition-basic.html +++ b/blink/web_tests/external/wpt/navigation-api/scroll-restoration/after-transition-basic.html @@ -12,7 +12,7 @@ assert_equals(window.scrollY, 0); await navigation.navigate("#frag").finished; assert_not_equals(window.scrollY, 0); - navigation.onnavigate = e => e.transitionWhile(Promise.resolve(), { scrollRestoration: "after-transition" }); + navigation.onnavigate = e => e.intercept({ scrollRestoration: "after-transition" }); await navigation.back().finished; assert_equals(window.scrollY, 0); }, "scrollRestoration: after-transition should scroll when back completes"); diff --git a/blink/web_tests/external/wpt/navigation-api/scroll-restoration/after-transition-change-history-scroll-restoration-during-promise.html b/blink/web_tests/external/wpt/navigation-api/scroll-restoration/after-transition-change-history-scroll-restoration-during-promise.html index 5e60ca33721c..2e762379a531 100644 --- a/blink/web_tests/external/wpt/navigation-api/scroll-restoration/after-transition-change-history-scroll-restoration-during-promise.html +++ b/blink/web_tests/external/wpt/navigation-api/scroll-restoration/after-transition-change-history-scroll-restoration-during-promise.html @@ -15,15 +15,16 @@ await navigation.navigate("#frag").finished; assert_not_equals(window.scrollY, 0); - let transitionWhile_resolve; + let intercept_resolve; navigation.onnavigate = e => { - e.transitionWhile(new Promise(r => transitionWhile_resolve = r), { scrollRestoration: "after-transition" }); + e.intercept({ handler: () => new Promise(r => intercept_resolve = r), + scrollRestoration: "after-transition" }); }; let back_promises = navigation.back(); await back_promises.committed; history.scrollRestoration = "auto"; - transitionWhile_resolve(); + intercept_resolve(); await back_promises.finished; assert_equals(window.scrollY, 0); }, "scrollRestoration: after-transition should ignore history.scrollRestoration even if it changes in the middle of the navigation"); diff --git a/blink/web_tests/external/wpt/navigation-api/scroll-restoration/after-transition-intercept-handler-modifies.html b/blink/web_tests/external/wpt/navigation-api/scroll-restoration/after-transition-intercept-handler-modifies.html new file mode 100644 index 000000000000..a11c04c3250c --- /dev/null +++ b/blink/web_tests/external/wpt/navigation-api/scroll-restoration/after-transition-intercept-handler-modifies.html @@ -0,0 +1,33 @@ + + + + +
+ + diff --git a/blink/web_tests/external/wpt/navigation-api/scroll-restoration/after-transition-reject.html b/blink/web_tests/external/wpt/navigation-api/scroll-restoration/after-transition-reject.html index 7a75b8abd037..b1cfcede3ee7 100644 --- a/blink/web_tests/external/wpt/navigation-api/scroll-restoration/after-transition-reject.html +++ b/blink/web_tests/external/wpt/navigation-api/scroll-restoration/after-transition-reject.html @@ -12,10 +12,12 @@ assert_equals(window.scrollY, 0); await navigation.navigate("#frag").finished; assert_not_equals(window.scrollY, 0); - navigation.onnavigate = e => e.transitionWhile(Promise.reject(), { scrollRestoration: "after-transition" }); + navigation.onnavigate = + e => e.intercept({ handler: () => Promise.reject(), + scrollRestoration: "after-transition" }); await promise_rejects_exactly(t, undefined, navigation.back().finished); assert_not_equals(window.scrollY, 0); -}, "scrollRestoration: after-transition should not scroll when the transitionWhile promise rejects"); +}, "scrollRestoration: after-transition should not scroll when the intercept() handler rejects"); diff --git a/blink/web_tests/external/wpt/navigation-api/scroll-restoration/after-transition-timing.html b/blink/web_tests/external/wpt/navigation-api/scroll-restoration/after-transition-timing.html index 35a9071459f7..3bb892054aab 100644 --- a/blink/web_tests/external/wpt/navigation-api/scroll-restoration/after-transition-timing.html +++ b/blink/web_tests/external/wpt/navigation-api/scroll-restoration/after-transition-timing.html @@ -13,12 +13,6 @@ await navigation.navigate("#frag").finished; assert_not_equals(window.scrollY, 0); - let transitionWhile_resolve; - navigation.onnavigate = t.step_func(e => { - e.transitionWhile(new Promise(r => transitionWhile_resolve = r)); - assert_not_equals(window.scrollY, 0); - }), { scrollRestoration: "after-transition" }; - window.onpopstate = t.step_func(() => assert_not_equals(window.scrollY, 0)); window.onhashchange = t.step_func(() => assert_not_equals(window.scrollY, 0)); @@ -30,10 +24,21 @@ }); let back_promises = navigation.back(); - - await back_promises.committed; - transitionWhile_resolve(); - assert_not_equals(window.scrollY, 0); + navigation.onnavigate = t.step_func(e => { + e.intercept({ scrollRestoration: "after-transition", + handler: async () => { + // The ordering here should be: + // * intercept() is called + // * back_promises.committed is resolved + // * this handler runs. + // If this handler incorrectly blocks back_promises.committed, + // this test will hang. + await back_promises.committed; + assert_not_equals(window.scrollY, 0); + } + }); + assert_not_equals(window.scrollY, 0); + }); await back_promises.finished; assert_equals(window.scrollY, 0); diff --git a/blink/web_tests/external/wpt/navigation-api/scroll-restoration/after-transition-with-history-scroll-restoration-manual.html b/blink/web_tests/external/wpt/navigation-api/scroll-restoration/after-transition-with-history-scroll-restoration-manual.html index 6c7a8385606e..90dfebd68bf8 100644 --- a/blink/web_tests/external/wpt/navigation-api/scroll-restoration/after-transition-with-history-scroll-restoration-manual.html +++ b/blink/web_tests/external/wpt/navigation-api/scroll-restoration/after-transition-with-history-scroll-restoration-manual.html @@ -15,7 +15,7 @@ await navigation.navigate("#frag").finished; assert_not_equals(window.scrollY, 0); - navigation.onnavigate = e => e.transitionWhile(Promise.resolve(), { scrollRestoration: "after-transition" }); + navigation.onnavigate = e => e.intercept({ scrollRestoration: "after-transition" }); await navigation.back().finished; assert_equals(window.scrollY, 0); }, "scrollRestoration: after-transition should ignore history.scrollRestoration"); diff --git a/blink/web_tests/external/wpt/navigation-api/scroll-restoration/manual-basic.html b/blink/web_tests/external/wpt/navigation-api/scroll-restoration/manual-basic.html index 84732fb532bd..5421cd66ae6f 100644 --- a/blink/web_tests/external/wpt/navigation-api/scroll-restoration/manual-basic.html +++ b/blink/web_tests/external/wpt/navigation-api/scroll-restoration/manual-basic.html @@ -12,7 +12,7 @@ assert_equals(window.scrollY, 0); await navigation.navigate("#frag").finished; assert_not_equals(window.scrollY, 0); - navigation.onnavigate = e => e.transitionWhile(Promise.resolve(), { scrollRestoration: "manual" }); + navigation.onnavigate = e => e.intercept({ scrollRestoration: "manual" }); await navigation.back().finished; assert_not_equals(window.scrollY, 0); }, "scrollRestoration: manual should prevent auto scroll on back."); diff --git a/blink/web_tests/external/wpt/navigation-api/scroll-restoration/manual-immediate-restoreScroll.html b/blink/web_tests/external/wpt/navigation-api/scroll-restoration/manual-immediate-restoreScroll.html index f0676ea1b378..c35a77e57d45 100644 --- a/blink/web_tests/external/wpt/navigation-api/scroll-restoration/manual-immediate-restoreScroll.html +++ b/blink/web_tests/external/wpt/navigation-api/scroll-restoration/manual-immediate-restoreScroll.html @@ -13,7 +13,7 @@ await navigation.navigate("#frag").finished; assert_not_equals(window.scrollY, 0); navigation.onnavigate = e => { - e.transitionWhile(Promise.resolve(), { scrollRestoration: "manual" }); + e.intercept({ scrollRestoration: "manual" }); e.restoreScroll(); assert_equals(window.scrollY, 0); } diff --git a/blink/web_tests/external/wpt/navigation-api/scroll-restoration/manual-restoreScroll-after-dispatch.html b/blink/web_tests/external/wpt/navigation-api/scroll-restoration/manual-restoreScroll-after-dispatch.html index a3d01a52a34f..4ebc08eb7149 100644 --- a/blink/web_tests/external/wpt/navigation-api/scroll-restoration/manual-restoreScroll-after-dispatch.html +++ b/blink/web_tests/external/wpt/navigation-api/scroll-restoration/manual-restoreScroll-after-dispatch.html @@ -13,18 +13,19 @@ await navigation.navigate("#frag").finished; assert_not_equals(window.scrollY, 0); - let transitionWhile_resolve; + let intercept_resolve; let navigate_event; navigation.onnavigate = e => { navigate_event = e; - e.transitionWhile(new Promise(r => transitionWhile_resolve = r), { scrollRestoration: "manual" }); + e.intercept({ handler: () => new Promise(r => intercept_resolve = r), + scrollRestoration: "manual" }); }; let back_promises = navigation.back(); await back_promises.committed; assert_not_equals(window.scrollY, 0); navigate_event.restoreScroll(); assert_equals(window.scrollY, 0); - transitionWhile_resolve(); + intercept_resolve(); await back_promises.finished; assert_equals(window.scrollY, 0); }, "scrollRestoration: restoreScroll() should work after a navigate event dispatch"); diff --git a/blink/web_tests/external/wpt/navigation-api/scroll-restoration/manual-restoreScroll-after-resolve.html b/blink/web_tests/external/wpt/navigation-api/scroll-restoration/manual-restoreScroll-after-resolve.html index 6cf0fe16061e..6a98638ffdd5 100644 --- a/blink/web_tests/external/wpt/navigation-api/scroll-restoration/manual-restoreScroll-after-resolve.html +++ b/blink/web_tests/external/wpt/navigation-api/scroll-restoration/manual-restoreScroll-after-resolve.html @@ -16,7 +16,7 @@ let navigate_event; navigation.onnavigate = e => { navigate_event = e; - e.transitionWhile(Promise.resolve(), { scrollRestoration: "manual" }); + e.intercept({ scrollRestoration: "manual" }); }; await navigation.back().finished; assert_not_equals(window.scrollY, 0); diff --git a/blink/web_tests/external/wpt/navigation-api/scroll-restoration/manual-restoreScroll-repeated.html b/blink/web_tests/external/wpt/navigation-api/scroll-restoration/manual-restoreScroll-repeated.html index 9ca5bfa06434..f29f533fe07c 100644 --- a/blink/web_tests/external/wpt/navigation-api/scroll-restoration/manual-restoreScroll-repeated.html +++ b/blink/web_tests/external/wpt/navigation-api/scroll-restoration/manual-restoreScroll-repeated.html @@ -13,7 +13,7 @@ await navigation.navigate("#frag").finished; assert_not_equals(window.scrollY, 0); navigation.onnavigate = t.step_func(e => { - e.transitionWhile(Promise.resolve(), { scrollRestoration: "manual" }); + e.intercept({ scrollRestoration: "manual" }); e.restoreScroll(); assert_equals(window.scrollY, 0); assert_throws_dom("InvalidStateError", () => e.restoreScroll()); diff --git a/blink/web_tests/external/wpt/navigation-api/scroll-restoration/restoreScroll-exceptions.html b/blink/web_tests/external/wpt/navigation-api/scroll-restoration/restoreScroll-exceptions.html index 2f2b459d93bd..0b9ff28d751a 100644 --- a/blink/web_tests/external/wpt/navigation-api/scroll-restoration/restoreScroll-exceptions.html +++ b/blink/web_tests/external/wpt/navigation-api/scroll-restoration/restoreScroll-exceptions.html @@ -12,27 +12,27 @@ // Throw for non-traverse navigation.addEventListener("navigate", t.step_func(e => { - e.transitionWhile(Promise.resolve()); + e.intercept(); assert_throws_dom("InvalidStateError", () => e.restoreScroll()); }), { once : true }); await navigation.navigate("#frag").finished; - // Throw for non-transitionWhile() traverse + // Throw for non-intercept() traverse navigation.addEventListener("navigate", t.step_func(e => { assert_throws_dom("InvalidStateError", () => e.restoreScroll()); }), { once : true }); await navigation.back().finished; - // Throw for transitionWhile() traverse with no explicit scrollRestoration behavior. + // Throw for intercept() traverse with no explicit scrollRestoration behavior. navigation.addEventListener("navigate", t.step_func(e => { - e.transitionWhile(Promise.resolve()); + e.intercept(); assert_throws_dom("InvalidStateError", () => e.restoreScroll()); }), { once : true }); await navigation.forward().finished; - // Throw for transitionWhile() traverse with scrollRestoration "after-transition". + // Throw for intercept() traverse with scrollRestoration "after-transition". navigation.addEventListener("navigate", t.step_func(e => { - e.transitionWhile(Promise.resolve(), { scrollRestoration: "after-transition" }); + e.intercept({ scrollRestoration: "after-transition" }); assert_throws_dom("InvalidStateError", () => e.restoreScroll()); }), { once : true }); await navigation.back().finished; diff --git a/blink/web_tests/platform/generic/virtual/stable/webexposed/global-interface-listing-expected.txt b/blink/web_tests/platform/generic/virtual/stable/webexposed/global-interface-listing-expected.txt index 973f73ae519b..874c6ec7eacd 100644 --- a/blink/web_tests/platform/generic/virtual/stable/webexposed/global-interface-listing-expected.txt +++ b/blink/web_tests/platform/generic/virtual/stable/webexposed/global-interface-listing-expected.txt @@ -4902,6 +4902,7 @@ interface NamedNodeMap method setNamedItemNS interface NavigateEvent : Event attribute @@toStringTag + getter canIntercept getter canTransition getter destination getter downloadRequest @@ -4912,6 +4913,7 @@ interface NavigateEvent : Event getter signal getter userInitiated method constructor + method intercept method restoreScroll method transitionWhile interface Navigation : EventTarget diff --git a/blink/web_tests/platform/generic/webexposed/global-interface-listing-expected.txt b/blink/web_tests/platform/generic/webexposed/global-interface-listing-expected.txt index fdd6f42afb09..8be8571eb107 100644 --- a/blink/web_tests/platform/generic/webexposed/global-interface-listing-expected.txt +++ b/blink/web_tests/platform/generic/webexposed/global-interface-listing-expected.txt @@ -5823,6 +5823,7 @@ interface NativeIOFileManager method requestCapacity interface NavigateEvent : Event attribute @@toStringTag + getter canIntercept getter canTransition getter destination getter downloadRequest @@ -5833,6 +5834,7 @@ interface NavigateEvent : Event getter signal getter userInitiated method constructor + method intercept method restoreScroll method transitionWhile interface Navigation : EventTarget diff --git a/blink/web_tests/wpt_internal/navigation-api/README.md b/blink/web_tests/wpt_internal/navigation-api/README.md new file mode 100644 index 000000000000..c0a10cbbbca4 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/README.md @@ -0,0 +1,11 @@ +This directory contains tests of the Navigation API that require +window.internals or that verify behavior where we are not spec-compliant. + +Currently, the directory contains a near-complete copy of the WPT navigation-api +suite. This tests the behavior of the deprecated transitionWhile() API, which is +scheduled for removal in M108. + +The tests that are not part of the transitionWhile() regression suite are: +* navigate-from-initial-about-blank-gc.html +* sandboxing-back-parent-never-settles.html +* sandboxing-back-sibling-never-settles.html diff --git a/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/anchor-click.html b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/anchor-click.html new file mode 100644 index 000000000000..e0bf91166aa2 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/anchor-click.html @@ -0,0 +1,18 @@ + + + +
+ diff --git a/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/constructor.html b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/constructor.html new file mode 100644 index 000000000000..b09e68e1c71e --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/constructor.html @@ -0,0 +1,32 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/history-back-same-doc.html b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/history-back-same-doc.html new file mode 100644 index 000000000000..768805b7526f --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/history-back-same-doc.html @@ -0,0 +1,24 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/history-pushState.html b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/history-pushState.html new file mode 100644 index 000000000000..1a17a7cec0ca --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/history-pushState.html @@ -0,0 +1,16 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/history-replaceState.html b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/history-replaceState.html new file mode 100644 index 000000000000..e8ae8ee57a2c --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/history-replaceState.html @@ -0,0 +1,18 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/location-api.html b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/location-api.html new file mode 100644 index 000000000000..88ebd985a1e9 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/location-api.html @@ -0,0 +1,18 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigate-from-initial-about-blank-same-doc-popup.html b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigate-from-initial-about-blank-same-doc-popup.html new file mode 100644 index 000000000000..2399fb2ef9cc --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigate-from-initial-about-blank-same-doc-popup.html @@ -0,0 +1,15 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigate-from-initial-about-blank-same-doc.html b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigate-from-initial-about-blank-same-doc.html new file mode 100644 index 000000000000..f0fa9cdf57b7 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigate-from-initial-about-blank-same-doc.html @@ -0,0 +1,12 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigate-from-initial-about-blank.html b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigate-from-initial-about-blank.html new file mode 100644 index 000000000000..56eaa1af265b --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigate-from-initial-about-blank.html @@ -0,0 +1,11 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-back-forward-cross-doc.html b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-back-forward-cross-doc.html new file mode 100644 index 000000000000..7416caa94b1f --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-back-forward-cross-doc.html @@ -0,0 +1,20 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-back-forward-same-doc.html b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-back-forward-same-doc.html new file mode 100644 index 000000000000..8182673aa59d --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-back-forward-same-doc.html @@ -0,0 +1,40 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-navigate-cross-doc.html b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-navigate-cross-doc.html new file mode 100644 index 000000000000..81a4e239baee --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-navigate-cross-doc.html @@ -0,0 +1,12 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-navigate-preventDefault.html b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-navigate-preventDefault.html new file mode 100644 index 000000000000..34b98353ba37 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-navigate-preventDefault.html @@ -0,0 +1,10 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-navigate-replace-cross-doc.html b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-navigate-replace-cross-doc.html new file mode 100644 index 000000000000..ab762c04bcbe --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-navigate-replace-cross-doc.html @@ -0,0 +1,12 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-navigate-replace-same-doc.html b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-navigate-replace-same-doc.html new file mode 100644 index 000000000000..f99359730572 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-navigate-replace-same-doc.html @@ -0,0 +1,23 @@ + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/currententrychange-event/navigation-navigate-replace-transitionWhile.html b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-navigate-replace-transitionWhile.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/currententrychange-event/navigation-navigate-replace-transitionWhile.html rename to blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-navigate-replace-transitionWhile.html diff --git a/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-navigate-same-doc.html b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-navigate-same-doc.html new file mode 100644 index 000000000000..87fc28d174a6 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-navigate-same-doc.html @@ -0,0 +1,21 @@ + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/currententrychange-event/navigation-navigate-transitionWhile.html b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-navigate-transitionWhile.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/currententrychange-event/navigation-navigate-transitionWhile.html rename to blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-navigate-transitionWhile.html diff --git a/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-reload-cross-doc.html b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-reload-cross-doc.html new file mode 100644 index 000000000000..e590cab3828e --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-reload-cross-doc.html @@ -0,0 +1,12 @@ + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/currententrychange-event/navigation-reload-transitionWhile.html b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-reload-transitionWhile.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/currententrychange-event/navigation-reload-transitionWhile.html rename to blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-reload-transitionWhile.html diff --git a/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-updateCurrentEntry.html b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-updateCurrentEntry.html new file mode 100644 index 000000000000..4423b2bc90e1 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/navigation-updateCurrentEntry.html @@ -0,0 +1,20 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/not-on-load.html b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/not-on-load.html new file mode 100644 index 000000000000..8cc1688913f7 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/not-on-load.html @@ -0,0 +1,17 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/properties.html b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/properties.html new file mode 100644 index 000000000000..e862543bcc1e --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/currententrychange-event/properties.html @@ -0,0 +1,14 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/focus-reset/autofocus.html b/blink/web_tests/wpt_internal/navigation-api/focus-reset/autofocus.html new file mode 100644 index 000000000000..4418dfa76cde --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/focus-reset/autofocus.html @@ -0,0 +1,185 @@ + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/focus-reset/basic.html b/blink/web_tests/wpt_internal/navigation-api/focus-reset/basic.html new file mode 100644 index 000000000000..1ffaa022ee4b --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/focus-reset/basic.html @@ -0,0 +1,66 @@ + + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/focus-reset/change-focus-again-in-blur-during-transitionWhile.html b/blink/web_tests/wpt_internal/navigation-api/focus-reset/change-focus-again-in-blur-during-transitionWhile.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/focus-reset/change-focus-again-in-blur-during-transitionWhile.html rename to blink/web_tests/wpt_internal/navigation-api/focus-reset/change-focus-again-in-blur-during-transitionWhile.html diff --git a/blink/web_tests/external/wpt/navigation-api/focus-reset/change-focus-back-to-origial-during-transitionWhile.html b/blink/web_tests/wpt_internal/navigation-api/focus-reset/change-focus-back-to-origial-during-transitionWhile.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/focus-reset/change-focus-back-to-origial-during-transitionWhile.html rename to blink/web_tests/wpt_internal/navigation-api/focus-reset/change-focus-back-to-origial-during-transitionWhile.html diff --git a/blink/web_tests/external/wpt/navigation-api/focus-reset/change-focus-during-transitionWhile.html b/blink/web_tests/wpt_internal/navigation-api/focus-reset/change-focus-during-transitionWhile.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/focus-reset/change-focus-during-transitionWhile.html rename to blink/web_tests/wpt_internal/navigation-api/focus-reset/change-focus-during-transitionWhile.html diff --git a/blink/web_tests/external/wpt/navigation-api/focus-reset/change-focus-then-remove-during-transitionWhile.html b/blink/web_tests/wpt_internal/navigation-api/focus-reset/change-focus-then-remove-during-transitionWhile.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/focus-reset/change-focus-then-remove-during-transitionWhile.html rename to blink/web_tests/wpt_internal/navigation-api/focus-reset/change-focus-then-remove-during-transitionWhile.html diff --git a/blink/web_tests/external/wpt/navigation-api/focus-reset/multiple-transitionWhile.html b/blink/web_tests/wpt_internal/navigation-api/focus-reset/multiple-transitionWhile.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/focus-reset/multiple-transitionWhile.html rename to blink/web_tests/wpt_internal/navigation-api/focus-reset/multiple-transitionWhile.html diff --git a/blink/web_tests/wpt_internal/navigation-api/focus-reset/resources/helpers.mjs b/blink/web_tests/wpt_internal/navigation-api/focus-reset/resources/helpers.mjs new file mode 100644 index 000000000000..0a8a0439e1c8 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/focus-reset/resources/helpers.mjs @@ -0,0 +1,73 @@ +// Usage note: if you use these more than once in a given file, be sure to +// clean up any navigate event listeners, e.g. by using { once: true }, between +// tests. + +const TAB_KEY = "\uE004"; + +export function testFocusWasReset(setupFunc, description) { + promise_test(async t => { + setupFunc(t); + + const button = document.body.appendChild(document.createElement("button")); + const button2 = document.body.appendChild(document.createElement("button")); + button2.tabIndex = 0; + t.add_cleanup(() => { + button.remove(); + button2.remove(); + }); + + assert_equals(document.activeElement, document.body, "Start on body"); + button.focus(); + assert_equals(document.activeElement, button, "focus() worked"); + + const { committed, finished } = navigation.navigate("#" + location.hash.substring(1) + "1"); + + await committed; + assert_equals(document.activeElement, button, "Focus stays on the button during the transition"); + + await finished.catch(() => {}); + assert_equals(document.activeElement, document.body, "Focus reset after the transition"); + + button2.onfocus = t.unreached_func("button2 must not be focused after pressing Tab"); + const focusPromise = waitForFocus(t, button); + await test_driver.send_keys(document.body, TAB_KEY); + await focusPromise; + }, description); +} + +export function testFocusWasNotReset(setupFunc, description) { + promise_test(async t => { + setupFunc(t); + + const button = document.body.appendChild(document.createElement("button")); + const button2 = document.body.appendChild(document.createElement("button")); + button2.tabIndex = 0; + t.add_cleanup(() => { + button.remove(); + button2.remove(); + }); + + assert_equals(document.activeElement, document.body, "Start on body"); + button.focus(); + assert_equals(document.activeElement, button, "focus() worked"); + + const { committed, finished } = navigation.navigate("#" + location.hash.substring(1) + "1"); + + await committed; + assert_equals(document.activeElement, button, "Focus stays on the button during the transition"); + + await finished.catch(() => {}); + assert_equals(document.activeElement, button, "Focus stays on the button after the transition"); + + button.onfocus = t.unreached_func("button must not be focused after pressing Tab"); + const focusPromise = waitForFocus(t, button2); + await test_driver.send_keys(document.body, TAB_KEY); + await focusPromise; + }, description); +} + +function waitForFocus(t, target) { + return new Promise(resolve => { + target.addEventListener("focus", () => resolve(), { once: true }); + }); +} diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-anchor-cross-origin.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-anchor-cross-origin.html new file mode 100644 index 000000000000..38b7d584b885 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-anchor-cross-origin.html @@ -0,0 +1,24 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-anchor-download-userInitiated.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-anchor-download-userInitiated.html new file mode 100644 index 000000000000..c42f389ba67b --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-anchor-download-userInitiated.html @@ -0,0 +1,29 @@ + + + + + + +Click me + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-anchor-download.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-anchor-download.html new file mode 100644 index 000000000000..b20846d83e15 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-anchor-download.html @@ -0,0 +1,34 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-anchor-fragment.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-anchor-fragment.html new file mode 100644 index 000000000000..591ed73dbf16 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-anchor-fragment.html @@ -0,0 +1,25 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-anchor-same-origin-cross-document.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-anchor-same-origin-cross-document.html new file mode 100644 index 000000000000..c9f1d6cd280c --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-anchor-same-origin-cross-document.html @@ -0,0 +1,25 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-anchor-userInitiated.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-anchor-userInitiated.html new file mode 100644 index 000000000000..832a3f843e22 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-anchor-userInitiated.html @@ -0,0 +1,29 @@ + + + + + + +Click me + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-anchor-with-target.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-anchor-with-target.html new file mode 100644 index 000000000000..2359f96f68c9 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-anchor-with-target.html @@ -0,0 +1,31 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-destination-getState-back-forward.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-destination-getState-back-forward.html new file mode 100644 index 000000000000..c118aa7a1f38 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-destination-getState-back-forward.html @@ -0,0 +1,26 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-destination-getState-navigate.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-destination-getState-navigate.html new file mode 100644 index 000000000000..9c34c5753a11 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-destination-getState-navigate.html @@ -0,0 +1,23 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-form-get.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-form-get.html new file mode 100644 index 000000000000..d3cafa1b3fa3 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-form-get.html @@ -0,0 +1,27 @@ + + + +
+ diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-form-reload.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-form-reload.html new file mode 100644 index 000000000000..f18a11ebdaca --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-form-reload.html @@ -0,0 +1,28 @@ + + + + +
+ diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-form-traverse.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-form-traverse.html new file mode 100644 index 000000000000..d673537503e0 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-form-traverse.html @@ -0,0 +1,44 @@ + + + + +
+ diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-form-userInitiated.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-form-userInitiated.html new file mode 100644 index 000000000000..d6fc712c26a0 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-form-userInitiated.html @@ -0,0 +1,30 @@ + + + + + + +
+ +
+ diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-form-with-target.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-form-with-target.html new file mode 100644 index 000000000000..4d2bf2624e5a --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-form-with-target.html @@ -0,0 +1,29 @@ + + + + +
+ diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-form.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-form.html new file mode 100644 index 000000000000..bc120420ca3c --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-form.html @@ -0,0 +1,25 @@ + + + +
+ diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-history-back-after-fragment.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-history-back-after-fragment.html new file mode 100644 index 000000000000..ddabfaeef5af --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-history-back-after-fragment.html @@ -0,0 +1,31 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-history-back-after-pushState.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-history-back-after-pushState.html new file mode 100644 index 000000000000..074aa7156815 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-history-back-after-pushState.html @@ -0,0 +1,31 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-history-back-cross-document.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-history-back-cross-document.html new file mode 100644 index 000000000000..967cf5db0cdb --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-history-back-cross-document.html @@ -0,0 +1,32 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-history-go-0.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-history-go-0.html new file mode 100644 index 000000000000..f7453e4805f8 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-history-go-0.html @@ -0,0 +1,27 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-history-pushState.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-history-pushState.html new file mode 100644 index 000000000000..0651c529daa3 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-history-pushState.html @@ -0,0 +1,29 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-history-replaceState.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-history-replaceState.html new file mode 100644 index 000000000000..d0fe5d949ba1 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-history-replaceState.html @@ -0,0 +1,29 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-iframe-location.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-iframe-location.html new file mode 100644 index 000000000000..cbf16c896a85 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-iframe-location.html @@ -0,0 +1,30 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-location.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-location.html new file mode 100644 index 000000000000..998da50994ca --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-location.html @@ -0,0 +1,23 @@ + + + +
+ diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-meta-refresh.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-meta-refresh.html new file mode 100644 index 000000000000..9077fec5fa05 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-meta-refresh.html @@ -0,0 +1,27 @@ + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-navigation-back-cross-document.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-navigation-back-cross-document.html new file mode 100644 index 000000000000..4847ac8f1be9 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-navigation-back-cross-document.html @@ -0,0 +1,32 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-navigation-back-same-document.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-navigation-back-same-document.html new file mode 100644 index 000000000000..626ea33136ad --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-navigation-back-same-document.html @@ -0,0 +1,32 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-navigation-navigate.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-navigation-navigate.html new file mode 100644 index 000000000000..adc71a324379 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-navigation-navigate.html @@ -0,0 +1,22 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-to-javascript.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-to-javascript.html new file mode 100644 index 000000000000..78f490d87b95 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-to-javascript.html @@ -0,0 +1,18 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-to-srcdoc.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-to-srcdoc.html new file mode 100644 index 000000000000..996fecfceaf6 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-to-srcdoc.html @@ -0,0 +1,34 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-window-open-self.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-window-open-self.html new file mode 100644 index 000000000000..cdfc57c4a022 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-window-open-self.html @@ -0,0 +1,23 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-window-open.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-window-open.html new file mode 100644 index 000000000000..aef333abc4d1 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigate-window-open.html @@ -0,0 +1,30 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigatesuccess-cross-document.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigatesuccess-cross-document.html new file mode 100644 index 000000000000..1d528c1f5f91 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigatesuccess-cross-document.html @@ -0,0 +1,14 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigatesuccess-same-document.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigatesuccess-same-document.html new file mode 100644 index 000000000000..6007170ec153 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/navigatesuccess-same-document.html @@ -0,0 +1,10 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/resources/meta-refresh.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/resources/meta-refresh.html new file mode 100644 index 000000000000..7fc270798cec --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/resources/meta-refresh.html @@ -0,0 +1,5 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/resources/navigatesuccess-cross-document-helper.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/resources/navigatesuccess-cross-document-helper.html new file mode 100644 index 000000000000..aabc5015a963 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/resources/navigatesuccess-cross-document-helper.html @@ -0,0 +1,6 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/signal-abort-detach-in-onnavigate.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/signal-abort-detach-in-onnavigate.html new file mode 100644 index 000000000000..467ea8889932 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/signal-abort-detach-in-onnavigate.html @@ -0,0 +1,21 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/signal-abort-preventDefault.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/signal-abort-preventDefault.html new file mode 100644 index 000000000000..60fed90ce6c3 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/signal-abort-preventDefault.html @@ -0,0 +1,19 @@ + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/signal-abort-transitionWhile.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/signal-abort-transitionWhile.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/navigate-event/signal-abort-transitionWhile.html rename to blink/web_tests/wpt_internal/navigation-api/navigate-event/signal-abort-transitionWhile.html diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/signal-abort-window-stop-after-transitionWhile.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/signal-abort-window-stop-after-transitionWhile.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/navigate-event/signal-abort-window-stop-after-transitionWhile.html rename to blink/web_tests/wpt_internal/navigation-api/navigate-event/signal-abort-window-stop-after-transitionWhile.html diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/signal-abort-window-stop-in-onnavigate.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/signal-abort-window-stop-in-onnavigate.html new file mode 100644 index 000000000000..1b406c42d367 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/signal-abort-window-stop-in-onnavigate.html @@ -0,0 +1,24 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigate-event/signal-abort-window-stop.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/signal-abort-window-stop.html new file mode 100644 index 000000000000..43e005e8b411 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigate-event/signal-abort-window-stop.html @@ -0,0 +1,23 @@ + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/transitionWhile-after-dispatch.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/transitionWhile-after-dispatch.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/navigate-event/transitionWhile-after-dispatch.html rename to blink/web_tests/wpt_internal/navigation-api/navigate-event/transitionWhile-after-dispatch.html diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/transitionWhile-and-navigate.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/transitionWhile-and-navigate.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/navigate-event/transitionWhile-and-navigate.html rename to blink/web_tests/wpt_internal/navigation-api/navigate-event/transitionWhile-and-navigate.html diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/transitionWhile-canceled-event.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/transitionWhile-canceled-event.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/navigate-event/transitionWhile-canceled-event.html rename to blink/web_tests/wpt_internal/navigation-api/navigate-event/transitionWhile-canceled-event.html diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/transitionWhile-cross-document-same-origin.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/transitionWhile-cross-document-same-origin.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/navigate-event/transitionWhile-cross-document-same-origin.html rename to blink/web_tests/wpt_internal/navigation-api/navigate-event/transitionWhile-cross-document-same-origin.html diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/transitionWhile-cross-origin.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/transitionWhile-cross-origin.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/navigate-event/transitionWhile-cross-origin.html rename to blink/web_tests/wpt_internal/navigation-api/navigate-event/transitionWhile-cross-origin.html diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/transitionWhile-detach.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/transitionWhile-detach.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/navigate-event/transitionWhile-detach.html rename to blink/web_tests/wpt_internal/navigation-api/navigate-event/transitionWhile-detach.html diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/transitionWhile-history-pushState.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/transitionWhile-history-pushState.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/navigate-event/transitionWhile-history-pushState.html rename to blink/web_tests/wpt_internal/navigation-api/navigate-event/transitionWhile-history-pushState.html diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/transitionWhile-history-replaceState.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/transitionWhile-history-replaceState.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/navigate-event/transitionWhile-history-replaceState.html rename to blink/web_tests/wpt_internal/navigation-api/navigate-event/transitionWhile-history-replaceState.html diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/transitionWhile-multiple-times-reject.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/transitionWhile-multiple-times-reject.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/navigate-event/transitionWhile-multiple-times-reject.html rename to blink/web_tests/wpt_internal/navigation-api/navigate-event/transitionWhile-multiple-times-reject.html diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/transitionWhile-multiple-times.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/transitionWhile-multiple-times.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/navigate-event/transitionWhile-multiple-times.html rename to blink/web_tests/wpt_internal/navigation-api/navigate-event/transitionWhile-multiple-times.html diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/transitionWhile-navigation-back.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/transitionWhile-navigation-back.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/navigate-event/transitionWhile-navigation-back.html rename to blink/web_tests/wpt_internal/navigation-api/navigate-event/transitionWhile-navigation-back.html diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/transitionWhile-on-synthetic-event.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/transitionWhile-on-synthetic-event.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/navigate-event/transitionWhile-on-synthetic-event.html rename to blink/web_tests/wpt_internal/navigation-api/navigate-event/transitionWhile-on-synthetic-event.html diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/transitionWhile-popstate.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/transitionWhile-popstate.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/navigate-event/transitionWhile-popstate.html rename to blink/web_tests/wpt_internal/navigation-api/navigate-event/transitionWhile-popstate.html diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/transitionWhile-reject.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/transitionWhile-reject.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/navigate-event/transitionWhile-reject.html rename to blink/web_tests/wpt_internal/navigation-api/navigate-event/transitionWhile-reject.html diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/transitionWhile-resolve.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/transitionWhile-resolve.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/navigate-event/transitionWhile-resolve.html rename to blink/web_tests/wpt_internal/navigation-api/navigate-event/transitionWhile-resolve.html diff --git a/blink/web_tests/external/wpt/navigation-api/navigate-event/transitionWhile-same-document-history-back.html b/blink/web_tests/wpt_internal/navigation-api/navigate-event/transitionWhile-same-document-history-back.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/navigate-event/transitionWhile-same-document-history-back.html rename to blink/web_tests/wpt_internal/navigation-api/navigate-event/transitionWhile-same-document-history-back.html diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/after-detach.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/after-detach.html new file mode 100644 index 000000000000..c4ecfec44d69 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/after-detach.html @@ -0,0 +1,30 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/current-basic.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/current-basic.html new file mode 100644 index 000000000000..78bbbb05607c --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/current-basic.html @@ -0,0 +1,107 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-across-origins.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-across-origins.html new file mode 100644 index 000000000000..447273bff2c8 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-across-origins.html @@ -0,0 +1,33 @@ + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-after-bfcache-in-iframe.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-after-bfcache-in-iframe.html new file mode 100644 index 000000000000..b54a74995099 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-after-bfcache-in-iframe.html @@ -0,0 +1,36 @@ + + + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-after-bfcache.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-after-bfcache.html new file mode 100644 index 000000000000..ef93d1e27e76 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-after-bfcache.html @@ -0,0 +1,60 @@ + + + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-after-blank-navigation.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-after-blank-navigation.html new file mode 100644 index 000000000000..f54ae06e148d --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-after-blank-navigation.html @@ -0,0 +1,25 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-after-blob-navigation.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-after-blob-navigation.html new file mode 100644 index 000000000000..67611f4d446c --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-after-blob-navigation.html @@ -0,0 +1,25 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-after-cross-document-forward-pruning.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-after-cross-document-forward-pruning.html new file mode 100644 index 000000000000..ddd1ad571ddb --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-after-cross-document-forward-pruning.html @@ -0,0 +1,33 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-after-javascript-url-navigation.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-after-javascript-url-navigation.html new file mode 100644 index 000000000000..c5ef7f33e425 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-after-javascript-url-navigation.html @@ -0,0 +1,38 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-after-navigations-in-multiple-windows.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-after-navigations-in-multiple-windows.html new file mode 100644 index 000000000000..d1d4d86eb382 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-after-navigations-in-multiple-windows.html @@ -0,0 +1,34 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-after-srcdoc-navigation.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-after-srcdoc-navigation.html new file mode 100644 index 000000000000..b80e8aa0e216 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-after-srcdoc-navigation.html @@ -0,0 +1,25 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-array-equality.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-array-equality.html new file mode 100644 index 000000000000..98efb6b20c0a --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-array-equality.html @@ -0,0 +1,8 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-in-new-javascript-url-iframe.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-in-new-javascript-url-iframe.html new file mode 100644 index 000000000000..6f217f5e3c4f --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-in-new-javascript-url-iframe.html @@ -0,0 +1,15 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-in-new-srcdoc-iframe.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-in-new-srcdoc-iframe.html new file mode 100644 index 000000000000..a7e0f88d37a3 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-in-new-srcdoc-iframe.html @@ -0,0 +1,15 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-when-inactive.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-when-inactive.html new file mode 100644 index 000000000000..c70b6d8bf870 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entries-when-inactive.html @@ -0,0 +1,16 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entry-after-detach.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entry-after-detach.html new file mode 100644 index 000000000000..69c52d140983 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/entry-after-detach.html @@ -0,0 +1,20 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/index-not-in-entries.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/index-not-in-entries.html new file mode 100644 index 000000000000..a16d130ba16b --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/index-not-in-entries.html @@ -0,0 +1,24 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/key-id-back-cross-document.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/key-id-back-cross-document.html new file mode 100644 index 000000000000..2dd58c03e9d7 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/key-id-back-cross-document.html @@ -0,0 +1,15 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/key-id-back-same-document.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/key-id-back-same-document.html new file mode 100644 index 000000000000..858b5fd2c896 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/key-id-back-same-document.html @@ -0,0 +1,24 @@ + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigation-history-entry/key-id-location-reload-transitionWhile.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/key-id-location-reload-transitionWhile.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/navigation-history-entry/key-id-location-reload-transitionWhile.html rename to blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/key-id-location-reload-transitionWhile.html diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/key-id-location-reload.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/key-id-location-reload.html new file mode 100644 index 000000000000..f950e2f3a217 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/key-id-location-reload.html @@ -0,0 +1,18 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/key-id-location-replace-cross-origin.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/key-id-location-replace-cross-origin.html new file mode 100644 index 000000000000..65aff4a3abc3 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/key-id-location-replace-cross-origin.html @@ -0,0 +1,17 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/key-id-location-replace.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/key-id-location-replace.html new file mode 100644 index 000000000000..a58772a7f479 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/key-id-location-replace.html @@ -0,0 +1,18 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/no-referrer-dynamic-url-censored.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/no-referrer-dynamic-url-censored.html new file mode 100644 index 000000000000..7a5544c4196b --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/no-referrer-dynamic-url-censored.html @@ -0,0 +1,33 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/no-referrer-from-meta-url-censored.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/no-referrer-from-meta-url-censored.html new file mode 100644 index 000000000000..c2ffa2b7a409 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/no-referrer-from-meta-url-censored.html @@ -0,0 +1,32 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/no-referrer-url-censored.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/no-referrer-url-censored.html new file mode 100644 index 000000000000..1e4e48e313a2 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/no-referrer-url-censored.html @@ -0,0 +1,32 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/opaque-origin-data-url.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/opaque-origin-data-url.html new file mode 100644 index 000000000000..65123fa60bab --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/opaque-origin-data-url.html @@ -0,0 +1,17 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/opaque-origin.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/opaque-origin.html new file mode 100644 index 000000000000..898ca27e4fab --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/opaque-origin.html @@ -0,0 +1,9 @@ + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/resources/is_uuid.js b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/resources/is_uuid.js new file mode 100644 index 000000000000..3b855c01b075 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/resources/is_uuid.js @@ -0,0 +1,3 @@ +function isUUID(key) { + return /[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}/.test(key); +} diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/resources/key-navigate-back-cross-document-helper.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/resources/key-navigate-back-cross-document-helper.html new file mode 100644 index 000000000000..79f3c3da0ae9 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/resources/key-navigate-back-cross-document-helper.html @@ -0,0 +1,27 @@ + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/resources/no-referrer-meta.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/resources/no-referrer-meta.html new file mode 100644 index 000000000000..b8003c845304 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/resources/no-referrer-meta.html @@ -0,0 +1,3 @@ + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/resources/no-referrer.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/resources/no-referrer.html new file mode 100644 index 000000000000..5f09efe28dff --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/resources/no-referrer.html @@ -0,0 +1,2 @@ + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/resources/no-referrer.html.headers b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/resources/no-referrer.html.headers new file mode 100644 index 000000000000..7ffbf17d6be5 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/resources/no-referrer.html.headers @@ -0,0 +1 @@ +Referrer-Policy: no-referrer diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/resources/opaque-origin-page.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/resources/opaque-origin-page.html new file mode 100644 index 000000000000..98e2c1b31757 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/resources/opaque-origin-page.html @@ -0,0 +1,25 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/resources/post-entries-length-to-top.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/resources/post-entries-length-to-top.html new file mode 100644 index 000000000000..c8fe005d8ef0 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/resources/post-entries-length-to-top.html @@ -0,0 +1,7 @@ + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/resources/post-key-to-top.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/resources/post-key-to-top.html new file mode 100644 index 000000000000..cd68b4bc9d0c --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/resources/post-key-to-top.html @@ -0,0 +1,4 @@ + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/sameDocument-after-fragment-navigate.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/sameDocument-after-fragment-navigate.html new file mode 100644 index 000000000000..a197f825d8ed --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/sameDocument-after-fragment-navigate.html @@ -0,0 +1,30 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/sameDocument-after-navigate-restore.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/sameDocument-after-navigate-restore.html new file mode 100644 index 000000000000..fd21bc222f4c --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/sameDocument-after-navigate-restore.html @@ -0,0 +1,25 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/sameDocument-after-navigate.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/sameDocument-after-navigate.html new file mode 100644 index 000000000000..bfcb7c659972 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/sameDocument-after-navigate.html @@ -0,0 +1,14 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/state-after-navigate-restore.html b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/state-after-navigate-restore.html new file mode 100644 index 000000000000..097b1d50795d --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-history-entry/state-after-navigate-restore.html @@ -0,0 +1,27 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/back-forward-multiple-frames.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/back-forward-multiple-frames.html new file mode 100644 index 000000000000..738bfd37dcc7 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/back-forward-multiple-frames.html @@ -0,0 +1,74 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/disambigaute-back.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/disambigaute-back.html new file mode 100644 index 000000000000..d44d435896dd --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/disambigaute-back.html @@ -0,0 +1,32 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/disambigaute-forward.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/disambigaute-forward.html new file mode 100644 index 000000000000..e252e3099410 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/disambigaute-forward.html @@ -0,0 +1,40 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/disambigaute-traverseTo-back-multiple.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/disambigaute-traverseTo-back-multiple.html new file mode 100644 index 000000000000..03a8eb10edeb --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/disambigaute-traverseTo-back-multiple.html @@ -0,0 +1,35 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/disambigaute-traverseTo-forward-multiple.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/disambigaute-traverseTo-forward-multiple.html new file mode 100644 index 000000000000..f8e78c4b1d95 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/disambigaute-traverseTo-forward-multiple.html @@ -0,0 +1,39 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/forward-to-pruned-entry.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/forward-to-pruned-entry.html new file mode 100644 index 000000000000..b8bd36ef061e --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/forward-to-pruned-entry.html @@ -0,0 +1,31 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-base-url.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-base-url.html new file mode 100644 index 000000000000..00fefa6608f2 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-base-url.html @@ -0,0 +1,15 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-from-initial-about-blank-src.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-from-initial-about-blank-src.html new file mode 100644 index 000000000000..2044b33cf027 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-from-initial-about-blank-src.html @@ -0,0 +1,24 @@ + + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-from-initial-about-blank.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-from-initial-about-blank.html new file mode 100644 index 000000000000..d494ec468ceb --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-from-initial-about-blank.html @@ -0,0 +1,25 @@ + + + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-history-state-replace.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-history-state-replace.html new file mode 100644 index 000000000000..bf0af521da9d --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-history-state-replace.html @@ -0,0 +1,16 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-history-state.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-history-state.html new file mode 100644 index 000000000000..0541636de509 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-history-state.html @@ -0,0 +1,16 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-info-and-state.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-info-and-state.html new file mode 100644 index 000000000000..828d7daea57b --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-info-and-state.html @@ -0,0 +1,18 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-relative-url.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-relative-url.html new file mode 100644 index 000000000000..cc95d5e00382 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-relative-url.html @@ -0,0 +1,16 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-replace-cross-document.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-replace-cross-document.html new file mode 100644 index 000000000000..7f016babe6bc --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-replace-cross-document.html @@ -0,0 +1,29 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-replace-same-document.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-replace-same-document.html new file mode 100644 index 000000000000..0d8493b78824 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-replace-same-document.html @@ -0,0 +1,21 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-same-document.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-same-document.html new file mode 100644 index 000000000000..9ffd8248f843 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-same-document.html @@ -0,0 +1,23 @@ + + + +
+ diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-state-repeated-await.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-state-repeated-await.html new file mode 100644 index 000000000000..a003992d66a3 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-state-repeated-await.html @@ -0,0 +1,13 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-state-repeated.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-state-repeated.html new file mode 100644 index 000000000000..29c3f68eeb0c --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-state-repeated.html @@ -0,0 +1,20 @@ + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigation-methods/navigate-transitionWhile-history-state.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-transitionWhile-history-state.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/navigation-methods/navigate-transitionWhile-history-state.html rename to blink/web_tests/wpt_internal/navigation-api/navigation-methods/navigate-transitionWhile-history-state.html diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/reload-base-url.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/reload-base-url.html new file mode 100644 index 000000000000..1e8d3b90c346 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/reload-base-url.html @@ -0,0 +1,16 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/reload-info.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/reload-info.html new file mode 100644 index 000000000000..637f6976adbb --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/reload-info.html @@ -0,0 +1,47 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/reload-navigation-timing.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/reload-navigation-timing.html new file mode 100644 index 000000000000..ce03e7a7ca3d --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/reload-navigation-timing.html @@ -0,0 +1,15 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/reload-no-args.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/reload-no-args.html new file mode 100644 index 000000000000..c94eae0b935d --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/reload-no-args.html @@ -0,0 +1,46 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/reload-state-and-info.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/reload-state-and-info.html new file mode 100644 index 000000000000..a68dd2ab8be0 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/reload-state-and-info.html @@ -0,0 +1,40 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/reload-state-undefined.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/reload-state-undefined.html new file mode 100644 index 000000000000..ac204d4731b5 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/reload-state-undefined.html @@ -0,0 +1,39 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/resources/fetch-event-test-worker.js b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/resources/fetch-event-test-worker.js new file mode 100644 index 000000000000..98b7dd0fb58b --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/resources/fetch-event-test-worker.js @@ -0,0 +1,7 @@ +self.addEventListener('fetch', function(event) { + const request = event.request; + const body = + `method = ${request.method}, ` + + `isReloadNavigation = ${request.isReloadNavigation}`; + event.transitionWhile(new Response(body)); +}); diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/resources/navigate-parent.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/resources/navigate-parent.html new file mode 100644 index 000000000000..8584bb5774a2 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/resources/navigate-parent.html @@ -0,0 +1,6 @@ + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/resources/navigate-sibling.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/resources/navigate-sibling.html new file mode 100644 index 000000000000..29a5ee7390d0 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/resources/navigate-sibling.html @@ -0,0 +1,6 @@ + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/resources/navigation-back.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/resources/navigation-back.html new file mode 100644 index 000000000000..a1441801acf3 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/resources/navigation-back.html @@ -0,0 +1,6 @@ + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/resources/page-with-base-url-common.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/resources/page-with-base-url-common.html new file mode 100644 index 000000000000..8d9fedcc2b40 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/resources/page-with-base-url-common.html @@ -0,0 +1,2 @@ + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/resources/service-worker-page.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/resources/service-worker-page.html new file mode 100644 index 000000000000..a10ff35dce77 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/resources/service-worker-page.html @@ -0,0 +1,2 @@ + +

We can't use /common/blank.html because of scope restrictions. diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/resources/slow-no-store.py b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/resources/slow-no-store.py new file mode 100644 index 000000000000..6bf2e657e4ff --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/resources/slow-no-store.py @@ -0,0 +1,8 @@ +import time + + +def main(request, response): + # Sleep for 1sec + time.sleep(1) + response.headers.set(b"Cache-Control", + b"no-cache, no-store, must-revalidate") diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/back-204-205-download.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/back-204-205-download.html new file mode 100644 index 000000000000..5bedbf21e868 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/back-204-205-download.html @@ -0,0 +1,52 @@ + + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/back-already-detached.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/back-already-detached.html new file mode 100644 index 000000000000..f9ff04f923c8 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/back-already-detached.html @@ -0,0 +1,30 @@ + + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/back-beforeunload.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/back-beforeunload.html new file mode 100644 index 000000000000..82c1f589ccf5 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/back-beforeunload.html @@ -0,0 +1,42 @@ + + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/back-forward-initial-about-blank.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/back-forward-initial-about-blank.html new file mode 100644 index 000000000000..dfdb6611ab3f --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/back-forward-initial-about-blank.html @@ -0,0 +1,25 @@ + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/back-forward-opaque-origin.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/back-forward-opaque-origin.html new file mode 100644 index 000000000000..59849e961d76 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/back-forward-opaque-origin.html @@ -0,0 +1,9 @@ + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/back-forward-out-of-bounds.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/back-forward-out-of-bounds.html new file mode 100644 index 000000000000..015c090bf97e --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/back-forward-out-of-bounds.html @@ -0,0 +1,16 @@ + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/back-transitionWhile-rejected.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/back-transitionWhile-rejected.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/back-transitionWhile-rejected.html rename to blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/back-transitionWhile-rejected.html diff --git a/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/back-transitionWhile.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/back-transitionWhile.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/back-transitionWhile.html rename to blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/back-transitionWhile.html diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/back.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/back.html new file mode 100644 index 000000000000..a2b13db901bf --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/back.html @@ -0,0 +1,23 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/forward-already-detached.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/forward-already-detached.html new file mode 100644 index 000000000000..4dfa74d9f9b9 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/forward-already-detached.html @@ -0,0 +1,33 @@ + + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/forward-beforeunload.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/forward-beforeunload.html new file mode 100644 index 000000000000..87fa4baa935a --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/forward-beforeunload.html @@ -0,0 +1,45 @@ + + + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/forward-transitionWhile-rejected.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/forward-transitionWhile-rejected.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/forward-transitionWhile-rejected.html rename to blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/forward-transitionWhile-rejected.html diff --git a/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/forward-transitionWhile.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/forward-transitionWhile.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/forward-transitionWhile.html rename to blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/forward-transitionWhile.html diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/forward.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/forward.html new file mode 100644 index 000000000000..36bdba8daafd --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/forward.html @@ -0,0 +1,24 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-204-205-download.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-204-205-download.html new file mode 100644 index 000000000000..f1e89b694057 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-204-205-download.html @@ -0,0 +1,42 @@ + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-already-detached.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-already-detached.html new file mode 100644 index 000000000000..33cdd6922d3f --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-already-detached.html @@ -0,0 +1,19 @@ + + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-beforeunload.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-beforeunload.html new file mode 100644 index 000000000000..f0a9069677f7 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-beforeunload.html @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-cross-document.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-cross-document.html new file mode 100644 index 000000000000..b83b1e941fd9 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-cross-document.html @@ -0,0 +1,16 @@ + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-detach-in-onnavigate.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-detach-in-onnavigate.html new file mode 100644 index 000000000000..0e80e1b1305c --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-detach-in-onnavigate.html @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-detach-in-serialization.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-detach-in-serialization.html new file mode 100644 index 000000000000..14086c9f0152 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-detach-in-serialization.html @@ -0,0 +1,24 @@ + + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-file-url.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-file-url.html new file mode 100644 index 000000000000..138f6ffc1243 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-file-url.html @@ -0,0 +1,10 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-initial-about-blank-cross-document.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-initial-about-blank-cross-document.html new file mode 100644 index 000000000000..8ec76b11ddb6 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-initial-about-blank-cross-document.html @@ -0,0 +1,21 @@ + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-initial-about-blank.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-initial-about-blank.html new file mode 100644 index 000000000000..9734a09d0151 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-initial-about-blank.html @@ -0,0 +1,20 @@ + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-interrupted-within-onnavigate.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-interrupted-within-onnavigate.html new file mode 100644 index 000000000000..3db02c6931e4 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-interrupted-within-onnavigate.html @@ -0,0 +1,28 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-interrupted.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-interrupted.html new file mode 100644 index 000000000000..2c928254e0b6 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-interrupted.html @@ -0,0 +1,21 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-invalid-url.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-invalid-url.html new file mode 100644 index 000000000000..5b5b442c9133 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-invalid-url.html @@ -0,0 +1,10 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-opaque-origin.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-opaque-origin.html new file mode 100644 index 000000000000..51500eb8d83c --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-opaque-origin.html @@ -0,0 +1,9 @@ + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-preventDefault.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-preventDefault.html new file mode 100644 index 000000000000..6257c5a03d67 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-preventDefault.html @@ -0,0 +1,12 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-push-initial-about-blank.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-push-initial-about-blank.html new file mode 100644 index 000000000000..9d47c8d0b5d8 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-push-initial-about-blank.html @@ -0,0 +1,21 @@ + + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-push-javascript-url.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-push-javascript-url.html new file mode 100644 index 000000000000..e41e06a78dc2 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-push-javascript-url.html @@ -0,0 +1,19 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-push-not-loaded.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-push-not-loaded.html new file mode 100644 index 000000000000..611db7e2b13e --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-push-not-loaded.html @@ -0,0 +1,19 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-push-same-url.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-push-same-url.html new file mode 100644 index 000000000000..216e94eb1d07 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-push-same-url.html @@ -0,0 +1,19 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-rejection-order-beforeunload-unserializablestate.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-rejection-order-beforeunload-unserializablestate.html new file mode 100644 index 000000000000..878280a56eb9 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-rejection-order-beforeunload-unserializablestate.html @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-rejection-order-detached-unserializablestate.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-rejection-order-detached-unserializablestate.html new file mode 100644 index 000000000000..2c6f9a28d49c --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-rejection-order-detached-unserializablestate.html @@ -0,0 +1,20 @@ + + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-rejection-order-invalidurl-beforeunload.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-rejection-order-invalidurl-beforeunload.html new file mode 100644 index 000000000000..4873e85a2f8e --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-rejection-order-invalidurl-beforeunload.html @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-rejection-order-invalidurl-detached.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-rejection-order-invalidurl-detached.html new file mode 100644 index 000000000000..2250a5411473 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-rejection-order-invalidurl-detached.html @@ -0,0 +1,20 @@ + + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-rejection-order-invalidurl-unload.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-rejection-order-invalidurl-unload.html new file mode 100644 index 000000000000..d778dd662c8b --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-rejection-order-invalidurl-unload.html @@ -0,0 +1,27 @@ + + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-rejection-order-invalidurl-unserializablestate.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-rejection-order-invalidurl-unserializablestate.html new file mode 100644 index 000000000000..07e194ca4192 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-rejection-order-invalidurl-unserializablestate.html @@ -0,0 +1,12 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-rejection-order-unload-unserializablestate.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-rejection-order-unload-unserializablestate.html new file mode 100644 index 000000000000..417dd27174ca --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-rejection-order-unload-unserializablestate.html @@ -0,0 +1,27 @@ + + + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-transitionWhile-interrupted.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-transitionWhile-interrupted.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-transitionWhile-interrupted.html rename to blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-transitionWhile-interrupted.html diff --git a/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-transitionWhile-rejected.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-transitionWhile-rejected.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-transitionWhile-rejected.html rename to blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-transitionWhile-rejected.html diff --git a/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-transitionWhile.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-transitionWhile.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/navigate-transitionWhile.html rename to blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-transitionWhile.html diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-unload.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-unload.html new file mode 100644 index 000000000000..fbc1fde6e97c --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-unload.html @@ -0,0 +1,27 @@ + + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-unserializable-state.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-unserializable-state.html new file mode 100644 index 000000000000..36464ec3c54e --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate-unserializable-state.html @@ -0,0 +1,21 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate.html new file mode 100644 index 000000000000..34ff84f0e9a1 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/navigate.html @@ -0,0 +1,12 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-already-detached.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-already-detached.html new file mode 100644 index 000000000000..9b0780c4a959 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-already-detached.html @@ -0,0 +1,19 @@ + + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-beforeunload.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-beforeunload.html new file mode 100644 index 000000000000..05338acc5e78 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-beforeunload.html @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-detach-in-onnavigate.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-detach-in-onnavigate.html new file mode 100644 index 000000000000..621bb598f64d --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-detach-in-onnavigate.html @@ -0,0 +1,18 @@ + + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-detach-in-serialization.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-detach-in-serialization.html new file mode 100644 index 000000000000..d958d9cc844d --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-detach-in-serialization.html @@ -0,0 +1,24 @@ + + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-initial-about-blank.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-initial-about-blank.html new file mode 100644 index 000000000000..9e717fee48b0 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-initial-about-blank.html @@ -0,0 +1,20 @@ + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-preventDefault.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-preventDefault.html new file mode 100644 index 000000000000..747044b60f7b --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-preventDefault.html @@ -0,0 +1,12 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-rejection-order-beforeunload-unserializablestate.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-rejection-order-beforeunload-unserializablestate.html new file mode 100644 index 000000000000..950d665218fc --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-rejection-order-beforeunload-unserializablestate.html @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-rejection-order-detached-unserializablestate.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-rejection-order-detached-unserializablestate.html new file mode 100644 index 000000000000..9206f18e6cce --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-rejection-order-detached-unserializablestate.html @@ -0,0 +1,20 @@ + + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-rejection-order-unload-unserializablestate.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-rejection-order-unload-unserializablestate.html new file mode 100644 index 000000000000..9e7edcbba4f7 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-rejection-order-unload-unserializablestate.html @@ -0,0 +1,32 @@ + + + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/reload-transitionWhile-rejected.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-transitionWhile-rejected.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/reload-transitionWhile-rejected.html rename to blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-transitionWhile-rejected.html diff --git a/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/reload-transitionWhile.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-transitionWhile.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/reload-transitionWhile.html rename to blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-transitionWhile.html diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-unload.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-unload.html new file mode 100644 index 000000000000..1906659d1db8 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-unload.html @@ -0,0 +1,27 @@ + + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-unserializable-state.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-unserializable-state.html new file mode 100644 index 000000000000..76fa870558a3 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload-unserializable-state.html @@ -0,0 +1,21 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload.html new file mode 100644 index 000000000000..028d5855701a --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/reload.html @@ -0,0 +1,16 @@ + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/resources/204-205-download-on-second-visit.py b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/resources/204-205-download-on-second-visit.py new file mode 100644 index 000000000000..c88072735212 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/resources/204-205-download-on-second-visit.py @@ -0,0 +1,27 @@ +def main(request, response): + key = request.GET[b"id"] + + # If hit with a POST with ?action=X, store X in the stash + if request.method == "POST": + action = request.GET[b"action"] + request.server.stash.put(key, action) + + return (204, [], "") + + # If hit with a GET, either return a normal initial page, or the abnormal requested response + elif request.method == "GET": + action = request.server.stash.take(key) + + if action is None: + return (200, [("Content-Type", "text/html"), + ("Cache-Control", "no-store")], "initial page") + if action == b"204": + return (204, [], "") + if action == b"205": + return (205, [], "") + if action == b"download": + return (200, [("Content-Type", "text/plain"), + ("Content-Disposition", "attachment")], + "some text to download") + + return (400, [], "") diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/resources/back-forward-opaque-origin-page.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/resources/back-forward-opaque-origin-page.html new file mode 100644 index 000000000000..ec633639524a --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/resources/back-forward-opaque-origin-page.html @@ -0,0 +1,28 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/resources/helpers.js b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/resources/helpers.js new file mode 100644 index 000000000000..67cd1ccb62e6 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/resources/helpers.js @@ -0,0 +1,92 @@ +window.assertReturnValue = (result, w = window) => { + assert_equals(Object.getPrototypeOf(result), w.Object.prototype, "result object must be from the right realm"); + assert_array_equals(Reflect.ownKeys(result), ["committed", "finished"]); + assert_true(result.committed instanceof w.Promise); + assert_true(result.finished instanceof w.Promise); + assert_not_equals(result.committed, result.finished); +}; + +window.assertNeverSettles = (t, result, w = window) => { + assertReturnValue(result, w); + result.committed.then( + t.unreached_func("committed must not fulfill"), + t.unreached_func("committed must not reject") + ); + + result.finished.then( + t.unreached_func("finished must not fulfill"), + t.unreached_func("finished must not reject") + ); +}; + +window.assertBothFulfill = async (t, result, expected, w = window) => { + assertReturnValue(result, w); + + // Don't use await here so that we can catch out-of-order settlements. + let committedValue; + result.committed.then( + t.step_func(v => { committedValue = v; }), + t.unreached_func("committed must not reject") + ); + + const finishedValue = await result.finished; + + assert_not_equals(committedValue, undefined, "committed must fulfill before finished"); + assert_equals(finishedValue, committedValue, "committed and finished must fulfill with the same value"); + assert_true(finishedValue instanceof w.NavigationHistoryEntry, "fulfillment value must be a NavigationHistoryEntry"); + assert_equals(finishedValue, expected); +}; + +window.assertCommittedFulfillsFinishedRejectsExactly = async (t, result, expectedEntry, expectedRejection, w = window) => { + assertReturnValue(result, w); + + // Don't use await here so that we can catch out-of-order settlements. + let committedValue; + result.committed.then( + t.step_func(v => { committedValue = v; }), + t.unreached_func("committed must not reject") + ); + + await promise_rejects_exactly(t, expectedRejection, result.finished); + + assert_not_equals(committedValue, undefined, "committed must fulfill before finished rejects"); + assert_true(committedValue instanceof w.NavigationHistoryEntry, "fulfillment value must be a NavigationHistoryEntry"); + assert_equals(committedValue, expectedEntry); +}; + +window.assertCommittedFulfillsFinishedRejectsDOM = async (t, result, expectedEntry, expectedDOMExceptionCode, w = window, domExceptionConstructor = w.DOMException, navigationHistoryEntryConstuctor = w.NavigationHistoryEntry) => { + assertReturnValue(result, w); + + // Don't use await here so that we can catch out-of-order settlements. + let committedValue; + result.committed.then( + t.step_func(v => { committedValue = v; }), + t.unreached_func("committed must not reject") + ); + + await promise_rejects_dom(t, expectedDOMExceptionCode, domExceptionConstructor, result.finished); + + assert_not_equals(committedValue, undefined, "committed must fulfill before finished rejects"); + assert_true(committedValue instanceof navigationHistoryEntryConstuctor, "fulfillment value must be an NavigationHistoryEntry"); + assert_equals(committedValue, expectedEntry); +}; + +window.assertBothRejectDOM = async (t, result, expectedDOMExceptionCode, w = window, domExceptionConstructor = w.DOMException) => { + assertReturnValue(result, w); + + // Don't use await here so that we can catch out-of-order settlements. + let committedReason, finishedReason; + await Promise.all([ + result.committed.then( + t.unreached_func("committed must not fulfill"), + t.step_func(r => { committedReason = r; }) + ), + result.finished.then( + t.unreached_func("finished must not fulfill"), + t.step_func(r => { finishedReason = r; }) + ) + ]); + + assert_equals(committedReason, finishedReason, "committed and finished must reject with the same value"); + assert_throws_dom(expectedDOMExceptionCode, domExceptionConstructor, () => { throw committedReason; }); +}; diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/resources/navigate-opaque-origin-page.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/resources/navigate-opaque-origin-page.html new file mode 100644 index 000000000000..831eefdb6123 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/resources/navigate-opaque-origin-page.html @@ -0,0 +1,16 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-already-detached.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-already-detached.html new file mode 100644 index 000000000000..b974393df6e7 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-already-detached.html @@ -0,0 +1,20 @@ + + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-beforeunload.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-beforeunload.html new file mode 100644 index 000000000000..3b2722235eec --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-beforeunload.html @@ -0,0 +1,31 @@ + + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-cross-document-preventDefault.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-cross-document-preventDefault.html new file mode 100644 index 000000000000..09c91ee647ef --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-cross-document-preventDefault.html @@ -0,0 +1,29 @@ + + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-current.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-current.html new file mode 100644 index 000000000000..212fe992cf77 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-current.html @@ -0,0 +1,17 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-detach-cross-document.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-detach-cross-document.html new file mode 100644 index 000000000000..8784313b7054 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-detach-cross-document.html @@ -0,0 +1,29 @@ + + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-detach-same-document.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-detach-same-document.html new file mode 100644 index 000000000000..b0308b8df8fe --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-detach-same-document.html @@ -0,0 +1,28 @@ + + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-invalid-key.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-invalid-key.html new file mode 100644 index 000000000000..42be40bfa767 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-invalid-key.html @@ -0,0 +1,10 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-repeated.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-repeated.html new file mode 100644 index 000000000000..d1754d672974 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-repeated.html @@ -0,0 +1,24 @@ + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-transitionWhile-rejected.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-transitionWhile-rejected.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-transitionWhile-rejected.html rename to blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-transitionWhile-rejected.html diff --git a/blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-transitionWhile.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-transitionWhile.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/navigation-methods/return-value/traverseTo-transitionWhile.html rename to blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo-transitionWhile.html diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo.html new file mode 100644 index 000000000000..8e00f5ba918c --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/return-value/traverseTo.html @@ -0,0 +1,25 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/sandboxing-navigate-parent.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/sandboxing-navigate-parent.html new file mode 100644 index 000000000000..b7af32443f73 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/sandboxing-navigate-parent.html @@ -0,0 +1,16 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/sandboxing-navigate-sibling.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/sandboxing-navigate-sibling.html new file mode 100644 index 000000000000..c8e76fc4a67e --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/sandboxing-navigate-sibling.html @@ -0,0 +1,19 @@ + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/traverseTo-after-adding-iframe.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/traverseTo-after-adding-iframe.html new file mode 100644 index 000000000000..5ab282055108 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/traverseTo-after-adding-iframe.html @@ -0,0 +1,34 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/traverseTo-after-data-url.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/traverseTo-after-data-url.html new file mode 100644 index 000000000000..0b21a741d301 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/traverseTo-after-data-url.html @@ -0,0 +1,33 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/traverseTo-cross-document.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/traverseTo-cross-document.html new file mode 100644 index 000000000000..2540639baddd --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/traverseTo-cross-document.html @@ -0,0 +1,41 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/traverseTo-detach-between-navigate-and-navigatesuccess.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/traverseTo-detach-between-navigate-and-navigatesuccess.html new file mode 100644 index 000000000000..25dd13464962 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/traverseTo-detach-between-navigate-and-navigatesuccess.html @@ -0,0 +1,46 @@ + + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/traverseTo-multiple-steps.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/traverseTo-multiple-steps.html new file mode 100644 index 000000000000..059eb214a8b8 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/traverseTo-multiple-steps.html @@ -0,0 +1,25 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/traverseTo-navigates-multiple-iframes.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/traverseTo-navigates-multiple-iframes.html new file mode 100644 index 000000000000..3d6adb53413e --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/traverseTo-navigates-multiple-iframes.html @@ -0,0 +1,45 @@ + + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/traverseTo-same-document.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/traverseTo-same-document.html new file mode 100644 index 000000000000..1a32bce99c98 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/traverseTo-same-document.html @@ -0,0 +1,43 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/navigation-methods/traverseTo-with-cross-origin-in-history.html b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/traverseTo-with-cross-origin-in-history.html new file mode 100644 index 000000000000..a6b7745584a6 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/navigation-methods/traverseTo-with-cross-origin-in-history.html @@ -0,0 +1,37 @@ + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/README.md b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/README.md new file mode 100644 index 000000000000..653dd2198c3a --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/README.md @@ -0,0 +1,26 @@ +# Navigation API ordering/transition tests + +These are meant to test the ordering between various events and promises, as +well as in some cases how the `navigation.transition` values changes. + +Some of them use the `Recorder` framework in `resources/helpers.mjs`, and others +test tricky cases (e.g. reentrancy) in a more ad-hoc way. + + is a useful +reference for the intent of these tests. + +Note: + +* Variants specifically exist for `currententrychange` because an event listener + existing for `currententrychange` causes code to run, and thus microtasks to run, + at a very specific point in the navigation-commit lifecycle. We want to test + that it doesn't impact the ordering. +* Similarly we test that `transitionWhile(Promise.resolve())` does not change + the ordering compared to no `transitionWhile()` call, for same-document + navigations, by trying to ensure most variants have appropriate + `transitionWhile()` counterparts with similar orderings. + +TODOs: + +* Also test `popstate` and `hashchange` once + is fixed. diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/anchor-download-transitionWhile-reject.html b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/anchor-download-transitionWhile-reject.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/ordering-and-transition/anchor-download-transitionWhile-reject.html rename to blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/anchor-download-transitionWhile-reject.html diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/anchor-download-transitionWhile.html b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/anchor-download-transitionWhile.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/ordering-and-transition/anchor-download-transitionWhile.html rename to blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/anchor-download-transitionWhile.html diff --git a/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/anchor-download.html b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/anchor-download.html new file mode 100644 index 000000000000..0490069c7aa4 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/anchor-download.html @@ -0,0 +1,24 @@ + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/back-same-document-transitionWhile-reject.html b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/back-same-document-transitionWhile-reject.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/ordering-and-transition/back-same-document-transitionWhile-reject.html rename to blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/back-same-document-transitionWhile-reject.html diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/back-same-document-transitionWhile.html b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/back-same-document-transitionWhile.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/ordering-and-transition/back-same-document-transitionWhile.html rename to blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/back-same-document-transitionWhile.html diff --git a/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/back-same-document.html b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/back-same-document.html new file mode 100644 index 000000000000..76c3e99311ed --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/back-same-document.html @@ -0,0 +1,40 @@ + + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/currententrychange-before-popstate-transitionWhile.html b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/currententrychange-before-popstate-transitionWhile.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/ordering-and-transition/currententrychange-before-popstate-transitionWhile.html rename to blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/currententrychange-before-popstate-transitionWhile.html diff --git a/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/currententrychange-dispose-ordering.html b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/currententrychange-dispose-ordering.html new file mode 100644 index 000000000000..4ca9ba29800b --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/currententrychange-dispose-ordering.html @@ -0,0 +1,26 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/location-href-canceled.html b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/location-href-canceled.html new file mode 100644 index 000000000000..eef10cd1730b --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/location-href-canceled.html @@ -0,0 +1,39 @@ + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-double-transitionWhile.html b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/location-href-double-transitionWhile.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-double-transitionWhile.html rename to blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/location-href-double-transitionWhile.html diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-transitionWhile-reentrant.html b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/location-href-transitionWhile-reentrant.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-transitionWhile-reentrant.html rename to blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/location-href-transitionWhile-reentrant.html diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-transitionWhile-reject.html b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/location-href-transitionWhile-reject.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-transitionWhile-reject.html rename to blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/location-href-transitionWhile-reject.html diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-transitionWhile.html b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/location-href-transitionWhile.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/ordering-and-transition/location-href-transitionWhile.html rename to blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/location-href-transitionWhile.html diff --git a/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/navigate-204-205-download-then-same-document.html b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/navigate-204-205-download-then-same-document.html new file mode 100644 index 000000000000..b7b6283fa70b --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/navigate-204-205-download-then-same-document.html @@ -0,0 +1,66 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/navigate-canceled.html b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/navigate-canceled.html new file mode 100644 index 000000000000..2604a60e37bf --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/navigate-canceled.html @@ -0,0 +1,42 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/navigate-cross-document-double.html b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/navigate-cross-document-double.html new file mode 100644 index 000000000000..147b8d55ef15 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/navigate-cross-document-double.html @@ -0,0 +1,49 @@ + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/navigate-cross-document-event-order.html b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/navigate-cross-document-event-order.html new file mode 100644 index 000000000000..34a9b79fb5f0 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/navigate-cross-document-event-order.html @@ -0,0 +1,32 @@ + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-double-transitionWhile.html b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/navigate-double-transitionWhile.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-double-transitionWhile.html rename to blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/navigate-double-transitionWhile.html diff --git a/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/navigate-in-transition-finished.html b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/navigate-in-transition-finished.html new file mode 100644 index 000000000000..8c74ba2f632f --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/navigate-in-transition-finished.html @@ -0,0 +1,67 @@ + + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-same-document-transitionWhile-reentrant.html b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/navigate-same-document-transitionWhile-reentrant.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-same-document-transitionWhile-reentrant.html rename to blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/navigate-same-document-transitionWhile-reentrant.html diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-same-document-transitionWhile-reject.html b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/navigate-same-document-transitionWhile-reject.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-same-document-transitionWhile-reject.html rename to blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/navigate-same-document-transitionWhile-reject.html diff --git a/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/navigate-same-document.html b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/navigate-same-document.html new file mode 100644 index 000000000000..589e1105e65a --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/navigate-same-document.html @@ -0,0 +1,39 @@ + + + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-transitionWhile-stop.html b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/navigate-transitionWhile-stop.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-transitionWhile-stop.html rename to blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/navigate-transitionWhile-stop.html diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-transitionWhile.html b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/navigate-transitionWhile.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/ordering-and-transition/navigate-transitionWhile.html rename to blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/navigate-transitionWhile.html diff --git a/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/reload-canceled.html b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/reload-canceled.html new file mode 100644 index 000000000000..3e9e24e77711 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/reload-canceled.html @@ -0,0 +1,42 @@ + + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/reload-transitionWhile-reject.html b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/reload-transitionWhile-reject.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/ordering-and-transition/reload-transitionWhile-reject.html rename to blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/reload-transitionWhile-reject.html diff --git a/blink/web_tests/external/wpt/navigation-api/ordering-and-transition/reload-transitionWhile.html b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/reload-transitionWhile.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/ordering-and-transition/reload-transitionWhile.html rename to blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/reload-transitionWhile.html diff --git a/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/resources/helpers.mjs b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/resources/helpers.mjs new file mode 100644 index 000000000000..341befc10565 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/resources/helpers.mjs @@ -0,0 +1,193 @@ +const variants = new Set((new URLSearchParams(location.search)).keys()); + +export function hasVariant(name) { + return variants.has(name); +} + +export class Recorder { + #events = []; + #errors = []; + #navigationAPI; + #domExceptionConstructor; + #location; + #skipCurrentChange; + #finalExpectedEvent; + #finalExpectedEventCount; + #currentFinalEventCount = 0; + + #readyToAssertResolve; + #readyToAssertPromise = new Promise(resolve => { this.#readyToAssertResolve = resolve; }); + + constructor({ window = self, skipCurrentChange = false, finalExpectedEvent, finalExpectedEventCount = 1 }) { + assert_equals(typeof finalExpectedEvent, "string", "Must pass a string for finalExpectedEvent"); + + this.#navigationAPI = window.navigation; + this.#domExceptionConstructor = window.DOMException; + this.#location = window.location; + + this.#skipCurrentChange = skipCurrentChange; + this.#finalExpectedEvent = finalExpectedEvent; + this.#finalExpectedEventCount = finalExpectedEventCount; + } + + setUpNavigationAPIListeners() { + this.#navigationAPI.addEventListener("navigate", e => { + this.record("navigate"); + + e.signal.addEventListener("abort", () => { + this.recordWithError("AbortSignal abort", e.signal.reason); + }); + }); + + this.#navigationAPI.addEventListener("navigateerror", e => { + this.recordWithError("navigateerror", e.error); + + this.#navigationAPI.transition?.finished.then( + () => this.record("transition.finished fulfilled"), + err => this.recordWithError("transition.finished rejected", err) + ); + }); + + this.#navigationAPI.addEventListener("navigatesuccess", () => { + this.record("navigatesuccess"); + + this.#navigationAPI.transition?.finished.then( + () => this.record("transition.finished fulfilled"), + err => this.recordWithError("transition.finished rejected", err) + ); + }); + + if (!this.#skipCurrentChange) { + this.#navigationAPI.addEventListener("currententrychange", () => this.record("currententrychange")); + } + } + + setUpResultListeners(result, suffix = "") { + result.committed.then( + () => this.record(`committed fulfilled${suffix}`), + err => this.recordWithError(`committed rejected${suffix}`, err) + ); + + result.finished.then( + () => this.record(`finished fulfilled${suffix}`), + err => this.recordWithError(`finished rejected${suffix}`, err) + ); + } + + record(name) { + const transitionProps = this.#navigationAPI.transition === null ? null : { + from: this.#navigationAPI.transition.from, + navigationType: this.#navigationAPI.transition.navigationType + }; + + this.#events.push({ name, location: this.#location.hash, transitionProps }); + + if (name === this.#finalExpectedEvent && ++this.#currentFinalEventCount === this.#finalExpectedEventCount) { + this.#readyToAssertResolve(); + } + } + + recordWithError(name, errorObject) { + this.record(name); + this.#errors.push({ name, errorObject }); + } + + get readyToAssert() { + return this.#readyToAssertPromise; + } + + // Usage: + // recorder.assert([ + // /* event name, location.hash value, navigation.transition properties */ + // ["currententrychange", "", null], + // ["committed fulfilled", "#1", { from, navigationType }], + // ... + // ]); + // + // The array format is to avoid repitition at the call site, but I recommend + // you document it like above. + // + // This will automatically also assert that any error objects recorded are + // equal to each other. Use the other assert functions to check the actual + // contents of the error objects. + assert(expectedAsArray) { + if (this.#skipCurrentChange) { + expectedAsArray = expectedAsArray.filter(expected => expected[0] !== "currententrychange"); + } + + // Doing this up front gives nicer error messages because + // assert_array_equals is nice. + const recordedNames = this.#events.map(e => e.name); + const expectedNames = expectedAsArray.map(e => e[0]); + assert_array_equals(recordedNames, expectedNames); + + for (let i = 0; i < expectedAsArray.length; ++i) { + const recorded = this.#events[i]; + const expected = expectedAsArray[i]; + + assert_equals( + recorded.location, + expected[1], + `event ${i} (${recorded.name}): location.hash value` + ); + + if (expected[2] === null) { + assert_equals( + recorded.transitionProps, + null, + `event ${i} (${recorded.name}): navigation.transition expected to be null` + ); + } else { + assert_not_equals( + recorded.transitionProps, + null, + `event ${i} (${recorded.name}): navigation.transition expected not to be null` + ); + assert_equals( + recorded.transitionProps.from, + expected[2].from, + `event ${i} (${recorded.name}): navigation.transition.from` + ); + assert_equals( + recorded.transitionProps.navigationType, + expected[2].navigationType, + `event ${i} (${recorded.name}): navigation.transition.navigationType` + ); + } + } + + if (this.#errors.length > 1) { + for (let i = 1; i < this.#errors.length; ++i) { + assert_equals( + this.#errors[i].errorObject, + this.#errors[0].errorObject, + `error objects must match: error object for ${this.#errors[i].name} did not match the one for ${this.#errors[0].name}` + ); + } + } + } + + assertErrorsAreAbortErrors() { + assert_greater_than( + this.#errors.length, + 0, + "No errors were recorded but assertErrorsAreAbortErrors() was called" + ); + + // Assume assert() has been called so all error objects are the same. + const { errorObject } = this.#errors[0]; + assert_throws_dom("AbortError", this.#domExceptionConstructor, () => { throw errorObject; }); + } + + assertErrorsAre(expectedErrorObject) { + assert_greater_than( + this.#errors.length, + 0, + "No errors were recorded but assertErrorsAre() was called" + ); + + // Assume assert() has been called so all error objects are the same. + const { errorObject } = this.#errors[0]; + assert_equals(errorObject, expectedErrorObject); + } +} diff --git a/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/resources/notify-top-early.html b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/resources/notify-top-early.html new file mode 100644 index 000000000000..bcf27f4809e7 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/resources/notify-top-early.html @@ -0,0 +1,7 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/transition-cross-document.html b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/transition-cross-document.html new file mode 100644 index 000000000000..4a14a1083d46 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/transition-cross-document.html @@ -0,0 +1,44 @@ + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/transition-finished-mark-as-handled.html b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/transition-finished-mark-as-handled.html new file mode 100644 index 000000000000..859e07df1397 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/transition-finished-mark-as-handled.html @@ -0,0 +1,20 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/transition-realms-and-identity.html b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/transition-realms-and-identity.html new file mode 100644 index 000000000000..c2c06fcca260 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/ordering-and-transition/transition-realms-and-identity.html @@ -0,0 +1,41 @@ + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/per-entry-events/dispose-after-bfcache.html b/blink/web_tests/wpt_internal/navigation-api/per-entry-events/dispose-after-bfcache.html new file mode 100644 index 000000000000..7d3ef4f81edb --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/per-entry-events/dispose-after-bfcache.html @@ -0,0 +1,32 @@ + + + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/per-entry-events/dispose-cross-document.html b/blink/web_tests/wpt_internal/navigation-api/per-entry-events/dispose-cross-document.html new file mode 100644 index 000000000000..67f54da48d21 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/per-entry-events/dispose-cross-document.html @@ -0,0 +1,37 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/per-entry-events/dispose-same-document-navigate-during.html b/blink/web_tests/wpt_internal/navigation-api/per-entry-events/dispose-same-document-navigate-during.html new file mode 100644 index 000000000000..59d9b3cce397 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/per-entry-events/dispose-same-document-navigate-during.html @@ -0,0 +1,50 @@ + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/per-entry-events/dispose-same-document-reload-with-transitionWhile.html b/blink/web_tests/wpt_internal/navigation-api/per-entry-events/dispose-same-document-reload-with-transitionWhile.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/per-entry-events/dispose-same-document-reload-with-transitionWhile.html rename to blink/web_tests/wpt_internal/navigation-api/per-entry-events/dispose-same-document-reload-with-transitionWhile.html diff --git a/blink/web_tests/external/wpt/navigation-api/per-entry-events/dispose-same-document-replace-with-transitionWhile.html b/blink/web_tests/wpt_internal/navigation-api/per-entry-events/dispose-same-document-replace-with-transitionWhile.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/per-entry-events/dispose-same-document-replace-with-transitionWhile.html rename to blink/web_tests/wpt_internal/navigation-api/per-entry-events/dispose-same-document-replace-with-transitionWhile.html diff --git a/blink/web_tests/wpt_internal/navigation-api/per-entry-events/dispose-same-document-replaceState.html b/blink/web_tests/wpt_internal/navigation-api/per-entry-events/dispose-same-document-replaceState.html new file mode 100644 index 000000000000..a6197260a28b --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/per-entry-events/dispose-same-document-replaceState.html @@ -0,0 +1,28 @@ + + + + diff --git a/blink/web_tests/external/wpt/navigation-api/per-entry-events/dispose-same-document-transitionWhile.html b/blink/web_tests/wpt_internal/navigation-api/per-entry-events/dispose-same-document-transitionWhile.html similarity index 100% rename from blink/web_tests/external/wpt/navigation-api/per-entry-events/dispose-same-document-transitionWhile.html rename to blink/web_tests/wpt_internal/navigation-api/per-entry-events/dispose-same-document-transitionWhile.html diff --git a/blink/web_tests/wpt_internal/navigation-api/per-entry-events/dispose-same-document.html b/blink/web_tests/wpt_internal/navigation-api/per-entry-events/dispose-same-document.html new file mode 100644 index 000000000000..27806ce3c86a --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/per-entry-events/dispose-same-document.html @@ -0,0 +1,65 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/scroll-restoration/after-transition-basic.html b/blink/web_tests/wpt_internal/navigation-api/scroll-restoration/after-transition-basic.html new file mode 100644 index 000000000000..647b12ba7d01 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/scroll-restoration/after-transition-basic.html @@ -0,0 +1,20 @@ + + + + +

+
+ + diff --git a/blink/web_tests/wpt_internal/navigation-api/scroll-restoration/after-transition-change-history-scroll-restoration-during-promise.html b/blink/web_tests/wpt_internal/navigation-api/scroll-restoration/after-transition-change-history-scroll-restoration-during-promise.html new file mode 100644 index 000000000000..5e60ca33721c --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/scroll-restoration/after-transition-change-history-scroll-restoration-during-promise.html @@ -0,0 +1,31 @@ + + + + +
+
+ + diff --git a/blink/web_tests/wpt_internal/navigation-api/scroll-restoration/after-transition-reject.html b/blink/web_tests/wpt_internal/navigation-api/scroll-restoration/after-transition-reject.html new file mode 100644 index 000000000000..7a75b8abd037 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/scroll-restoration/after-transition-reject.html @@ -0,0 +1,21 @@ + + + + +
+
+ + diff --git a/blink/web_tests/wpt_internal/navigation-api/scroll-restoration/after-transition-timing.html b/blink/web_tests/wpt_internal/navigation-api/scroll-restoration/after-transition-timing.html new file mode 100644 index 000000000000..35a9071459f7 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/scroll-restoration/after-transition-timing.html @@ -0,0 +1,43 @@ + + + + +
+
+ + diff --git a/blink/web_tests/wpt_internal/navigation-api/scroll-restoration/after-transition-with-history-scroll-restoration-manual.html b/blink/web_tests/wpt_internal/navigation-api/scroll-restoration/after-transition-with-history-scroll-restoration-manual.html new file mode 100644 index 000000000000..6c7a8385606e --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/scroll-restoration/after-transition-with-history-scroll-restoration-manual.html @@ -0,0 +1,23 @@ + + + + +
+
+ + diff --git a/blink/web_tests/wpt_internal/navigation-api/scroll-restoration/manual-basic.html b/blink/web_tests/wpt_internal/navigation-api/scroll-restoration/manual-basic.html new file mode 100644 index 000000000000..84732fb532bd --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/scroll-restoration/manual-basic.html @@ -0,0 +1,20 @@ + + + + +
+
+ + diff --git a/blink/web_tests/wpt_internal/navigation-api/scroll-restoration/manual-immediate-restoreScroll.html b/blink/web_tests/wpt_internal/navigation-api/scroll-restoration/manual-immediate-restoreScroll.html new file mode 100644 index 000000000000..f0676ea1b378 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/scroll-restoration/manual-immediate-restoreScroll.html @@ -0,0 +1,24 @@ + + + + +
+
+ + diff --git a/blink/web_tests/wpt_internal/navigation-api/scroll-restoration/manual-restoreScroll-after-dispatch.html b/blink/web_tests/wpt_internal/navigation-api/scroll-restoration/manual-restoreScroll-after-dispatch.html new file mode 100644 index 000000000000..a3d01a52a34f --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/scroll-restoration/manual-restoreScroll-after-dispatch.html @@ -0,0 +1,32 @@ + + + + +
+
+ + diff --git a/blink/web_tests/wpt_internal/navigation-api/scroll-restoration/manual-restoreScroll-after-resolve.html b/blink/web_tests/wpt_internal/navigation-api/scroll-restoration/manual-restoreScroll-after-resolve.html new file mode 100644 index 000000000000..6cf0fe16061e --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/scroll-restoration/manual-restoreScroll-after-resolve.html @@ -0,0 +1,27 @@ + + + + +
+
+ + diff --git a/blink/web_tests/wpt_internal/navigation-api/scroll-restoration/manual-restoreScroll-repeated.html b/blink/web_tests/wpt_internal/navigation-api/scroll-restoration/manual-restoreScroll-repeated.html new file mode 100644 index 000000000000..9ca5bfa06434 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/scroll-restoration/manual-restoreScroll-repeated.html @@ -0,0 +1,25 @@ + + + + +
+
+ + diff --git a/blink/web_tests/wpt_internal/navigation-api/scroll-restoration/restoreScroll-exceptions.html b/blink/web_tests/wpt_internal/navigation-api/scroll-restoration/restoreScroll-exceptions.html new file mode 100644 index 000000000000..2f2b459d93bd --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/scroll-restoration/restoreScroll-exceptions.html @@ -0,0 +1,41 @@ + + + + +
+
+ + diff --git a/blink/web_tests/wpt_internal/navigation-api/state/cross-document-away-and-back.html b/blink/web_tests/wpt_internal/navigation-api/state/cross-document-away-and-back.html new file mode 100644 index 000000000000..cccaebdf7b9a --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/state/cross-document-away-and-back.html @@ -0,0 +1,31 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/state/cross-document-getState-undefined.html b/blink/web_tests/wpt_internal/navigation-api/state/cross-document-getState-undefined.html new file mode 100644 index 000000000000..cbd5cdd52ed9 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/state/cross-document-getState-undefined.html @@ -0,0 +1,17 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/state/cross-document-getState.html b/blink/web_tests/wpt_internal/navigation-api/state/cross-document-getState.html new file mode 100644 index 000000000000..aedbc471e054 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/state/cross-document-getState.html @@ -0,0 +1,19 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/state/cross-document-location-api.html b/blink/web_tests/wpt_internal/navigation-api/state/cross-document-location-api.html new file mode 100644 index 000000000000..395d95c6fbe6 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/state/cross-document-location-api.html @@ -0,0 +1,20 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/state/history-pushState.html b/blink/web_tests/wpt_internal/navigation-api/state/history-pushState.html new file mode 100644 index 000000000000..7d3c79ba6ca2 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/state/history-pushState.html @@ -0,0 +1,11 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/state/history-replaceState.html b/blink/web_tests/wpt_internal/navigation-api/state/history-replaceState.html new file mode 100644 index 000000000000..bdf356163932 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/state/history-replaceState.html @@ -0,0 +1,11 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/state/location-reload.html b/blink/web_tests/wpt_internal/navigation-api/state/location-reload.html new file mode 100644 index 000000000000..bf1bc105fbfc --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/state/location-reload.html @@ -0,0 +1,19 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/state/same-document-away-and-back-location-api.html b/blink/web_tests/wpt_internal/navigation-api/state/same-document-away-and-back-location-api.html new file mode 100644 index 000000000000..d161df8b5295 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/state/same-document-away-and-back-location-api.html @@ -0,0 +1,47 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/state/same-document-away-and-back-navigation-api.html b/blink/web_tests/wpt_internal/navigation-api/state/same-document-away-and-back-navigation-api.html new file mode 100644 index 000000000000..220908e4c46c --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/state/same-document-away-and-back-navigation-api.html @@ -0,0 +1,53 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/basic.html b/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/basic.html new file mode 100644 index 000000000000..b4a49e5bf9ca --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/basic.html @@ -0,0 +1,25 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/cross-document-away-and-back.html b/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/cross-document-away-and-back.html new file mode 100644 index 000000000000..c37d5e979a06 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/cross-document-away-and-back.html @@ -0,0 +1,31 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/cross-document-location-api.html b/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/cross-document-location-api.html new file mode 100644 index 000000000000..26191fb8761b --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/cross-document-location-api.html @@ -0,0 +1,20 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/exception-order-initial-about-blank-unserializablestate.html b/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/exception-order-initial-about-blank-unserializablestate.html new file mode 100644 index 000000000000..010632a40fcd --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/exception-order-initial-about-blank-unserializablestate.html @@ -0,0 +1,13 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/exception-order-not-fully-active-unserializablestate.html b/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/exception-order-not-fully-active-unserializablestate.html new file mode 100644 index 000000000000..1e1c1e2bae48 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/exception-order-not-fully-active-unserializablestate.html @@ -0,0 +1,20 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/history-pushState.html b/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/history-pushState.html new file mode 100644 index 000000000000..852294c64f4e --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/history-pushState.html @@ -0,0 +1,11 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/history-replaceState.html b/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/history-replaceState.html new file mode 100644 index 000000000000..3eb91a9a80ce --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/history-replaceState.html @@ -0,0 +1,11 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/initial-about-blank.html b/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/initial-about-blank.html new file mode 100644 index 000000000000..c28137c082a3 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/initial-about-blank.html @@ -0,0 +1,13 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/location-reload.html b/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/location-reload.html new file mode 100644 index 000000000000..8589eeb694e7 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/location-reload.html @@ -0,0 +1,19 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/no-args.html b/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/no-args.html new file mode 100644 index 000000000000..3fd011e3d373 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/no-args.html @@ -0,0 +1,15 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/not-fully-active.html b/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/not-fully-active.html new file mode 100644 index 000000000000..fce5e72c8d40 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/not-fully-active.html @@ -0,0 +1,20 @@ + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/opaque-origin.html b/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/opaque-origin.html new file mode 100644 index 000000000000..898ca27e4fab --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/opaque-origin.html @@ -0,0 +1,9 @@ + + + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/resources/opaque-origin-page.html b/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/resources/opaque-origin-page.html new file mode 100644 index 000000000000..59931458a6b8 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/resources/opaque-origin-page.html @@ -0,0 +1,11 @@ + + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/same-document-away-and-back-location-api.html b/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/same-document-away-and-back-location-api.html new file mode 100644 index 000000000000..47b1904f4f46 --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/same-document-away-and-back-location-api.html @@ -0,0 +1,40 @@ + + + + diff --git a/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/unserializable.html b/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/unserializable.html new file mode 100644 index 000000000000..596ab16d621f --- /dev/null +++ b/blink/web_tests/wpt_internal/navigation-api/updateCurrentEntry-method/unserializable.html @@ -0,0 +1,29 @@ + + + + + +