/* Any copyright is dedicated to the Public Domain.
  http://creativecommons.org/publicdomain/zero/1.0/ */
/* eslint-disable max-len */

"use strict";

/*
 * THIS FILE IS AUTOGENERATED. DO NOT MODIFY BY HAND. RUN TESTS IN FIXTURES/ TO UPDATE.
 */

const { NetworkEventMessage } =
  require("devtools/client/webconsole/new-console-output/types");

let stubPreparedMessages = new Map();
let stubPackets = new Map();
stubPreparedMessages.set("GET request", new NetworkEventMessage({
  "id": "1",
  "actor": "server1.conn0.child1/netEvent30",
  "level": "log",
  "isXHR": false,
  "request": {
    "url": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/inexistent.html",
    "method": "GET"
  },
  "response": {},
  "source": "network",
  "type": "log",
  "groupId": null,
  "timeStamp": 1487022056850,
  "indent": 0
}));

stubPreparedMessages.set("GET request eventTimings", new NetworkEventMessage({
  "id": "1",
  "actor": "server1.conn0.child1/netEvent30",
  "level": "log",
  "isXHR": false,
  "request": {
    "url": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/inexistent.html",
    "method": "GET",
    "headersSize": 489
  },
  "response": {
    "httpVersion": "HTTP/1.1",
    "status": "404",
    "statusText": "Not Found",
    "headersSize": 160,
    "remoteAddress": "127.0.0.1",
    "remotePort": 8888
  },
  "source": "network",
  "type": "log",
  "groupId": null,
  "timeStamp": 1486927175277,
  "totalTime": 23,
  "indent": 0
}));

stubPreparedMessages.set("XHR GET request", new NetworkEventMessage({
  "id": "1",
  "actor": "server1.conn1.child1/netEvent30",
  "level": "log",
  "isXHR": true,
  "request": {
    "url": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/inexistent.html",
    "method": "GET"
  },
  "response": {},
  "source": "network",
  "type": "log",
  "groupId": null,
  "timeStamp": 1487022057746,
  "indent": 0
}));

stubPreparedMessages.set("XHR GET request eventTimings", new NetworkEventMessage({
  "id": "1",
  "actor": "server1.conn1.child1/netEvent30",
  "level": "log",
  "isXHR": true,
  "request": {
    "url": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/inexistent.html",
    "method": "GET",
    "headersSize": 489
  },
  "response": {
    "httpVersion": "HTTP/1.1",
    "status": "404",
    "statusText": "Not Found",
    "headersSize": 160,
    "remoteAddress": "127.0.0.1",
    "remotePort": 8888
  },
  "source": "network",
  "type": "log",
  "groupId": null,
  "timeStamp": 1486927179824,
  "totalTime": 51,
  "indent": 0
}));

stubPreparedMessages.set("XHR POST request", new NetworkEventMessage({
  "id": "1",
  "actor": "server1.conn2.child1/netEvent30",
  "level": "log",
  "isXHR": true,
  "request": {
    "url": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/inexistent.html",
    "method": "POST"
  },
  "response": {},
  "source": "network",
  "type": "log",
  "groupId": null,
  "timeStamp": 1487022058414,
  "indent": 0
}));

stubPreparedMessages.set("XHR POST request eventTimings", new NetworkEventMessage({
  "id": "1",
  "actor": "server1.conn2.child1/netEvent30",
  "level": "log",
  "isXHR": true,
  "request": {
    "url": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/inexistent.html",
    "method": "POST",
    "headersSize": 509
  },
  "response": {
    "httpVersion": "HTTP/1.1",
    "status": "404",
    "statusText": "Not Found",
    "headersSize": 160,
    "remoteAddress": "127.0.0.1",
    "remotePort": 8888
  },
  "source": "network",
  "type": "log",
  "groupId": null,
  "timeStamp": 1486927183220,
  "totalTime": 12,
  "indent": 0
}));

