Conditionally adjust two reftest references to match the non-assembly version of the code. (Bug 465088) r=bholley

This commit is contained in:
L. David Baron 2009-01-29 12:39:17 -08:00
parent ddd360ca2d
commit d6d6914e7a
3 changed files with 91 additions and 11 deletions

View File

@ -1,4 +1,8 @@
<html><body>
<html>
<head>
<script src="lcms-asm-check.js" type="application/ecmascript"></script>
</head>
<body>
<table cellpadding='0' cellspacing='0' width='32' height='32'>
<tr height='1'>
<td width='1' style='background-color: rgba(255,255,255,1)'></td>
@ -219,7 +223,13 @@
<td width='1' style='background-color: rgba(126,255,168,1)'></td>
<td width='1' style='background-color: rgba(121,255,148,1)'></td>
<td width='1' style='background-color: rgba(127,255,120,1)'></td>
<td width='1' style='background-color: rgba(150,255,91,1)'></td>
<script type="application/ecmascript">
if (lcms_has_assembly) {
document.write("<td width='1' style='background-color: rgba(150,255,91,1)'></td>");
} else {
document.write("<td width='1' style='background-color: rgba(150,255,92,1)'></td>");
}
</script>
<td width='1' style='background-color: rgba(165,255,73,1)'></td>
<td width='1' style='background-color: rgba(176,255,53,1)'></td>
<td width='1' style='background-color: rgba(205,255,133,1)'></td>
@ -396,7 +406,13 @@
<td width='1' style='background-color: rgba(238,255,113,1)'></td>
<td width='1' style='background-color: rgba(247,255,96,1)'></td>
<td width='1' style='background-color: rgba(254,253,75,1)'></td>
<td width='1' style='background-color: rgba(255,245,49,1)'></td>
<script type="application/ecmascript">
if (lcms_has_assembly) {
document.write("<td width='1' style='background-color: rgba(255,245,49,1)'></td>");
} else {
document.write("<td width='1' style='background-color: rgba(255,245,50,1)'></td>");
}
</script>
<td width='1' style='background-color: rgba(255,245,187,1)'></td>
<td width='1' style='background-color: rgba(255,255,255,1)'></td>
<td width='1' style='background-color: rgba(255,255,255,1)'></td>
@ -431,7 +447,13 @@
<td width='1' style='background-color: rgba(254,254,112,1)'></td>
<td width='1' style='background-color: rgba(255,245,95,1)'></td>
<td width='1' style='background-color: rgba(255,235,75,1)'></td>
<td width='1' style='background-color: rgba(255,224,49,1)'></td>
<script type="application/ecmascript">
if (lcms_has_assembly) {
document.write("<td width='1' style='background-color: rgba(255,224,49,1)'></td>");
} else {
document.write("<td width='1' style='background-color: rgba(255,224,50,1)'></td>");
}
</script>
<td width='1' style='background-color: rgba(255,240,203,1)'></td>
<td width='1' style='background-color: rgba(255,255,255,1)'></td>
<td width='1' style='background-color: rgba(255,255,255,1)'></td>

View File

