image/test/reftest/pngsuite-ancillary/qcms-asm-check.js

branch
TOR_BUG_9701
changeset 10
ac0c01689b40
equal deleted inserted replaced
-1:000000000000 0:da47ff6c94a7
1 // This is a workaround for bug 465088, that the qcms assembly doesn't
2 // quite match the non-assembly output.
3
4 function check_qcms_has_assembly()
5 {
6 // We have assembly code on x86 and x86_64 architectures.
7 // Unfortunately, detecting that is a little complicated.
8
9 if (navigator.platform == "MacIntel") {
10 return true;
11 }
12
13 if (navigator.platform.indexOf("Win") == 0 || navigator.platform == "OS/2") {
14 // Assume all Windows and OS/2 is x86 or x86_64. We don't
15 // expose any way for Web content to check.
16 return true;
17 }
18
19 // On most Unix-like platforms, navigator.platform is basically
20 // |uname -sm|.
21 if (navigator.platform.match(/(i[3456]86|x86_64|amd64|i86)/)) {
22 return true;
23 }
24
25 return false;
26 }
27
28 var qcms_has_assembly = check_qcms_has_assembly();

mercurial