michael@0: function test() { michael@0: let osString = Cc["@mozilla.org/xre/app-info;1"]. michael@0: getService(Ci.nsIXULRuntime).OS; michael@0: michael@0: // this test is Linux-specific michael@0: if (osString != "Linux") michael@0: return; michael@0: michael@0: let shell = Cc["@mozilla.org/browser/shell-service;1"]. michael@0: getService(Ci.nsIShellService); michael@0: michael@0: shell.setDefaultBrowser(true, false); michael@0: ok(shell.isDefaultBrowser(true, false), "we got here and are the default browser"); michael@0: ok(shell.isDefaultBrowser(true, true), "we got here and are the default browser"); michael@0: }