Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a53135c21ca451c30ae8fe5dfeb3dc7f05377304
      
https://github.com/WebKit/WebKit/commit/a53135c21ca451c30ae8fe5dfeb3dc7f05377304
  Author: Marcos Caceres <[email protected]>
  Date:   2022-12-03 (Sat, 03 Dec 2022)

  Changed paths:
    M LayoutTests/gamepad/gamepad-polling-access-expected.txt
    M LayoutTests/gamepad/gamepad-polling-access.html
    M Source/WebCore/testing/Internals.cpp
    M Source/WebCore/testing/MockGamepadProvider.cpp
    M Source/WebCore/testing/MockGamepadProvider.h

  Log Message:
  -----------
  [WK2] Flaky ASSERTION FAILED: m_gamepads.isEmpty() on 
gamepad/gamepad-polling-access.html
https://bugs.webkit.org/show_bug.cgi?id=245051
rdar://99802167

Reviewed by Brady Eidson and Chris Dumez.

The MockGamepadProvider was keeping mock gamepads alive after the test
was done, which caused the ASSERT.

This patch makes the MockGamepadProvider clear its list of mock gamepads
when each test is done.

Also modernized the gamepad-polling-access.html test at bit to use
promises when waiting on the events.

* LayoutTests/gamepad/gamepad-polling-access-expected.txt:
* LayoutTests/gamepad/gamepad-polling-access.html:
* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::Internals):
* Source/WebCore/testing/MockGamepadProvider.cpp:
(WebCore::MockGamepadProvider::clearMockGamepads):
* Source/WebCore/testing/MockGamepadProvider.h:

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to