Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / netwerk / test / unit / test_bug419157.js
bloba68bd7422a4fc2d5c95dc6cdb6c5735985e72835
1 /**
2 * Test for bug 419157: ensure that a MIME parameter with no charset information
3 * fallbacks to Latin-1
4 */
5 const Cc = Components.classes;
6 const Ci = Components.interfaces;
8 const header = "Content-Disposition: attachment;filename=IT839\x04\xB5(m8)2.pdf;";
9 const expected = "IT839\u0004\u00b5(m8)2.pdf";
11 function run_test()
13 var mhp = Cc["@mozilla.org/network/mime-hdrparam;1"].
14 getService(Ci.nsIMIMEHeaderParam);
16 var unused = { value : null };
17 var result = null;
19 try {
20 result = mhp.getParameter(header, "filename", "UTF-8", true, unused);
21 } catch (e) {}
23 do_check_eq(result, expected);