DescriptionFix TabCaptureApiTest.FullscreenEvents flakiness
Fixes flakiness caused by a subtle distinction in document fullscreen
state change: The tabCapture.onStatusChanged API can sometimes report a
fullscreen state change before the document itself is aware the change
occurred. This is because the tabCapture API's listener reports on the
browser's fullscreen state, whereas the document is only aware of its
own internal fullscreen state (which is updated only after the browser
notifies it of a change).
The flakiness was due to the C++ side of the test being notified that
the page had entered fullscreen before the page itself was aware of it.
This caused the simulated mouse click (to toggle fullscreen mode) to be
made early, and then both the C++ and JS sides of the test became
out-of-sync and froze, each waiting on the other to do something.
This change fixes the issue by always using the document's fullscreen
change listeners, to ensure the out-of-sync condition cannot occur.
This change also "freshens up" the JavaScript code in this test, using
newer ES6 syntax.
BUG=675851
Committed: https://crrev.com/c52ce18fd8f6db97c62737f0924bd61a2727c5d3
Cr-Commit-Position: refs/heads/master@{#441252}
Patch Set 1 #
Total comments: 4
Patch Set 2 : nits #
Messages
Total messages: 18 (11 generated)
|