mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 00:05:36 +00:00
16 lines
512 B
JavaScript
16 lines
512 B
JavaScript
function test() {
|
|
let osString = Cc["@mozilla.org/xre/app-info;1"].
|
|
getService(Ci.nsIXULRuntime).OS;
|
|
|
|
// this test is Linux-specific
|
|
if (osString != "Linux")
|
|
return;
|
|
|
|
let shell = Cc["@mozilla.org/browser/shell-service;1"].
|
|
getService(Ci.nsIShellService);
|
|
|
|
shell.setDefaultBrowser(true, false);
|
|
ok(shell.isDefaultBrowser(true, false), "we got here and are the default browser");
|
|
ok(shell.isDefaultBrowser(true, true), "we got here and are the default browser");
|
|
}
|