diff options
Diffstat (limited to '')
-rw-r--r-- | comm/mailnews/addrbook/test/unit/test_bug387403.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/comm/mailnews/addrbook/test/unit/test_bug387403.js b/comm/mailnews/addrbook/test/unit/test_bug387403.js new file mode 100644 index 0000000000..9f8621c705 --- /dev/null +++ b/comm/mailnews/addrbook/test/unit/test_bug387403.js @@ -0,0 +1,16 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/** + * Test for bug 387403 crash when opening e-mail with broken vcard. + */ + +function run_test() { + // Before bug 387403 this would hang, eating up all the memory until it + // crashed. + try { + Cc["@mozilla.org/addressbook/msgvcardservice;1"] + .getService(Ci.nsIMsgVCardService) + .escapedVCardToAbCard( + "begin:vcard\nfn;quoted-printable:Xxxx=C5=82xx Xxx\nn;quoted-printable:Xxx;Xxxx=C5=82xx \nadr;quoted-printable;quoted-printable;dom:;;xx. Xxxxxxxxxxxx X;Xxxxxx=C3=3" + ); + } catch (ex) {} +} |