[webkit-changes] [WebKit/WebKit] 438bd4: Implement internal means to consume user activatio...

Marcos Cáceres noreply at github.com
Mon Nov 21 14:31:28 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 438bd44b426edf09e02f977d7a0fa30a9410f76e
      https://github.com/WebKit/WebKit/commit/438bd44b426edf09e02f977d7a0fa30a9410f76e
  Author: Marcos Caceres <marcos at marcosc.com>
  Date:   2022-11-21 (Mon, 21 Nov 2022)

  Changed paths:
    A LayoutTests/fast/frames/consume_transient_activation-expected.txt
    A LayoutTests/fast/frames/consume_transient_activation.html
    A LayoutTests/imported/w3c/web-platform-tests/html/user-activation/activation-same-and-cross-origin.sub-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/html/user-activation/activation-same-and-cross-origin.sub.html
    M LayoutTests/imported/w3c/web-platform-tests/html/user-activation/activation-trigger-keyboard-enter.html
    M LayoutTests/imported/w3c/web-platform-tests/html/user-activation/activation-trigger-keyboard-escape.html
    M LayoutTests/imported/w3c/web-platform-tests/html/user-activation/activation-trigger-mouse-left.html
    M LayoutTests/imported/w3c/web-platform-tests/html/user-activation/activation-trigger-mouse-right.html
    M LayoutTests/imported/w3c/web-platform-tests/html/user-activation/activation-trigger-pointerevent.html
    M LayoutTests/imported/w3c/web-platform-tests/html/user-activation/consumption-crossorigin.sub-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/html/user-activation/consumption-crossorigin.sub.tentative-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/html/user-activation/consumption-crossorigin.sub.tentative.html
    M LayoutTests/imported/w3c/web-platform-tests/html/user-activation/consumption-sameorigin-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/html/user-activation/consumption-sameorigin.tentative-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/html/user-activation/consumption-sameorigin.tentative.html
    M LayoutTests/imported/w3c/web-platform-tests/html/user-activation/resources/child-two.html
    M LayoutTests/imported/w3c/web-platform-tests/html/user-activation/resources/consumption-crossorigin-child.sub.html
    M LayoutTests/imported/w3c/web-platform-tests/html/user-activation/resources/consumption-sameorigin-child.html
    M LayoutTests/imported/w3c/web-platform-tests/html/user-activation/resources/utils.js
    M LayoutTests/imported/w3c/web-platform-tests/resources/testdriver-vendor.js
    M LayoutTests/imported/w3c/web-platform-tests/resources/testdriver.js
    M LayoutTests/platform/ios-wk2/TestExpectations
    M LayoutTests/platform/win/TestExpectations
    M Source/WebCore/page/DOMWindow.h
    M Source/WebCore/testing/Internals.cpp
    M Source/WebCore/testing/Internals.h
    M Source/WebCore/testing/Internals.idl

  Log Message:
  -----------
  Implement internal means to consume user activation via test-driver.js
https://bugs.webkit.org/show_bug.cgi?id=247968
rdar://102399664

This patch adds two APIs for testing internally within WebKit:

 * The Internals interface gains the ability to consume the user activation
   of a Window via internal.consumeTransientActivation().

 * And test_driver.js gains the ability to consume the user activation of
   a Window via test_driver.consume_user_activation(). This can be used
   for Web Platform Tests.

Collectively, these are useful for testing APIs that depend on transient activation,
as it allows us to easily check that the API works as expected if the user activation
has been consumed.

Reviewed by Chris Dumez.

* LayoutTests/fast/frames/consume_transient_activation-expected.txt: Added.
* LayoutTests/fast/frames/consume_transient_activation.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/user-activation/activation-same-and-cross-origin.sub-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/user-activation/activation-same-and-cross-origin.sub.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/user-activation/activation-trigger-keyboard-enter.html:
* LayoutTests/imported/w3c/web-platform-tests/html/user-activation/activation-trigger-keyboard-escape.html:
* LayoutTests/imported/w3c/web-platform-tests/html/user-activation/activation-trigger-mouse-left.html:
* LayoutTests/imported/w3c/web-platform-tests/html/user-activation/activation-trigger-mouse-right.html:
* LayoutTests/imported/w3c/web-platform-tests/html/user-activation/activation-trigger-pointerevent.html:
* LayoutTests/imported/w3c/web-platform-tests/html/user-activation/consumption-crossorigin.sub-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/user-activation/consumption-crossorigin.sub.tentative-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/user-activation/consumption-crossorigin.sub-expected.txt.
* LayoutTests/imported/w3c/web-platform-tests/html/user-activation/consumption-crossorigin.sub.tentative.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/user-activation/consumption-sameorigin-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/user-activation/consumption-sameorigin.tentative-expected.txt: Copied from LayoutTests/imported/w3c/web-platform-tests/html/user-activation/consumption-sameorigin-expected.txt.
* LayoutTests/imported/w3c/web-platform-tests/html/user-activation/consumption-sameorigin.tentative.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/user-activation/resources/child-two.html:
* LayoutTests/imported/w3c/web-platform-tests/html/user-activation/resources/consumption-crossorigin-child.sub.html:
* LayoutTests/imported/w3c/web-platform-tests/html/user-activation/resources/consumption-sameorigin-child.html:
* LayoutTests/imported/w3c/web-platform-tests/html/user-activation/resources/utils.js:
(getEvent):
(async consumeTransientActivation): Deleted.
* LayoutTests/imported/w3c/web-platform-tests/resources/testdriver-vendor.js:
* LayoutTests/imported/w3c/web-platform-tests/resources/testdriver.js:
(window.test_driver.consume_user_activation):
(window.test_driver_internal.async consume_user_activation):
* LayoutTests/platform/ios-wk2/TestExpectations:
* LayoutTests/platform/win/TestExpectations:
* Source/WebCore/page/DOMWindow.h:
* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::consumeTransientActivation):
* Source/WebCore/testing/Internals.h:
* Source/WebCore/testing/Internals.idl:

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




More information about the webkit-changes mailing list