Bug 862757 - Fix a mailnews test to keep up with the UTF-16 handling update. r+a=standard8
authorMasatoshi Kimura <VYV03354@nifty.ne.jp>
Thu, 18 Apr 2013 03:47:45 +0900
changeset 15007 4c95dfc465de66c2fe200faa4c7a259b61a198fe
parent 15006 1fd7316f0e2833dd5b07fd350e106905c5d9f0d9
child 15008 165a30811b0505cd4efd71506f595b817c7c051c
push id889
push userbugzilla@standard8.plus.com
push dateWed, 01 May 2013 09:47:45 +0000
treeherdercomm-beta@165a30811b05 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs862757
Bug 862757 - Fix a mailnews test to keep up with the UTF-16 handling update. r+a=standard8
mailnews/compose/test/unit/data/test-UTF-16.txt
mailnews/compose/test/unit/data/test-UTF-16BE.txt
mailnews/compose/test/unit/data/test-UTF-16LE.txt
mailnews/compose/test/unit/test_detectAttachmentCharset.js
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..dd5fd39ed2d4216b3f7c553a95e0536a4a946f22
GIT binary patch
literal 60
zc%1w9pCN=HgCUclm_Y$bCIWFNP}Ge<m%)(149F{CNM)!1k_rrIKs7l)o*n})0~Y{(
C)(W5i
rename from mailnews/compose/test/unit/data/test-UTF-16.txt
rename to mailnews/compose/test/unit/data/test-UTF-16LE.txt
--- a/mailnews/compose/test/unit/test_detectAttachmentCharset.js
+++ b/mailnews/compose/test/unit/test_detectAttachmentCharset.js
@@ -24,29 +24,35 @@ function getContentCharset(aContent) {
   return found[1];
 }
 
 function testUTF8() {
   yield async_run({ func: createMessage, args: [do_get_file("data/test-UTF-8.txt")] });
   checkAttachmentCharset("UTF-8");
 }
 
-function testUTF16() {
-  yield async_run({ func: createMessage, args: [do_get_file("data/test-UTF-16.txt")] });
-  checkAttachmentCharset("UTF-16");
+function testUTF16BE() {
+  yield async_run({ func: createMessage, args: [do_get_file("data/test-UTF-16BE.txt")] });
+  checkAttachmentCharset("UTF-16BE");
+}
+
+function testUTF16LE() {
+  yield async_run({ func: createMessage, args: [do_get_file("data/test-UTF-16LE.txt")] });
+  checkAttachmentCharset("UTF-16LE");
 }
 
 function testShiftJIS() {
   yield async_run({ func: createMessage, args: [do_get_file("data/test-SHIFT_JIS.txt")] });
   checkAttachmentCharset("Shift_JIS");
 }
 
 var tests = [
   testUTF8,
-  testUTF16,
+  testUTF16BE,
+  testUTF16LE,
   testShiftJIS,
   do_test_finished
 ]
 
 function run_test() {
   // Ensure we have at least one mail account
   loadLocalMailAccount();
   Services.prefs.setIntPref("mail.strictly_mime.parm_folding", 0);