[webkit-changes] [WebKit/WebKit] a6a412: [Navigation] Fix navigation-methods/return-value/n...

Rob Buis noreply at github.com
Fri Mar 15 16:37:37 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a6a4129a5ef31c678d949ef5c9770bc5cc94d6b7
      https://github.com/WebKit/WebKit/commit/a6a4129a5ef31c678d949ef5c9770bc5cc94d6b7
  Author: Rob Buis <rbuis at igalia.com>
  Date:   2024-03-15 (Fri, 15 Mar 2024)

  Changed paths:
    M LayoutTests/TestExpectations
    M LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/return-value/back-forward-out-of-bounds-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/return-value/navigate-push-initial-about-blank-expected.txt
    M Source/WebCore/bindings/js/JSDOMPromiseDeferred.cpp
    M Source/WebCore/bindings/js/JSDOMPromiseDeferred.h
    M Source/WebCore/page/Navigation.cpp

  Log Message:
  -----------
  [Navigation] Fix navigation-methods/return-value/navigate-push-initial-about-blank.html
https://bugs.webkit.org/show_bug.cgi?id=270008

Reviewed by Darin Adler.

The navigate implementation needs to check whether the history option is "replace" and the document is about:blank and throw an exception if not [1].

To fully fix this test, adjust DeferredPromise::reject so it can reuse a JS exception object, since the
test framework will check committed/finished promises return the same exception object.

[1] https://html.spec.whatwg.org/multipage/nav-history-apis.html#dom-navigation-navigate (Step 4)

* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/return-value/back-forward-out-of-bounds-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/navigation-api/navigation-methods/return-value/navigate-push-initial-about-blank-expected.txt:
* Source/WebCore/bindings/js/JSDOMPromiseDeferred.cpp:
(WebCore::DeferredPromise::reject):
* Source/WebCore/bindings/js/JSDOMPromiseDeferred.h:
(WebCore::DeferredPromise::reject):
* Source/WebCore/page/Navigation.cpp:
(WebCore::createErrorResult):
(WebCore::Navigation::navigate):

Canonical link: https://commits.webkit.org/276213@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list