From e9dcf1dbb53f3a44aeb7f7120e37da45319c49e1 Mon Sep 17 00:00:00 2001 From: Edward Lee Date: Tue, 1 Jun 2010 11:30:11 -0700 Subject: [PATCH] Bug 557591 - Add tests for Utils.anno with invalid uris. --- services/sync/tests/unit/test_utils_anno.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/services/sync/tests/unit/test_utils_anno.js b/services/sync/tests/unit/test_utils_anno.js index 4a1e2f393af..3e33f4334d1 100644 --- a/services/sync/tests/unit/test_utils_anno.js +++ b/services/sync/tests/unit/test_utils_anno.js @@ -20,4 +20,14 @@ function run_test() { _("sanity check that the item anno is still there"); do_check_eq(Utils.anno(1, "anno"), "hi"); + + _("invalid uris don't get annos"); + let didThrow = false; + try { + Utils.anno("foo/bar/baz", "bad"); + } + catch(ex) { + didThrow = true; + } + do_check_true(didThrow); }