mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 16:22:00 +00:00
fix up unit test to accept '.jpeg' on linux
This commit is contained in:
parent
958f67e316
commit
d561f09369
@ -45,14 +45,16 @@ function run_test()
|
||||
|
||||
/* Test a few common image types to make sure that they get the right extension */
|
||||
var types = {
|
||||
"image/jpeg": "jpg",
|
||||
"image/gif": "gif",
|
||||
"image/png": "png"
|
||||
"image/jpeg": ["jpg", "jpeg"], /* accept either */
|
||||
"image/gif": ["gif"],
|
||||
"image/png": ["png"]
|
||||
};
|
||||
|
||||
/* Check whether the primary extension is what we'd expect */
|
||||
for (var mimetype in types) {
|
||||
var ext = types[mimetype];
|
||||
do_check_true (ms.getFromTypeAndExtension(mimetype, null).primaryExtension.toLowerCase() == ext);
|
||||
var exts = types[mimetype];
|
||||
var primary = ms.getFromTypeAndExtension(mimetype, null).primaryExtension.toLowerCase();
|
||||
|
||||
do_check_true (exts.indexOf(primary) != -1);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user