summaryrefslogtreecommitdiffstats
path: root/services/sync/tests/unit/test_utils_catch.js
diff options
context:
space:
mode:
authorMoonchild <mcwerewolf@wolfbeast.com>2018-12-12 11:01:48 +0100
committerGitHub <noreply@github.com>2018-12-12 11:01:48 +0100
commitbc8a25f5e33700f700b1e07b238bef5dae22f1ad (patch)
treec1f1ec816f1a85459d05bd6a4cf4f6170b01c602 /services/sync/tests/unit/test_utils_catch.js
parentf2d4bd1e395f903355cc157a1de7207e5b22b7fb (diff)
parent9697bfa68f32984b196748e388d743dddbe6aa7b (diff)
downloadUXP-bc8a25f5e33700f700b1e07b238bef5dae22f1ad.tar
UXP-bc8a25f5e33700f700b1e07b238bef5dae22f1ad.tar.gz
UXP-bc8a25f5e33700f700b1e07b238bef5dae22f1ad.tar.lz
UXP-bc8a25f5e33700f700b1e07b238bef5dae22f1ad.tar.xz
UXP-bc8a25f5e33700f700b1e07b238bef5dae22f1ad.zip
Merge pull request #898 from MoonchildProductions/Sync-weave
Remove FxA Phase 1
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");