[wpt-sync] Sync PR 16414 - [generic-sensor] Avoid unhandled promise rejection
Categories
(Testing :: web-platform-tests, defect, P4)
Tracking
(firefox69 fixed)
Tracking | Status | |
---|---|---|
firefox69 | --- | fixed |
People
(Reporter: mozilla.org, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 16414 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/16414
Details from upstream follow.
Mike Pennisi <mike@mikepennisi.com> wrote:
[generic-sensor] Avoid unhandled promise rejection
By testing for a global binding via an unqualified IdentifierReference,
the Generic Sensor utility file produces a rejected promise which is not
handled. If testharness.js has not yet determined that testing is
complete, this unhandled rejection will cause a harness-level error.
Such errors will occur based on relative timing of asynchronous
operations, and this has been observed to be unstable in Apple Safari as
hosted on Azure Pipelines.Update the feature detection logic to avoid generating an unhandled
rejection by instead referencing a property of the global object.
I have not been able to reproduce the harness error locally, but the issue is clear from the results collected via Azure Pipelines and uploaded to wpt.fyi. The most recent results for
ambient-light/AmbientLightSensor_insecure_context.html
demonstrate the problemERROR message: Can't find variable: MojoInterfaceInterceptor
The "history" feature on that page shows that this is intermittent in that environment. The same problem affects all tests which do not use the
sensor_test
function, that is: all of the_insecure_context.html
tests.In addition to promoting determinism in those specific tests, this change improves failure messages for all tests in browsers which don't define the Mojo interface. Currently, the tests fail with the message: "ReferenceError: MojoInterfaceInterceptor is not defined". With this patch applied, they instead fail with the message, "assert_true: Mojo testing interface is not available. expected true got false"
Assignee | ||
Comment 1•5 years ago
|
||
Pushed to try https://treeherder.mozilla.org/#/jobs?repo=try&revision=4db01c92632f888ec20bce56d982b17636b38ef4
Pushed by james@hoppipolla.co.uk: https://hg.mozilla.org/integration/mozilla-inbound/rev/edd048a3034d [wpt PR 16414] - [generic-sensor] Avoid unhandled promise rejection, a=testonly
Comment 3•5 years ago
|
||
bugherder |
Description
•