mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1249474
. Part 2 - Update tests to handle new default image Accept header value. r=mcmanus
This commit is contained in:
parent
1e21b1cfed
commit
cc63fba4dd
@ -9,7 +9,7 @@ function handleRequest(request, response)
|
||||
file.append("test");
|
||||
file.append("mochitest");
|
||||
|
||||
if (request.getHeader("Accept") == "image/png,image/*;q=0.8,*/*;q=0.5") {
|
||||
if (request.getHeader("Accept") == "*/*") {
|
||||
file.append('blue.png');
|
||||
} else {
|
||||
file.append('red.png');
|
||||
|
@ -1,10 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=398066
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=398066.
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1249474.
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Accept: header should include image/* catchall</title>
|
||||
<title>Accept: header should include */* catchall</title>
|
||||
</head>
|
||||
<body>
|
||||
<img src="check-header.sjs">
|
||||
|
@ -2,8 +2,8 @@ const BinaryOutputStream = Components.Constructor("@mozilla.org/binaryoutputstre
|
||||
|
||||
function isCatchall(v)
|
||||
{
|
||||
// "image/*" item exactly or with a quality factor
|
||||
return /^image\/\*(?:|;q=(?:1(?:\.0{0,3})?|0(?:\.\d{0,3})?))$/.test(v);
|
||||
// "*/*" exactly
|
||||
return /^\*\/\*$/.test(v);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user