stubPackets.set("GET request", {
  "_type": "NetworkEvent",
  "timeStamp": 1487022056850,
  "node": null,
  "actor": "server1.conn0.child1/netEvent30",
  "discardRequestBody": true,
  "discardResponseBody": true,
  "startedDateTime": "2017-02-13T21:40:56.850Z",
  "request": {
    "url": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/inexistent.html",
    "method": "GET"
  },
  "isXHR": false,
  "cause": {
    "type": "img",
    "loadingDocumentUri": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-network-event.html",
    "stacktrace": [
      {
        "filename": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-network-event.html",
        "lineNumber": 3,
        "columnNumber": 1,
        "functionName": "triggerPacket",
        "asyncCause": null
      },
      {
        "filename": "resource://testing-common/content-task.js line 52 > eval",
        "lineNumber": 7,
        "columnNumber": 9,
        "functionName": null,
        "asyncCause": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "lineNumber": 53,
        "columnNumber": 20,
        "functionName": null,
        "asyncCause": null
      }
    ]
  },
  "response": {},
  "timings": {},
  "updates": [],
  "private": false,
  "from": "server1.conn0.child1/consoleActor2"
});

stubPackets.set("GET request eventTimings", {
  "packet": {
    "from": "server1.conn0.child1/netEvent30",
    "type": "networkEventUpdate",
    "updateType": "eventTimings",
    "totalTime": 23
  },
  "networkInfo": {
    "_type": "NetworkEvent",
    "timeStamp": 1486927175277,
    "node": null,
    "actor": "server1.conn0.child1/netEvent30",
    "discardRequestBody": true,
    "discardResponseBody": false,
    "startedDateTime": "2017-02-12T19:19:35.277Z",
    "request": {
      "url": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/inexistent.html",
      "method": "GET",
      "headersSize": 489
    },
    "isXHR": false,
    "cause": {
      "type": "img",
      "loadingDocumentUri": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-network-event.html",
      "stacktrace": [
        {
          "filename": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-network-event.html",
          "lineNumber": 3,
          "columnNumber": 1,
          "functionName": "triggerPacket",
          "asyncCause": null
        },
        {
          "filename": "resource://testing-common/content-task.js line 52 > eval",
          "lineNumber": 7,
          "columnNumber": 9,
          "functionName": null,
          "asyncCause": null
        },
        {
          "filename": "resource://testing-common/content-task.js",
          "lineNumber": 53,
          "columnNumber": 20,
          "functionName": null,
          "asyncCause": null
        }
      ]
    },
    "response": {
      "httpVersion": "HTTP/1.1",
      "status": "404",
      "statusText": "Not Found",
      "headersSize": 160,
      "remoteAddress": "127.0.0.1",
      "remotePort": 8888
    },
    "timings": {},
    "updates": [
      "requestHeaders",
      "requestCookies",
      "responseStart",
      "securityInfo",
      "responseHeaders",
      "responseCookies",
      "eventTimings"
    ],
    "private": false,
    "securityInfo": "insecure",
    "totalTime": 23
  }
});

stubPackets.set("XHR GET request", {
  "_type": "NetworkEvent",
  "timeStamp": 1487022057746,
  "node": null,
  "actor": "server1.conn1.child1/netEvent30",
  "discardRequestBody": true,
  "discardResponseBody": true,
  "startedDateTime": "2017-02-13T21:40:57.746Z",
  "request": {
    "url": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/inexistent.html",
    "method": "GET"
  },
  "isXHR": true,
  "cause": {
    "type": "xhr",
    "loadingDocumentUri": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-network-event.html",
    "stacktrace": [
      {
        "filename": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-network-event.html",
        "lineNumber": 4,
        "columnNumber": 1,
        "functionName": "triggerPacket",
        "asyncCause": null
      },
      {
        "filename": "resource://testing-common/content-task.js line 52 > eval",
        "lineNumber": 7,
        "columnNumber": 9,
        "functionName": null,
        "asyncCause": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "lineNumber": 53,
        "columnNumber": 20,
        "functionName": null,
        "asyncCause": null
      }
    ]
  },
  "response": {},
  "timings": {},
  "updates": [],
  "private": false,
  "from": "server1.conn1.child1/consoleActor2"
});

