Bug 817531 followup. Enable the test on android. No review.
authorBoris Zbarsky <bzbarsky@mit.edu>
Fri, 07 Dec 2012 00:11:19 -0500
changeset 120854 732f04efe8f52ba2b2cf3c7ce6cee8f06f2ac83a
parent 120853 ba13ced37c0ea1c06f0a38cc7f537d8c17270e7b
child 120855 390569a008e588ccae3b8f5b66e29f6e16a2417c
push idunknown
push userunknown
push dateunknown
bugs817531
milestone20.0a1
Bug 817531 followup. Enable the test on android. No review.
layout/reftests/backgrounds/background-referrer.sjs
layout/reftests/backgrounds/reftest.list
--- 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