@ -1,4 +1,8 @@
<html><body>
<html>
<head>
<script src="lcms-asm-check.js" type="application/ecmascript"></script>
</head>
<body>
<table cellpadding='0' cellspacing='0' width='32' height='32'>
<tr height='1'>
<td width='1' style='background-color: rgba(255,255,255,1)'></td>
@ -186,7 +190,13 @@
<td width='1' style='background-color: rgba(99,255,130,1)'></td>
<td width='1' style='background-color: rgba(90,255,120,1)'></td>
<td width='1' style='background-color: rgba(127,255,95,1)'></td>
<td width='1' style='background-color: rgba(163,255,91,1)'></td>
<script type="application/ecmascript">
if (lcms_has_assembly) {
document.write("<td width='1' style='background-color: rgba(163,255,91,1)'></td>");
} else {
document.write("<td width='1' style='background-color: rgba(163,255,92,1)'></td>");
}
</script>
<td width='1' style='background-color: rgba(199,255,148,1)'></td>
<td width='1' style='background-color: rgba(253,255,253,1)'></td>
<td width='1' style='background-color: rgba(255,255,255,1)'></td>
@ -220,8 +230,15 @@
<td width='1' style='background-color: rgba(123,255,159,1)'></td>
<td width='1' style='background-color: rgba(134,255,127,1)'></td>
<td width='1' style='background-color: rgba(153,255,104,1)'></td>
<td width='1' style='background-color: rgba(163,255,91,1)'></td>
<td width='1' style='background-color: rgba(163,255,91,1)'></td>
<script type="application/ecmascript">
if (lcms_has_assembly) {
document.write("<td width='1' style='background-color: rgba(163,255,91,1)'></td>");
document.write("<td width='1' style='background-color: rgba(163,255,91,1)'></td>");
} else {
document.write("<td width='1' style='background-color: rgba(163,255,92,1)'></td>");
document.write("<td width='1' style='background-color: rgba(163,255,92,1)'></td>");
}
</script>
<td width='1' style='background-color: rgba(205,255,136,1)'></td>
<td width='1' style='background-color: rgba(253,255,246,1)'></td>
<td width='1' style='background-color: rgba(255,255,255,1)'></td>
@ -253,7 +270,13 @@
<td width='1' style='background-color: rgba(138,255,169,1)'></td>
<td width='1' style='background-color: rgba(123,255,159,1)'></td>
<td width='1' style='background-color: rgba(134,255,127,1)'></td>
<td width='1' style='background-color: rgba(163,255,91,1)'></td>
<script type="application/ecmascript">
if (lcms_has_assembly) {
document.write("<td width='1' style='background-color: rgba(163,255,91,1)'></td>");
} else {
document.write("<td width='1' style='background-color: rgba(163,255,92,1)'></td>");
}
</script>
<td width='1' style='background-color: rgba(186,255,96,1)'></td>
<td width='1' style='background-color: rgba(186,255,96,1)'></td>
<td width='1' style='background-color: rgba(195,255,79,1)'></td>
@ -852,8 +875,15 @@
</tr>
<tr height='1'>
<td width='1' style='background-color: rgba(205,241,255,1)'></td>
<td width='1' style='background-color: rgba(83,212,255,1)'></td>
<td width='1' style='background-color: rgba(83,212,255,1)'></td>
<script type="application/ecmascript">
if (lcms_has_assembly) {
document.write("<td width='1' style='background-color: rgba(83,212,255,1)'></td>");
document.write("<td width='1' style='background-color: rgba(83,212,255,1)'></td>");
} else {
document.write("<td width='1' style='background-color: rgba(83,211,255,1)'></td>");
document.write("<td width='1' style='background-color: rgba(83,211,255,1)'></td>");
}
</script>
<td width='1' style='background-color: rgba(98,205,255,1)'></td>
<td width='1' style='background-color: rgba(151,210,255,1)'></td>
<td width='1' style='background-color: rgba(159,194,255,1)'></td>

View File

@ -0,0 +1,28 @@
// This is a workaround for bug 465088, that the lcms assembly doesn't
// quite match the non-assembly output.
function check_lcms_has_assembly()
{
// We have assembly code on x86 and x86_64 architectures.
// Unfortunately, detecting that is a little complicated.
if (navigator.platform == "MacIntel") {
return true;
}
if (navigator.platform == "Win32" || navigator.platform == "OS/2") {
// Assume all Windows and OS/2 is x86 or x86_64. We don't
// expose any way for Web content to check.
return true;
}
// On most Unix-like platforms, navigator.platform is basically
// |uname -sm|.
if (navigator.platform.match(/(i[3456]86|x86_64|amd64)/)) {
return true;
}
return false;
}
var lcms_has_assembly = check_lcms_has_assembly();