Commit dac68152 authored by Alexandru Michis's avatar Alexandru Michis
Browse files

Backed out changeset 7c08aa027893 (bug 1576768) for causing multiple failures.

CLOSED TREE
parent a66831cb
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -12,10 +12,7 @@ const IMG_BYTES = atob(

// stolen from file_blocked_script.sjs
function setGlobalState(data, key) {
  x = {
    data,
    QueryInterface: ChromeUtils.generateQI([]),
  };
  x = { data: data, QueryInterface: function(iid) { return this } };
  x.wrappedJSObject = x;
  setObjectState(key, x);
}
+3 −7
Original line number Diff line number Diff line
@@ -3,11 +3,7 @@

function handleRequest(request, response) {
  // let's enjoy the amazing CSP setting
  response.setHeader(
    "Content-Security-Policy",
    "frame-ancestors 'self'",
    false
  );
  response.setHeader("Content-Security-Policy", "frame-ancestors 'self'", false);

  // let's avoid caching issues
  response.setHeader("Pragma", "no-cache");
+4 −7
Original line number Diff line number Diff line
const CC = Components.Constructor;
const BinaryInputStream = CC(
  "@mozilla.org/binaryinputstream;1",
const BinaryInputStream = CC("@mozilla.org/binaryinputstream;1",
                             "nsIBinaryInputStream",
  "setInputStream"
);
                             "setInputStream");

function handleRequest(request, response) {
  response.setHeader("Content-Type", "text/plain", false);
@@ -15,9 +13,8 @@ function handleRequest(request, response) {
    var avail;
    var bytes = [];

    while ((avail = body.available()) > 0) {
    while ((avail = body.available()) > 0)
      Array.prototype.push.apply(bytes, body.readByteArray(avail));
    }

    var data = String.fromCharCode.apply(null, bytes);
    response.bodyOutputStream.write(data, data.length);
+3 −4
Original line number Diff line number Diff line
@@ -13,8 +13,7 @@ function handleRequest(request, response) {
  response.setStatusLine(request.httpVersion, 200);

  response.setHeader("Content-Type", "text/html", false);
  let txt =
    "<html><head><title>XFO page</title></head>" +
  let txt = "<html><head><title>XFO page</title></head>" +
    "<body><h1>" +
    "XFO blocked page opened in new window!" +
    "</h1></body></html>";
+1 −4
Original line number Diff line number Diff line
@@ -17,9 +17,6 @@ function handleRequest(request, response) {

  response.setStatusLine(request.httpVersion, 302, "Moved Temporarily");
  response.setHeader("Set-Cookie", `faviconCookie=${++state}`);
  response.setHeader(
    "Location",
    "http://example.com/browser/browser/base/content/test/favicons/moz.png"
  );
  response.setHeader("Location", "http://example.com/browser/browser/base/content/test/favicons/moz.png");
  setState("cache_cookie", `${state}`);
}
Loading