Open Bug 1050205 Opened 5 years ago Updated 5 years ago

Expose OS to mochitest

Categories

(Testing :: Mochitest, defect)

defect
Not set

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')".
You need to log in before you can comment on or make changes to this bug.