summaryrefslogtreecommitdiffstats
path: root/services/sync/tests/unit/test_utils_catch.js
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-10-06 06:57:51 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-10-06 06:57:51 +0200
commit0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25 (patch)
treec321601f04cbfd02fb6e12878e745dc49a612c86 /services/sync/tests/unit/test_utils_catch.js
parent8860eddcee1417483cafd114f3a9ec127e0f1f74 (diff)
downloadUXP-0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25.tar
UXP-0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25.tar.gz
UXP-0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25.tar.lz
UXP-0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25.tar.xz
UXP-0c47c83e1b3b7d95681a43fbb0de0e17b2cd5b25.zip
Import Tycho weave client
Diffstat (limited to 'services/sync/tests/unit/test_utils_catch.js')
-rw-r--r--services/sync/tests/unit/test_utils_catch.js54
1 files changed, 23 insertions, 31 deletions
diff --git a/services/sync/tests/unit/test_utils_catch.js b/services/sync/tests/unit/test_utils_catch.js
index 5f50bf7e4..a10e5eb0d 100644
--- a/services/sync/tests/unit/test_utils_catch.js
+++ b/services/sync/tests/unit/test_utils_catch.js
@@ -8,46 +8,38 @@ function run_test() {
catch: Utils.catch,
_log: {
debug: function(str) {
- didThrow = str.search(/^Exception/) == 0;
+ didThrow = str.search(/^Exception: /) == 0;
},
info: function(str) {
wasLocked = str.indexOf("Cannot start sync: already syncing?") == 0;
}
},
- func: function() {
- return this.catch(function() {
- rightThis = this == obj;
- didCall = true;
- return 5;
- })();
- },
+ func: function() this.catch(function() {
+ rightThis = this == obj;
+ didCall = true;
+ return 5;
+ })(),
- throwy: function() {
- return this.catch(function() {
- rightThis = this == obj;
- didCall = true;
- throw 10;
- })();
- },
+ throwy: function() this.catch(function() {
+ rightThis = this == obj;
+ didCall = true;
+ throw 10;
+ })(),
- callbacky: function() {
- return this.catch(function() {
- rightThis = this == obj;
- didCall = true;
- throw 10;
- }, function(ex) {
- wasTen = (ex == 10)
- })();
- },
+ callbacky: function() this.catch(function() {
+ rightThis = this == obj;
+ didCall = true;
+ throw 10;
+ }, function(ex) {
+ wasTen = (ex == 10)
+ })(),
- lockedy: function() {
- return this.catch(function() {
- rightThis = this == obj;
- didCall = true;
- throw("Could not acquire lock.");
- })();
- }
+ lockedy: function() this.catch(function() {
+ rightThis = this == obj;
+ didCall = true;
+ throw("Could not acquire lock.");
+ })()
};
_("Make sure a normal call will call and return");