Bug 817531 followup. Enable the test on android. No review.
--- a/layout/reftests/backgrounds/background-referrer.sjs
+++ b/layout/reftests/backgrounds/background-referrer.sjs
@@ -45,18 +45,24 @@ const IMAGE_DATA =
function handleRequest(request, response)
{
response.setHeader("Content-Type", "text/plain", false);
response.setHeader("Cache-Control", "no-cache", false);
var referrer = request.hasHeader("Referer") ?
request.getHeader("Referer") : "";
- // Test url looks like http://localhost:port/timestamp/number/background-referrer.html
- if (/^http:\/\/localhost:[0-9]+\/[0-9]+\/[0-9]+\/background-referrer.html$/.test(referrer))
+ // Test url looks like:
+ // http://localhost:port/timestamp/number/background-referrer.html
+ // Except in Android, where it looks like:
+ // http://A.B.C.D:port/timestamp/number/background-referrer.html
+ // where A.B.C.D is the IP address of the box the reftest HTTP server is
+ // running on. And maybe that will change. So just test for ending in
+ // "/background-referrer.html".
+ if (/\/background-referrer.html$/.test(referrer))
{
response.setHeader("Content-Type", "image/png", false);
var stream = new BinaryOutputStream(response.bodyOutputStream);
stream.writeByteArray(IMAGE_DATA, IMAGE_DATA.length);
}
else
{
--- a/layout/reftests/backgrounds/reftest.list
+++ b/layout/reftests/backgrounds/reftest.list
@@ -134,9 +134,9 @@ random-if(bug685516) == really-big-backg
random-if(bug685516) == body-background.html body-background-ref.html
random-if(bug685516) == table-background.html table-background-ref.html
random-if(bug685516) != div-background.html div-background-ref.html
random-if(bug685516) == background-repeat-1-ref.html background-repeat-1.html
random-if(bug685516) == multi-background-clip-content-border.html multi-background-clip-content-border-ref.html
-fails-if(Android) HTTP == background-referrer.html background-referrer-ref.html
+HTTP == background-referrer.html background-referrer-ref.html