Bug 958533 - Add b2g desktop to the reftest sandbox, r=jgriffin

This commit is contained in:
Andrew Halberstadt 2014-01-23 16:02:22 -05:00
parent faf802a81e
commit ae897cc54b

View File

@ -560,6 +560,7 @@ function getStreamContent(inputStream)
function BuildConditionSandbox(aURL) {
var sandbox = new Components.utils.Sandbox(aURL.spec);
var xr = CC[NS_XREAPPINFO_CONTRACTID].getService(CI.nsIXULRuntime);
var appInfo = CC[NS_XREAPPINFO_CONTRACTID].getService(CI.nsIXULAppInfo);
sandbox.isDebugBuild = gDebug.isDebugBuild;
sandbox.xulRuntime = {widgetToolkit: xr.widgetToolkit, OS: xr.OS, __exposedProps__: { widgetToolkit: "r", OS: "r", XPCOMABI: "r", shell: "r" } };
@ -600,6 +601,7 @@ function BuildConditionSandbox(aURL) {
// Shortcuts for widget toolkits.
sandbox.B2G = xr.widgetToolkit == "gonk";
sandbox.B2GDT = appInfo.name.toLowerCase() == "b2g" && !sandbox.B2G;
sandbox.Android = xr.OS == "Android" && !sandbox.B2G;
sandbox.cocoaWidget = xr.widgetToolkit == "cocoa";
sandbox.gtk2Widget = xr.widgetToolkit == "gtk2";