зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1167627 - Part 7: Use mozinfo in netwerk/.
This commit is contained in:
Родитель
3363f1775d
Коммит
aaf4ad90ac
|
@ -20,7 +20,7 @@ var srv, srv2;
|
|||
|
||||
function run_test()
|
||||
{
|
||||
if ("@mozilla.org/windows-registry-key;1" in Components.classes)
|
||||
if (mozinfo.os == "win")
|
||||
{
|
||||
dumpn("*** not running test_start_stop.js on Windows for now, because " +
|
||||
"Windows is dumb");
|
||||
|
|
|
@ -12,7 +12,7 @@ function testAddrInUse()
|
|||
{
|
||||
// Windows lets us have as many sockets listening on the same address as
|
||||
// we like, evidently.
|
||||
if ("@mozilla.org/windows-registry-key;1" in Cc) {
|
||||
if (mozinfo.os == "win") {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,14 +1,11 @@
|
|||
const isWindows = ("@mozilla.org/windows-registry-key;1" in Cc);
|
||||
const isLinux = ("@mozilla.org/gnome-gconf-service;1" in Cc);
|
||||
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
function getLinkFile()
|
||||
{
|
||||
if (isWindows) {
|
||||
if (mozinfo.os == "win") {
|
||||
return do_get_file("test_link.url");
|
||||
}
|
||||
if (isLinux) {
|
||||
if (mozinfo.os == "linux") {
|
||||
return do_get_file("test_link.desktop");
|
||||
}
|
||||
do_throw("Unexpected platform");
|
||||
|
@ -113,7 +110,7 @@ function test_cancel()
|
|||
|
||||
function run_test()
|
||||
{
|
||||
if (!isWindows && !isLinux) {
|
||||
if (mozinfo.os != "win" && mozinfo.os != "linux") {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -229,8 +229,7 @@ function test_upload_file() {
|
|||
|
||||
function test_load_replace() {
|
||||
// lnk files should resolve to their targets
|
||||
const isWindows = ("@mozilla.org/windows-registry-key;1" in Cc);
|
||||
if (isWindows) {
|
||||
if (mozinfo.os == "win") {
|
||||
dump("*** test_load_replace\n");
|
||||
file = do_get_file("data/system_root.lnk", false);
|
||||
var chan = new_file_channel(file);
|
||||
|
|
|
@ -183,7 +183,7 @@ function run_test() {
|
|||
// disable on Windows for now, because it seems to leak sockets and die.
|
||||
// Silly operating system!
|
||||
// This is a really nasty way to detect Windows. I wish we could do better.
|
||||
if ("@mozilla.org/windows-registry-key;1" in Cc) {
|
||||
if (mozinfo.os == "win") {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ const allPermissions = parseInt("777", 8);
|
|||
function run_test()
|
||||
{
|
||||
// If we're on Windows, simply check for graceful failure.
|
||||
if ("@mozilla.org/windows-registry-key;1" in Cc) {
|
||||
if (mozinfo.os == "win") {
|
||||
test_not_supported();
|
||||
return;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче