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
8417788579
commit
67e3fade30
@ -9,7 +9,7 @@ function handleRequest(request, response)
|
|||||||
file.append("test");
|
file.append("test");
|
||||||
file.append("mochitest");
|
file.append("mochitest");
|
||||||
|
|
||||||
if (request.getHeader("Accept") == "image/png,image/*;q=0.8,*/*;q=0.5") {
|
if (request.getHeader("Accept") == "*/*") {
|
||||||
file.append('blue.png');
|
file.append('blue.png');
|
||||||
} else {
|
} else {
|
||||||
file.append('red.png');
|
file.append('red.png');
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
<!DOCTYPE html>
|
<!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>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Accept: header should include image/* catchall</title>
|
<title>Accept: header should include */* catchall</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<img src="check-header.sjs">
|
<img src="check-header.sjs">
|
||||||
|
@ -2,8 +2,8 @@ const BinaryOutputStream = Components.Constructor("@mozilla.org/binaryoutputstre
|
|||||||
|
|
||||||
function isCatchall(v)
|
function isCatchall(v)
|
||||||
{
|
{
|
||||||
// "image/*" item exactly or with a quality factor
|
// "*/*" exactly
|
||||||
return /^image\/\*(?:|;q=(?:1(?:\.0{0,3})?|0(?:\.\d{0,3})?))$/.test(v);
|
return /^\*\/\*$/.test(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user