diff options
author | Moonchild <mcwerewolf@wolfbeast.com> | 2019-04-20 11:17:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-20 11:17:30 +0200 |
commit | e0116ac2b78eb4e621a4d0769e01f8358a6d661c (patch) | |
tree | fe2898874f0be34a8425281ecba2cb8cb59fb210 /toolkit/components/urlformatter | |
parent | 32577bdb3d2471c0e5ce4cfd0501a820157230cb (diff) | |
parent | 21b4cb27cabecdb5580c01891801c9259689ec87 (diff) | |
download | UXP-e0116ac2b78eb4e621a4d0769e01f8358a6d661c.tar UXP-e0116ac2b78eb4e621a4d0769e01f8358a6d661c.tar.gz UXP-e0116ac2b78eb4e621a4d0769e01f8358a6d661c.tar.lz UXP-e0116ac2b78eb4e621a4d0769e01f8358a6d661c.tar.xz UXP-e0116ac2b78eb4e621a4d0769e01f8358a6d661c.zip |
Merge pull request #1041 from Ascrod/default-pref
Clean up try/catch blocks for preferences
Diffstat (limited to 'toolkit/components/urlformatter')
-rw-r--r-- | toolkit/components/urlformatter/tests/unit/test_urlformatter.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/toolkit/components/urlformatter/tests/unit/test_urlformatter.js b/toolkit/components/urlformatter/tests/unit/test_urlformatter.js index 393b0dc33..6f218822a 100644 --- a/toolkit/components/urlformatter/tests/unit/test_urlformatter.js +++ b/toolkit/components/urlformatter/tests/unit/test_urlformatter.js @@ -27,11 +27,9 @@ function run_test() { QueryInterface(Ci.nsIXULRuntime); var abi = macutils && macutils.isUniversalBinary ? "Universal-gcc3" : appInfo.XPCOMABI; - let channel = "default"; let defaults = prefs.QueryInterface(Ci.nsIPrefService).getDefaultBranch(null); - try { - channel = defaults.getCharPref("app.update.channel"); - } catch (e) {} + let channel = defaults.getCharPref("app.update.channel", "default"); + // Set distribution values. defaults.setCharPref("distribution.id", "bacon"); defaults.setCharPref("distribution.version", "1.0"); |