diff options
author | Gareth Aye <gaye@mozilla.com> | 2014-04-09 15:38:41 -0400 |
---|---|---|
committer | Gareth Aye <gaye@mozilla.com> | 2014-04-09 15:38:41 -0400 |
commit | a1cfcdfcc5acfe9c233267073fe67d24cdee000c (patch) | |
tree | 77d5299e63ae923a20457eae50ac1353990d5752 /test/caldav/sax_test.js | |
parent | c197deab25d8425bdfa8d8d2feccedbb2776a48e (diff) | |
parent | b15fe723595219e0e31ec84af246446668d297c8 (diff) | |
download | jsCalDAV-a1cfcdfcc5acfe9c233267073fe67d24cdee000c.tar.gz |
Merge pull request #21 from gaye/bug-974554
Bug 974554 - CalDAV parser should accept ical inside xml comments nested in <calendar-data> elements r=millermedeiros
Diffstat (limited to 'test/caldav/sax_test.js')
-rw-r--r-- | test/caldav/sax_test.js | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/test/caldav/sax_test.js b/test/caldav/sax_test.js index 8896abf..a175cdd 100644 --- a/test/caldav/sax_test.js +++ b/test/caldav/sax_test.js @@ -15,6 +15,7 @@ suite('caldav/sax', function() { // to make testing easier. function TestHander() { this.text = []; + this.cdata = []; this.opentag = []; this.closetag = []; this.error = []; @@ -22,9 +23,13 @@ suite('caldav/sax', function() { this.end = []; var events = [ - 'ontext', 'onclosetag', - 'onopentag', 'onerror', - 'oncomplete', 'onend' + 'ontext', + 'oncdata', + 'onclosetag', + 'onopentag', + 'onerror', + 'oncomplete', + 'onend' ]; } @@ -34,6 +39,10 @@ suite('caldav/sax', function() { handler.text.push(data); }, + oncdata: function(data, handler) { + handler.cdata.push(data); + }, + onclosetag: function(data, handler) { handler.closetag.push(data); }, @@ -237,6 +246,11 @@ suite('caldav/sax', function() { firesHandler('text', 'foo'); }); + test('#oncdata', function() { + subject.oncdata('foo'); + firesHandler('cdata', 'foo'); + }); + test('#onerror', function() { subject.onerror('foo'); firesHandler('error', 'foo'); |