summaryrefslogtreecommitdiffstats
path: root/netwerk/test
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-06-04 18:21:04 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-06-04 18:21:04 +0200
commitdee00a8a79394559e0e868cc72464c2de24583ac (patch)
tree18dc2e3db8127ceabcf9b03416b135bced2976ad /netwerk/test
parent851cfd198bc01020cd411d4f1cd6586222700269 (diff)
parent363bfeb2c06e5f57136ebdab8da1ebeba0591520 (diff)
downloadUXP-dee00a8a79394559e0e868cc72464c2de24583ac.tar
UXP-dee00a8a79394559e0e868cc72464c2de24583ac.tar.gz
UXP-dee00a8a79394559e0e868cc72464c2de24583ac.tar.lz
UXP-dee00a8a79394559e0e868cc72464c2de24583ac.tar.xz
UXP-dee00a8a79394559e0e868cc72464c2de24583ac.zip
Merge branch 'master' into Basilisk-release
Diffstat (limited to 'netwerk/test')
-rw-r--r--netwerk/test/unit/test_bug650995.js14
-rw-r--r--netwerk/test/unit/test_idn_blacklist.js7
-rw-r--r--netwerk/test/unit/test_idn_urls.js7
3 files changed, 4 insertions, 24 deletions
diff --git a/netwerk/test/unit/test_bug650995.js b/netwerk/test/unit/test_bug650995.js
index 3c1ea8d67..bf2e9fa7d 100644
--- a/netwerk/test/unit/test_bug650995.js
+++ b/netwerk/test/unit/test_bug650995.js
@@ -78,24 +78,14 @@ function InitializeCacheDevices(memDevice, diskDevice) {
this.start = function() {
prefService.setBoolPref("browser.cache.memory.enable", memDevice);
if (memDevice) {
- try {
- cap = prefService.getIntPref("browser.cache.memory.capacity");
- }
- catch(ex) {
- cap = 0;
- }
+ cap = prefService.getIntPref("browser.cache.memory.capacity", 0);
if (cap == 0) {
prefService.setIntPref("browser.cache.memory.capacity", 1024);
}
}
prefService.setBoolPref("browser.cache.disk.enable", diskDevice);
if (diskDevice) {
- try {
- cap = prefService.getIntPref("browser.cache.disk.capacity");
- }
- catch(ex) {
- cap = 0;
- }
+ cap = prefService.getIntPref("browser.cache.disk.capacity", 0);
if (cap == 0) {
prefService.setIntPref("browser.cache.disk.capacity", 1024);
}
diff --git a/netwerk/test/unit/test_idn_blacklist.js b/netwerk/test/unit/test_idn_blacklist.js
index 5ca0173bb..aea45d706 100644
--- a/netwerk/test/unit/test_idn_blacklist.js
+++ b/netwerk/test/unit/test_idn_blacklist.js
@@ -121,12 +121,7 @@ const testcases = [
function run_test() {
var pbi = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
var oldProfile = pbi.getCharPref("network.IDN.restriction_profile", "moderate");
- var oldWhiteListCom;
- try {
- oldWhitelistCom = pbi.getBoolPref("network.IDN.whitelist.com");
- } catch(e) {
- oldWhitelistCom = false;
- }
+ var oldWhitelistCom = pbi.getBoolPref("network.IDN.whitelist.com", false);
var idnService = Cc["@mozilla.org/network/idn-service;1"].getService(Ci.nsIIDNService);
pbi.setCharPref("network.IDN.restriction_profile", "moderate");
diff --git a/netwerk/test/unit/test_idn_urls.js b/netwerk/test/unit/test_idn_urls.js
index 06a53032b..358854093 100644
--- a/netwerk/test/unit/test_idn_urls.js
+++ b/netwerk/test/unit/test_idn_urls.js
@@ -295,12 +295,7 @@ const profiles = ["ASCII", "high", "moderate"];
function run_test() {
var pbi = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
var oldProfile = pbi.getCharPref("network.IDN.restriction_profile", "moderate");
- var oldWhiteListCom;
- try {
- oldWhitelistCom = pbi.getBoolPref("network.IDN.whitelist.com");
- } catch(e) {
- oldWhitelistCom = false;
- }
+ var oldWhitelistCom = pbi.getBoolPref("network.IDN.whitelist.com", false);
var idnService = Cc["@mozilla.org/network/idn-service;1"].getService(Ci.nsIIDNService);
for (var i = 0; i < profiles.length; ++i) {