Closed Bug 1944677 Opened 1 year ago Closed 1 year ago

userPrefersReducedMotion is undefined in xpcshell tests

Categories

(Firefox :: Nimbus Desktop Client, defect, P1)

defect

Tracking

()

RESOLVED FIXED
137 Branch
Tracking Status
firefox137 --- fixed

People

(Reporter: beth, Assigned: beth)

References

Details

Attachments

(1 file)

The work from bug 1941961 was backed out because we triggered some logging in the targeting context recorder:

TEST-UNEXPECTED-FAIL | xpcshell.toml:toolkit/components/search/tests/xpcshell/test_defaultEngine.js | test_switch_with_invalid_overriddenBy - [test_switch_with_invalid_overriddenBy : 614] Unexpected console message received during test: TargetingContextRecorder: Could not get "userPrefersReducedMotion" - false == true

As it turns out, this property is undefined in xpcshell tests because xpcshell tests used a stubbed out version of nsIXULAppInfo that does not define the property.

This property can only be undefined if we are in an xpcshell tests
because it uses a stubbed nsIXULAppInfo.

Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4fbb13527586 Coerce userPrefersReducedMotion to false in targeting context recorder r=emcminn

Backed out 2 changesets (Bug 1944677, Bug 1941961) for causing xpcshell failures on test_defaultEngine.

Push with failures

Failure log

Backout link

Flags: needinfo?(brennie)
Flags: needinfo?(brennie)
Pushed by brennie@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ccc24e3e83b5 Coerce userPrefersReducedMotion to false in targeting context recorder r=emcminn
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 137 Branch
Regressions: 1948014
Depends on: 1928107
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: