This patch temporarily removes the `--extra-profiler-run` flag from the Browsertime Benchmark tests in CI.
Originally the logic was intended for pageload tests. Currently it is causing some issues (intermittent failures and useless profiles for benchmarks)
so in the mean time we can disable it before spending time on fixing the implementation.
Differential Revision: https://phabricator.services.mozilla.com/D173172
Presently, this test has three flaws that make it prone to intermittents:
1) It triggers events before waiting for them.
2) It requires events to arrive in a specific order, with no other events
arriving.
3) It triggers fullscreen enter and exit events very rapidly, with no
event protection to ensure an asynchronous transition is complete before
starting the next one.
This change fixes the first two issues by capturing all the events as they
arrive, and passively allowing unexpected events. As soon as the
waitForEvent promise is fulfilled, it resets all of these trackers so old
events won't accidentally fulfil new requests.
Additionally, if it is important that certain events don't arrive while
waiting for desired events, this adds a way to specify those forbidden
events. This is used to ensure that clicks that are supposed to trigger
fullscreen aren't instead triggering play or pause.
To address the third issue, this change adds a repeatUntilSuccessful
method that triggers a promise on each event loop until it resolves.
This is used on all the changes to fullscreen, which can be rejected by
the browser. The reasons for rejection vary, often related to which
browsing context is active, but these issues seem to go away after a
period of time. It's not clear that there's an event we can wait on that
will guarantee that the fullscreen request will succeed, so we instead
make the request repeatedly until it succeeds.
This change also takes the video out of fullscreen mode at the end of the
test.
Differential Revision: https://phabricator.services.mozilla.com/D172329
Either of these changes (ie dropping the setTabState call for batch restored
tabs, or ensuring the restoreTabs code correctly fills its array with dummy
entries) is sufficient here. I chose to do both because I think in both cases
the brokenness is not limited to this scenario or the issues at hand.
Specifically, the setTabState call was added in bug 1521346 to deal with
moved lazy tabs, but is now being invoked for session restore because of
the batchInsertingTabs optimization work. It doesn't actually need to be,
as far as I can tell, and the lacking _tPos in this case (because we don't
insert the tab into the tabstrip a few lines above) is what breaks things
inside _ensureNoNullsInTabDataList. Note that this _already_ was breaking
things in restoreTab(), which would assign into tabs[undefined] on the
window state object, so just dropping the call seemed better than wallpapering
the absence of _tPos.
The restoreTabs code, pre-patch, calls _ensureNoNullsInTabDataList but that
will never do anything, because right before calling it we change the array
length, so maxPos was always smaller than the size of the list. This meant
we still had empty slots in the array, which was also causing confusion down
the line.
I added the explicit exception for the broken _tPos in restoreTab so that we
notice any future issues with this more quickly. Doing so without any of the
other fixes broke the pre-existing browser_586068-apptabs.js test, so
hopefully that will catch any future changes that break the code's assumptions.
Differential Revision: https://phabricator.services.mozilla.com/D173070
nsIAsyncInputStreams keep a reference to the callback object, causing
possible leaks which will result in assertions in workers. Also use a
StrongWorkerRef to ensure the worker remains around until the
OnInputStreamReady callback occurs.
Differential Revision: https://phabricator.services.mozilla.com/D171810
da -> 24316ce1c343f25b46646ac12089f5aa3ae9fb8d
de -> 4458a56a897cd1668101b8f8d01ccc2776f3acbb
ia -> 9c49840ea5eace47061383fa14c48a81916ea3d5
lo -> 9f642b135313a0e600421501b32b86e8e6405e60
Since we added a root `pyproject.toml` file, it triggered a code path in pytest
which tries to open the file to read configuration with `tomli`. For whatever
reason, this isn't vendored for wpt and we therefore get import errors.
Differential Revision: https://phabricator.services.mozilla.com/D173166
Also explicitly use titlebar=no on the PIP window, since we really don't
want a titlebar.
This way we don't end up without titlebars in other alwaysontop windows.
Differential Revision: https://phabricator.services.mozilla.com/D172992
The default value for the target is Unknown, so all callsites
keep working.
We also add a Target value used for Document precomputation. This
value is enabled in RFP Lite mode, and allows us to precompute
ShouldRFP and cache it for faster computations later. (The later
computations will still check the Target, but won't need to do the
other expensive checks.)
Differential Revision: https://phabricator.services.mozilla.com/D170891