Open Bug 1050205 Opened 10 years ago Updated 2 years ago

Expose OS to mochitest

Categories

(Testing :: Mochitest, defect)

defect

Tracking

(Not tracked)

People

(Reporter: gfritzsche, Unassigned)

References

Details

We have custom tests for the operating system spread across our tests, e.g.:
http://dxr.mozilla.org/mozilla-central/search?q=iswindows+path%3Atest&case=false

isWindows, gIsWindows, isOSX, gIsOsx, ...

We should just expose a property for that to the tests from a single location.
See also bug 1050207 for the xpcshell incarnation.
See Also: → 1050207
I think it'd be great to just load the mozinfo.json file we already use for manifest parsing, and make it available in global scope, so you could say "if (mozinfo.os == 'windows')".
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.