stubPackets.set("XHR GET request eventTimings", {
  "packet": {
    "from": "server1.conn1.child1/netEvent30",
    "type": "networkEventUpdate",
    "updateType": "eventTimings",
    "totalTime": 51
  },
  "networkInfo": {
    "_type": "NetworkEvent",
    "timeStamp": 1486927179824,
    "node": null,
    "actor": "server1.conn1.child1/netEvent30",
    "discardRequestBody": true,
    "discardResponseBody": false,
    "startedDateTime": "2017-02-12T19:19:39.824Z",
    "request": {
      "url": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/inexistent.html",
      "method": "GET",
      "headersSize": 489
    },
    "isXHR": true,
    "cause": {
      "type": "xhr",
      "loadingDocumentUri": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-network-event.html",
      "stacktrace": [
        {
          "filename": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-network-event.html",
          "lineNumber": 4,
          "columnNumber": 1,
          "functionName": "triggerPacket",
          "asyncCause": null
        },
        {
          "filename": "resource://testing-common/content-task.js line 52 > eval",
          "lineNumber": 7,
          "columnNumber": 9,
          "functionName": null,
          "asyncCause": null
        },
        {
          "filename": "resource://testing-common/content-task.js",
          "lineNumber": 53,
          "columnNumber": 20,
          "functionName": null,
          "asyncCause": null
        }
      ]
    },
    "response": {
      "httpVersion": "HTTP/1.1",
      "status": "404",
      "statusText": "Not Found",
      "headersSize": 160,
      "remoteAddress": "127.0.0.1",
      "remotePort": 8888
    },
    "timings": {},
    "updates": [
      "requestHeaders",
      "requestCookies",
      "responseStart",
      "securityInfo",
      "responseHeaders",
      "responseCookies",
      "eventTimings"
    ],
    "private": false,
    "securityInfo": "insecure",
    "totalTime": 51
  }
});

stubPackets.set("XHR POST request", {
  "_type": "NetworkEvent",
  "timeStamp": 1487022058414,
  "node": null,
  "actor": "server1.conn2.child1/netEvent30",
  "discardRequestBody": true,
  "discardResponseBody": true,
  "startedDateTime": "2017-02-13T21:40:58.414Z",
  "request": {
    "url": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/inexistent.html",
    "method": "POST"
  },
  "isXHR": true,
  "cause": {
    "type": "xhr",
    "loadingDocumentUri": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-network-event.html",
    "stacktrace": [
      {
        "filename": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-network-event.html",
        "lineNumber": 4,
        "columnNumber": 1,
        "functionName": "triggerPacket",
        "asyncCause": null
      },
      {
        "filename": "resource://testing-common/content-task.js line 52 > eval",
        "lineNumber": 7,
        "columnNumber": 9,
        "functionName": null,
        "asyncCause": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "lineNumber": 53,
        "columnNumber": 20,
        "functionName": null,
        "asyncCause": null
      }
    ]
  },
  "response": {},
  "timings": {},
  "updates": [],
  "private": false,
  "from": "server1.conn2.child1/consoleActor2"
});

stubPackets.set("XHR POST request eventTimings", {
  "packet": {
    "from": "server1.conn2.child1/netEvent30",
    "type": "networkEventUpdate",
    "updateType": "eventTimings",
    "totalTime": 12
  },
  "networkInfo": {
    "_type": "NetworkEvent",
    "timeStamp": 1486927183220,
    "node": null,
    "actor": "server1.conn2.child1/netEvent30",
    "discardRequestBody": true,
    "discardResponseBody": false,
    "startedDateTime": "2017-02-12T19:19:43.220Z",
    "request": {
      "url": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/inexistent.html",
      "method": "POST",
      "headersSize": 509
    },
    "isXHR": true,
    "cause": {
      "type": "xhr",
      "loadingDocumentUri": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-network-event.html",
      "stacktrace": [
        {
          "filename": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-network-event.html",
          "lineNumber": 4,
          "columnNumber": 1,
          "functionName": "triggerPacket",
          "asyncCause": null
        },
        {
          "filename": "resource://testing-common/content-task.js line 52 > eval",
          "lineNumber": 7,
          "columnNumber": 9,
          "functionName": null,
          "asyncCause": null
        },
        {
          "filename": "resource://testing-common/content-task.js",
          "lineNumber": 53,
          "columnNumber": 20,
          "functionName": null,
          "asyncCause": null
        }
      ]
    },
    "response": {
      "httpVersion": "HTTP/1.1",
      "status": "404",
      "statusText": "Not Found",
      "headersSize": 160,
      "remoteAddress": "127.0.0.1",
      "remotePort": 8888
    },
    "timings": {},
    "updates": [
      "requestHeaders",
      "requestCookies",
      "responseStart",
      "securityInfo",
      "responseHeaders",
      "responseCookies",
      "eventTimings"
    ],
    "private": false,
    "securityInfo": "insecure",
    "totalTime": 12
  }
});

module.exports = {
  stubPreparedMessages,
  stubPackets,
};
