From: L. David Baron Add an OSX variable to the reftest condition sandbox to make it easier to test Mac OS X versions. diff --git a/layout/tools/reftest/reftest.js b/layout/tools/reftest/reftest.js --- a/layout/tools/reftest/reftest.js +++ b/layout/tools/reftest/reftest.js @@ -539,16 +539,21 @@ function BuildConditionSandbox(aURL) { sandbox.http = { __exposedProps__: {} }; for each (var prop in [ "userAgent", "appName", "appVersion", "vendor", "vendorSub", "product", "productSub", "platform", "oscpu", "language", "misc" ]) { sandbox.http[prop] = hh[prop]; sandbox.http.__exposedProps__[prop] = "r"; } + + // Set OSX to the Mac OS X version for Mac, and 0 otherwise. + var osxmatch = /^Mac OS X (\d+.\d+)$/.exec(hh.oscpu); + sandbox.OSX = osxmatch ? parseFloat(osxmatch[1]) : 0; + // see if we have the test plugin available, // and set a sandox prop accordingly sandbox.haveTestPlugin = false; var navigator = gContainingWindow.navigator; for (var i = 0; i < navigator.mimeTypes.length; i++) { if (navigator.mimeTypes[i].type == "application/x-test" && navigator.mimeTypes[i].enabledPlugin != null &&