Commit 024c07a7 authored by sotaro's avatar sotaro
Browse files

Bug 1758607 - Adds more latency for waiting device reset handling completed...

Bug 1758607 - Adds more latency for waiting device reset handling completed r=gfx-reviewers,jrmuizel

test_device_reset.html checks if canvas works after device reset. Since Bug 1757879 fix, windowutils.triggerDeviceReset() does the device reset handling asynchronously in gecko. And the device reset happened during testing canvas since 1757879 fix. The canvas testing needs to happen after the gecko's device reset handling.

The change adds more latency for waiting device reset completed in gecko.

Differential Revision: https://phabricator.services.mozilla.com/D141178
parent 7f20a7a7
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -71,7 +71,13 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1274663

      SimpleTest.waitForExplicitFinish();
      window.addEventListener("MozAfterPaint", function paintHandle(e) {
         // Add more latency before calling runCanvasTest()
         // runCanvasTest() needs to be called after gecko's device reset handling.
         // Since Bug 1757879 fix, the triggerDeviceReset() does the device reset
         // handling asynchronously.
         window.requestAnimationFrame(() => {
           runCanvasTest();
        });
        window.removeEventListener("MozAfterPaint", paintHandle);
      });