/* 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. SEE devtools/client/webconsole/test/README.md.
 */

const {
  parsePacketsWithFronts,
} = require("chrome://mochitests/content/browser/devtools/client/webconsole/test/browser/stub-generator-helpers.js");
const { prepareMessage } = require("resource://devtools/client/webconsole/utils/messages.js");
const {
  ConsoleMessage,
  NetworkEventMessage,
} = require("resource://devtools/client/webconsole/types.js");

const rawPackets = new Map();
rawPackets.set(`ReferenceError: asdf is not defined`, {
  "pageError": {
    "errorMessage": "ReferenceError: asdf is not defined",
    "errorMessageName": "JSMSG_NOT_DEFINED",
    "exceptionDocURL": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Errors/Not_defined?utm_source=mozilla&utm_medium=firefox-console-errors&utm_campaign=default",
    "sourceName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
    "sourceId": "server0.conn0.child1/source22",
    "lineText": "",
    "lineNumber": 3,
    "columnNumber": 5,
    "category": "content javascript",
    "innerWindowID": 8589934593,
    "timeStamp": 1572867483805,
    "warning": false,
    "error": true,
    "info": false,
    "private": false,
    "stacktrace": [
      {
        "filename": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
        "sourceId": "server0.conn0.child1/source22",
        "lineNumber": 3,
        "columnNumber": 5,
        "functionName": "bar"
      },
      {
        "filename": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
        "sourceId": "server0.conn0.child1/source22",
        "lineNumber": 6,
        "columnNumber": 5,
        "functionName": "foo"
      },
      {
        "filename": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
        "sourceId": "server0.conn0.child1/source22",
        "lineNumber": 9,
        "columnNumber": 3,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js line 112 > eval",
        "sourceId": null,
        "lineNumber": 6,
        "columnNumber": 29,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 113,
        "columnNumber": 33,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 66,
        "columnNumber": 19,
        "functionName": null,
        "asyncCause": "MessageListener.receiveMessage"
      }
    ],
    "notes": null,
    "chromeContext": false,
    "isPromiseRejection": false,
    "isForwardedFromContentProcess": false,
    "exception": {
      "_grip": {
        "type": "object",
        "actor": "server0.conn0.windowGlobal15032385537/obj20",
        "class": "ReferenceError",
        "ownPropertyLength": 4,
        "extensible": true,
        "frozen": false,
        "sealed": false,
        "isError": true,
        "preview": {
          "kind": "Error",
          "name": "ReferenceError",
          "message": "asdf is not defined",
          "stack": "bar@https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html:3:5\nfoo@https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html:6:5\n@https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html:9:3\n",
          "fileName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
          "lineNumber": 3,
          "columnNumber": 5
        }
      },
      "actorID": "server0.conn0.windowGlobal15032385537/obj20"
    },
    "hasException": true
  },
  "resourceType": "error-message",
  "isAlreadyExistingResource": false
});

rawPackets.set(`SyntaxError: redeclaration of let a`, {
  "pageError": {
    "errorMessage": "SyntaxError: redeclaration of let a",
    "errorMessageName": "JSMSG_REDECLARED_VAR",
    "exceptionDocURL": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Errors/Redeclared_parameter?utm_source=mozilla&utm_medium=firefox-console-errors&utm_campaign=default",
    "sourceName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
    "sourceId": null,
    "lineText": "  let a, a;",
    "lineNumber": 2,
    "columnNumber": 10,
    "category": "content javascript",
    "innerWindowID": 8589934593,
    "timeStamp": 1572867483805,
    "warning": false,
    "error": true,
    "info": false,
    "private": false,
    "stacktrace": [
      {
        "filename": "resource://testing-common/content-task.js line 112 > eval",
        "sourceId": null,
        "lineNumber": 6,
        "columnNumber": 29,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 113,
        "columnNumber": 33,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 66,
        "columnNumber": 19,
        "functionName": null,
        "asyncCause": "MessageListener.receiveMessage"
      }
    ],
    "notes": [
      {
        "messageBody": "Previously declared at line 2, column 7",
        "frame": {
          "source": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
          "sourceId": null,
          "line": 2,
          "column": 7
        }
      }
    ],
    "chromeContext": false,
    "isPromiseRejection": false,
    "isForwardedFromContentProcess": false,
    "exception": {
      "_grip": {
        "type": "object",
        "actor": "server0.conn0.windowGlobal15032385537/obj21",
        "class": "SyntaxError",
        "ownPropertyLength": 4,
        "extensible": true,
        "frozen": false,
        "sealed": false,
        "isError": true,
        "preview": {
          "kind": "Error",
          "name": "SyntaxError",
          "message": "redeclaration of let a",
          "stack": "",
          "fileName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
          "lineNumber": 2,
          "columnNumber": 10
        }
      },
      "actorID": "server0.conn0.windowGlobal15032385537/obj21"
    },
    "hasException": true
  },
  "resourceType": "error-message",
  "isAlreadyExistingResource": false
});

rawPackets.set(`TypeError longString message`, {
  "pageError": {
    "errorMessage": {
      "_grip": {
        "type": "longString",
        "actor": "server0.conn0.windowGlobal15032385537/longstractor23",
        "length": 110007,
        "initial": "Error: Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Lon"
      },
      "actorID": "server0.conn0.windowGlobal15032385537/longstractor23"
    },
    "errorMessageName": "",
    "sourceName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
    "sourceId": "server0.conn0.child1/source23",
    "lineText": "",
    "lineNumber": 1,
    "columnNumber": 7,
    "category": "content javascript",
    "innerWindowID": 8589934593,
    "timeStamp": 1572867483805,
    "warning": false,
    "error": true,
    "info": false,
    "private": false,
    "stacktrace": [
      {
        "filename": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
        "sourceId": "server0.conn0.child1/source23",
        "lineNumber": 1,
        "columnNumber": 7,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js line 112 > eval",
        "sourceId": null,
        "lineNumber": 6,
        "columnNumber": 29,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 113,
        "columnNumber": 33,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 66,
        "columnNumber": 19,
        "functionName": null,
        "asyncCause": "MessageListener.receiveMessage"
      }
    ],
    "notes": null,
    "chromeContext": false,
    "isPromiseRejection": false,
    "isForwardedFromContentProcess": false,
    "exception": {
      "_grip": {
        "type": "object",
        "actor": "server0.conn0.windowGlobal15032385537/obj24",
        "class": "Error",
        "ownPropertyLength": 4,
        "extensible": true,
        "frozen": false,
        "sealed": false,
        "isError": true,
        "preview": {
          "kind": "Error",
          "name": "Error",
          "message": {
            "_grip": {
              "type": "longString",
              "actor": "server0.conn0.windowGlobal15032385537/longstractor25",
              "length": 110000,
              "initial": "Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error Long error"
            },
            "actorID": "server0.conn0.windowGlobal15032385537/longstractor25"
          },
          "stack": "@https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html:1:7\n",
          "fileName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
          "lineNumber": 1,
          "columnNumber": 7
        }
      },
      "actorID": "server0.conn0.windowGlobal15032385537/obj24"
    },
    "hasException": true
  },
  "resourceType": "error-message",
  "isAlreadyExistingResource": false
});

rawPackets.set(`throw string with URL`, {
  "pageError": {
    "errorMessage": "uncaught exception: “https://evil.com/?aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa“ is evil and “https://not-so-evil.com/?aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa“ is not good either",
    "errorMessageName": "JSMSG_UNCAUGHT_EXCEPTION",
    "sourceName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
    "sourceId": "server0.conn0.child2/source31",
    "lineText": "",
    "lineNumber": 1,
    "columnNumber": 1,
    "category": "content javascript",
    "innerWindowID": 10737418241,
    "timeStamp": 1572867483805,
    "warning": false,
    "error": true,
    "info": false,
    "private": false,
    "stacktrace": [
      {
        "filename": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
        "sourceId": "server0.conn0.child2/source31",
        "lineNumber": 1,
        "columnNumber": 1,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js line 112 > eval",
        "sourceId": null,
        "lineNumber": 6,
        "columnNumber": 29,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 113,
        "columnNumber": 33,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 66,
        "columnNumber": 19,
        "functionName": null,
        "asyncCause": "MessageListener.receiveMessage"
      }
    ],
    "notes": null,
    "chromeContext": false,
    "isPromiseRejection": false,
    "isForwardedFromContentProcess": false,
    "exception": "“https://evil.com/?aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa“ is evil and “https://not-so-evil.com/?aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa“ is not good either",
    "hasException": true
  },
  "resourceType": "error-message",
  "isAlreadyExistingResource": false
});

rawPackets.set(`throw ""`, {
  "pageError": {
    "errorMessage": "uncaught exception: ",
    "errorMessageName": "JSMSG_UNCAUGHT_EXCEPTION",
    "sourceName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
    "sourceId": null,
    "lineText": "",
    "lineNumber": 1,
    "columnNumber": 1,
    "category": "content javascript",
    "innerWindowID": 8589934593,
    "timeStamp": 1572867483805,
    "warning": false,
    "error": true,
    "info": false,
    "private": false,
    "stacktrace": [
      {
        "filename": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
        "sourceId": "server0.conn0.child1/source25",
        "lineNumber": 1,
        "columnNumber": 1,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js line 112 > eval",
        "sourceId": null,
        "lineNumber": 6,
        "columnNumber": 29,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 113,
        "columnNumber": 33,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 66,
        "columnNumber": 19,
        "functionName": null,
        "asyncCause": "MessageListener.receiveMessage"
      }
    ],
    "notes": null,
    "chromeContext": false,
    "isPromiseRejection": false,
    "isForwardedFromContentProcess": false,
    "exception": "",
    "hasException": true
  },
  "resourceType": "error-message",
  "isAlreadyExistingResource": false
});

rawPackets.set(`throw "tomato"`, {
  "pageError": {
    "errorMessage": "uncaught exception: tomato",
    "errorMessageName": "JSMSG_UNCAUGHT_EXCEPTION",
    "sourceName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
    "sourceId": null,
    "lineText": "",
    "lineNumber": 1,
    "columnNumber": 1,
    "category": "content javascript",
    "innerWindowID": 8589934593,
    "timeStamp": 1572867483805,
    "warning": false,
    "error": true,
    "info": false,
    "private": false,
    "stacktrace": [
      {
        "filename": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
        "sourceId": "server0.conn0.child1/source25",
        "lineNumber": 1,
        "columnNumber": 1,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js line 112 > eval",
        "sourceId": null,
        "lineNumber": 6,
        "columnNumber": 29,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 113,
        "columnNumber": 33,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 66,
        "columnNumber": 19,
        "functionName": null,
        "asyncCause": "MessageListener.receiveMessage"
      }
    ],
    "notes": null,
    "chromeContext": false,
    "isPromiseRejection": false,
    "isForwardedFromContentProcess": false,
    "exception": "tomato",
    "hasException": true
  },
  "resourceType": "error-message",
  "isAlreadyExistingResource": false
});

rawPackets.set(`throw false`, {
  "pageError": {
    "errorMessage": "uncaught exception: false",
    "errorMessageName": "JSMSG_UNCAUGHT_EXCEPTION",
    "sourceName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
    "sourceId": "server0.conn4.child2/source31",
    "lineText": "",
    "lineNumber": 1,
    "columnNumber": 1,
    "category": "content javascript",
    "innerWindowID": 6442450946,
    "timeStamp": 1572867483805,
    "warning": false,
    "error": true,
    "info": false,
    "private": false,
    "stacktrace": [
      {
        "filename": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
        "sourceId": "server0.conn4.child2/source31",
        "lineNumber": 1,
        "columnNumber": 1,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js line 112 > eval",
        "sourceId": null,
        "lineNumber": 6,
        "columnNumber": 29,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 113,
        "columnNumber": 33,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 66,
        "columnNumber": 19,
        "functionName": null,
        "asyncCause": "MessageListener.receiveMessage"
      }
    ],
    "notes": null,
    "chromeContext": false,
    "isPromiseRejection": false,
    "isForwardedFromContentProcess": false,
    "exception": false,
    "hasException": true
  },
  "resourceType": "error-message",
  "isAlreadyExistingResource": false
});

rawPackets.set(`throw 0`, {
  "pageError": {
    "errorMessage": "uncaught exception: 0",
    "errorMessageName": "JSMSG_UNCAUGHT_EXCEPTION",
    "sourceName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
    "sourceId": "server0.conn4.child2/source31",
    "lineText": "",
    "lineNumber": 1,
    "columnNumber": 1,
    "category": "content javascript",
    "innerWindowID": 6442450946,
    "timeStamp": 1572867483805,
    "warning": false,
    "error": true,
    "info": false,
    "private": false,
    "stacktrace": [
      {
        "filename": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
        "sourceId": "server0.conn4.child2/source31",
        "lineNumber": 1,
        "columnNumber": 1,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js line 112 > eval",
        "sourceId": null,
        "lineNumber": 6,
        "columnNumber": 29,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 113,
        "columnNumber": 33,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 66,
        "columnNumber": 19,
        "functionName": null,
        "asyncCause": "MessageListener.receiveMessage"
      }
    ],
    "notes": null,
    "chromeContext": false,
    "isPromiseRejection": false,
    "isForwardedFromContentProcess": false,
    "exception": 0,
    "hasException": true
  },
  "resourceType": "error-message",
  "isAlreadyExistingResource": false
});

rawPackets.set(`throw null`, {
  "pageError": {
    "errorMessage": "uncaught exception: null",
    "errorMessageName": "JSMSG_UNCAUGHT_EXCEPTION",
    "sourceName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
    "sourceId": "server0.conn4.child2/source31",
    "lineText": "",
    "lineNumber": 1,
    "columnNumber": 1,
    "category": "content javascript",
    "innerWindowID": 6442450946,
    "timeStamp": 1572867483805,
    "warning": false,
    "error": true,
    "info": false,
    "private": false,
    "stacktrace": [
      {
        "filename": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
        "sourceId": "server0.conn4.child2/source31",
        "lineNumber": 1,
        "columnNumber": 1,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js line 112 > eval",
        "sourceId": null,
        "lineNumber": 6,
        "columnNumber": 29,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 113,
        "columnNumber": 33,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 66,
        "columnNumber": 19,
        "functionName": null,
        "asyncCause": "MessageListener.receiveMessage"
      }
    ],
    "notes": null,
    "chromeContext": false,
    "isPromiseRejection": false,
    "isForwardedFromContentProcess": false,
    "exception": {
      "type": "null"
    },
    "hasException": true
  },
  "resourceType": "error-message",
  "isAlreadyExistingResource": false
});

rawPackets.set(`throw undefined`, {
  "pageError": {
    "errorMessage": "uncaught exception: undefined",
    "errorMessageName": "JSMSG_UNCAUGHT_EXCEPTION",
    "sourceName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
    "sourceId": "server0.conn4.child2/source31",
    "lineText": "",
    "lineNumber": 1,
    "columnNumber": 1,
    "category": "content javascript",
    "innerWindowID": 6442450946,
    "timeStamp": 1572867483805,
    "warning": false,
    "error": true,
    "info": false,
    "private": false,
    "stacktrace": [
      {
        "filename": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
        "sourceId": "server0.conn4.child2/source31",
        "lineNumber": 1,
        "columnNumber": 1,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js line 112 > eval",
        "sourceId": null,
        "lineNumber": 6,
        "columnNumber": 29,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 113,
        "columnNumber": 33,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 66,
        "columnNumber": 19,
        "functionName": null,
        "asyncCause": "MessageListener.receiveMessage"
      }
    ],
    "notes": null,
    "chromeContext": false,
    "isPromiseRejection": false,
    "isForwardedFromContentProcess": false,
    "exception": {
      "type": "undefined"
    },
    "hasException": true
  },
  "resourceType": "error-message",
  "isAlreadyExistingResource": false
});

rawPackets.set(`throw Symbol`, {
  "pageError": {
    "errorMessage": "uncaught exception: Symbol(potato)",
    "errorMessageName": "JSMSG_UNCAUGHT_EXCEPTION",
    "sourceName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
    "sourceId": "server0.conn4.child2/source27",
    "lineText": "",
    "lineNumber": 1,
    "columnNumber": 7,
    "category": "content javascript",
    "innerWindowID": 6442450946,
    "timeStamp": 1572867483805,
    "warning": false,
    "error": true,
    "info": false,
    "private": false,
    "stacktrace": [
      {
        "filename": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
        "sourceId": "server0.conn4.child2/source27",
        "lineNumber": 1,
        "columnNumber": 7,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js line 112 > eval",
        "sourceId": null,
        "lineNumber": 6,
        "columnNumber": 29,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 113,
        "columnNumber": 33,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 66,
        "columnNumber": 19,
        "functionName": null,
        "asyncCause": "MessageListener.receiveMessage"
      }
    ],
    "notes": null,
    "chromeContext": false,
    "isPromiseRejection": false,
    "isForwardedFromContentProcess": false,
    "exception": {
      "type": "symbol",
      "actor": "server0.conn0.windowGlobal15032385537/symbol34",
      "name": "potato"
    },
    "hasException": true
  },
  "resourceType": "error-message",
  "isAlreadyExistingResource": false
});

rawPackets.set(`throw Object`, {
  "pageError": {
    "errorMessage": "uncaught exception: [object Object]",
    "errorMessageName": "JSMSG_UNCAUGHT_EXCEPTION",
    "sourceName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
    "sourceId": "server0.conn4.child2/source31",
    "lineText": "",
    "lineNumber": 1,
    "columnNumber": 1,
    "category": "content javascript",
    "innerWindowID": 6442450946,
    "timeStamp": 1572867483805,
    "warning": false,
    "error": true,
    "info": false,
    "private": false,
    "stacktrace": [
      {
        "filename": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
        "sourceId": "server0.conn4.child2/source31",
        "lineNumber": 1,
        "columnNumber": 1,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js line 112 > eval",
        "sourceId": null,
        "lineNumber": 6,
        "columnNumber": 29,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 113,
        "columnNumber": 33,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 66,
        "columnNumber": 19,
        "functionName": null,
        "asyncCause": "MessageListener.receiveMessage"
      }
    ],
    "notes": null,
    "chromeContext": false,
    "isPromiseRejection": false,
    "isForwardedFromContentProcess": false,
    "exception": {
      "_grip": {
        "type": "object",
        "actor": "server0.conn0.windowGlobal15032385537/obj36",
        "class": "Object",
        "ownPropertyLength": 1,
        "extensible": true,
        "frozen": false,
        "sealed": false,
        "isError": false,
        "preview": {
          "kind": "Object",
          "ownProperties": {
            "vegetable": {
              "configurable": true,
              "enumerable": true,
              "writable": true,
              "value": "cucumber"
            }
          },
          "ownPropertiesLength": 1
        }
      },
      "actorID": "server0.conn0.windowGlobal15032385537/obj36"
    },
    "hasException": true
  },
  "resourceType": "error-message",
  "isAlreadyExistingResource": false
});

rawPackets.set(`throw Error Object`, {
  "pageError": {
    "errorMessage": "Error: pumpkin",
    "errorMessageName": "",
    "sourceName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
    "sourceId": "server0.conn4.child2/source41",
    "lineText": "",
    "lineNumber": 1,
    "columnNumber": 7,
    "category": "content javascript",
    "innerWindowID": 6442450946,
    "timeStamp": 1572867483805,
    "warning": false,
    "error": true,
    "info": false,
    "private": false,
    "stacktrace": [
      {
        "filename": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
        "sourceId": "server0.conn4.child2/source27",
        "lineNumber": 1,
        "columnNumber": 7,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js line 112 > eval",
        "sourceId": null,
        "lineNumber": 6,
        "columnNumber": 29,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 113,
        "columnNumber": 33,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 66,
        "columnNumber": 19,
        "functionName": null,
        "asyncCause": "MessageListener.receiveMessage"
      }
    ],
    "notes": null,
    "chromeContext": false,
    "isPromiseRejection": false,
    "isForwardedFromContentProcess": false,
    "exception": {
      "_grip": {
        "type": "object",
        "actor": "server0.conn0.windowGlobal15032385537/obj38",
        "class": "Error",
        "ownPropertyLength": 4,
        "extensible": true,
        "frozen": false,
        "sealed": false,
        "isError": true,
        "preview": {
          "kind": "Error",
          "name": "Error",
          "message": "pumpkin",
          "stack": "@https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html:1:7\n",
          "fileName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
          "lineNumber": 1,
          "columnNumber": 7
        }
      },
      "actorID": "server0.conn0.windowGlobal15032385537/obj38"
    },
    "hasException": true
  },
  "resourceType": "error-message",
  "isAlreadyExistingResource": false
});

rawPackets.set(`throw Error Object with custom name`, {
  "pageError": {
    "errorMessage": "JuicyError: pineapple",
    "errorMessageName": "",
    "sourceName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
    "sourceId": "server0.conn4.child2/source43",
    "lineText": "",
    "lineNumber": 2,
    "columnNumber": 15,
    "category": "content javascript",
    "innerWindowID": 6442450946,
    "timeStamp": 1572867483805,
    "warning": false,
    "error": true,
    "info": false,
    "private": false,
    "stacktrace": [
      {
        "filename": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
        "sourceId": "server0.conn4.child2/source43",
        "lineNumber": 2,
        "columnNumber": 15,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js line 112 > eval",
        "sourceId": null,
        "lineNumber": 6,
        "columnNumber": 29,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 113,
        "columnNumber": 33,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 66,
        "columnNumber": 19,
        "functionName": null,
        "asyncCause": "MessageListener.receiveMessage"
      }
    ],
    "notes": null,
    "chromeContext": false,
    "isPromiseRejection": false,
    "isForwardedFromContentProcess": false,
    "exception": {
      "_grip": {
        "type": "object",
        "actor": "server0.conn0.windowGlobal15032385537/obj40",
        "class": "Error",
        "ownPropertyLength": 6,
        "extensible": true,
        "frozen": false,
        "sealed": false,
        "isError": true,
        "preview": {
          "kind": "Error",
          "name": "JuicyError",
          "message": "pineapple",
          "stack": "@https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html:2:15\n",
          "fileName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
          "lineNumber": 2,
          "columnNumber": 15
        }
      },
      "actorID": "server0.conn0.windowGlobal15032385537/obj40"
    },
    "hasException": true
  },
  "resourceType": "error-message",
  "isAlreadyExistingResource": false
});

rawPackets.set(`throw Error Object with error cause`, {
  "pageError": {
    "errorMessage": "Error: something went wrong",
    "errorMessageName": "",
    "sourceName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
    "sourceId": "server0.conn0.child4/source45",
    "lineText": "",
    "lineNumber": 3,
    "columnNumber": 15,
    "category": "content javascript",
    "innerWindowID": 2147483651,
    "timeStamp": 1572867483805,
    "warning": false,
    "error": true,
    "info": false,
    "private": false,
    "stacktrace": [
      {
        "filename": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
        "sourceId": "server0.conn0.child4/source45",
        "lineNumber": 3,
        "columnNumber": 15,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js line 112 > eval",
        "sourceId": null,
        "lineNumber": 6,
        "columnNumber": 29,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 113,
        "columnNumber": 33,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 66,
        "columnNumber": 19,
        "functionName": null,
        "asyncCause": "MessageListener.receiveMessage"
      }
    ],
    "notes": null,
    "chromeContext": false,
    "isPromiseRejection": false,
    "isForwardedFromContentProcess": false,
    "exception": {
      "_grip": {
        "type": "object",
        "actor": "server0.conn0.windowGlobal15032385537/obj42",
        "class": "Error",
        "ownPropertyLength": 5,
        "extensible": true,
        "frozen": false,
        "sealed": false,
        "isError": true,
        "preview": {
          "kind": "Error",
          "name": "Error",
          "message": "something went wrong",
          "stack": "@https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html:3:15\n",
          "fileName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
          "lineNumber": 3,
          "columnNumber": 15,
          "cause": {
            "type": "object",
            "actor": "server0.conn0.windowGlobal15032385537/obj43",
            "class": "SyntaxError",
            "ownPropertyLength": 4,
            "extensible": true,
            "frozen": false,
            "sealed": false,
            "isError": true,
            "preview": {
              "kind": "Error",
              "name": "SyntaxError",
              "message": "original error",
              "stack": "@https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html:2:25\n",
              "fileName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
              "lineNumber": 2,
              "columnNumber": 25
            }
          }
        }
      },
      "actorID": "server0.conn0.windowGlobal15032385537/obj42"
    },
    "hasException": true
  },
  "resourceType": "error-message",
  "isAlreadyExistingResource": false
});

rawPackets.set(`throw Error Object with cause chain`, {
  "pageError": {
    "errorMessage": "Error: err-d",
    "errorMessageName": "",
    "sourceName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
    "sourceId": "server0.conn0.child4/source48",
    "lineText": "",
    "lineNumber": 5,
    "columnNumber": 13,
    "category": "content javascript",
    "innerWindowID": 2147483651,
    "timeStamp": 1572867483805,
    "warning": false,
    "error": true,
    "info": false,
    "private": false,
    "stacktrace": [
      {
        "filename": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
        "sourceId": "server0.conn0.child4/source48",
        "lineNumber": 5,
        "columnNumber": 13,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js line 112 > eval",
        "sourceId": null,
        "lineNumber": 6,
        "columnNumber": 29,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 113,
        "columnNumber": 33,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 66,
        "columnNumber": 19,
        "functionName": null,
        "asyncCause": "MessageListener.receiveMessage"
      }
    ],
    "notes": null,
    "chromeContext": false,
    "isPromiseRejection": false,
    "isForwardedFromContentProcess": false,
    "exception": {
      "_grip": {
        "type": "object",
        "actor": "server0.conn0.windowGlobal15032385537/obj45",
        "class": "Error",
        "ownPropertyLength": 5,
        "extensible": true,
        "frozen": false,
        "sealed": false,
        "isError": true,
        "preview": {
          "kind": "Error",
          "name": "Error",
          "message": "err-d",
          "stack": "@https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html:5:13\n",
          "fileName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
          "lineNumber": 5,
          "columnNumber": 13,
          "cause": {
            "type": "object",
            "actor": "server0.conn0.windowGlobal15032385537/obj46",
            "class": "Error",
            "ownPropertyLength": 5,
            "extensible": true,
            "frozen": false,
            "sealed": false,
            "isError": true,
            "preview": {
              "kind": "Error",
              "name": "Error",
              "message": "err-c",
              "stack": "@https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html:4:13\n",
              "fileName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
              "lineNumber": 4,
              "columnNumber": 13,
              "cause": {
                "type": "object",
                "actor": "server0.conn0.windowGlobal15032385537/obj47",
                "class": "Error",
                "ownPropertyLength": 5,
                "extensible": true,
                "frozen": false,
                "sealed": false,
                "isError": true,
                "preview": {
                  "kind": "Error",
                  "name": "Error",
                  "message": "err-b",
                  "stack": "@https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html:3:13\n",
                  "fileName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
                  "lineNumber": 3,
                  "columnNumber": 13,
                  "cause": {
                    "type": "object",
                    "actor": "server0.conn0.windowGlobal15032385537/obj48",
                    "class": "Error",
                    "ownPropertyLength": 4,
                    "extensible": true,
                    "frozen": false,
                    "sealed": false,
                    "isError": true,
                    "preview": {
                      "kind": "Error",
                      "name": "Error",
                      "message": "err-a",
                      "stack": "@https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html:2:13\n",
                      "fileName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
                      "lineNumber": 2,
                      "columnNumber": 13
                    }
                  }
                }
              }
            }
          }
        }
      },
      "actorID": "server0.conn0.windowGlobal15032385537/obj45"
    },
    "hasException": true
  },
  "resourceType": "error-message",
  "isAlreadyExistingResource": false
});

rawPackets.set(`throw Error Object with cyclical cause chain`, {
  "pageError": {
    "errorMessage": "Error: err-b",
    "errorMessageName": "",
    "sourceName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
    "sourceId": "server0.conn0.child4/source53",
    "lineText": "",
    "lineNumber": 3,
    "columnNumber": 13,
    "category": "content javascript",
    "innerWindowID": 2147483651,
    "timeStamp": 1572867483805,
    "warning": false,
    "error": true,
    "info": false,
    "private": false,
    "stacktrace": [
      {
        "filename": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
        "sourceId": "server0.conn0.child4/source48",
        "lineNumber": 3,
        "columnNumber": 13,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js line 112 > eval",
        "sourceId": null,
        "lineNumber": 6,
        "columnNumber": 29,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 113,
        "columnNumber": 33,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 66,
        "columnNumber": 19,
        "functionName": null,
        "asyncCause": "MessageListener.receiveMessage"
      }
    ],
    "notes": null,
    "chromeContext": false,
    "isPromiseRejection": false,
    "isForwardedFromContentProcess": false,
    "exception": {
      "_grip": {
        "type": "object",
        "actor": "server0.conn0.windowGlobal15032385537/obj50",
        "class": "Error",
        "ownPropertyLength": 5,
        "extensible": true,
        "frozen": false,
        "sealed": false,
        "isError": true,
        "preview": {
          "kind": "Error",
          "name": "Error",
          "message": "err-b",
          "stack": "@https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html:3:13\n",
          "fileName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
          "lineNumber": 3,
          "columnNumber": 13,
          "cause": {
            "type": "object",
            "actor": "server0.conn0.windowGlobal15032385537/obj51",
            "class": "Error",
            "ownPropertyLength": 5,
            "extensible": true,
            "frozen": false,
            "sealed": false,
            "isError": true,
            "preview": {
              "kind": "Error",
              "name": "Error",
              "message": "err-a",
              "stack": "@https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html:2:13\n",
              "fileName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
              "lineNumber": 2,
              "columnNumber": 13,
              "cause": {
                "type": "object",
                "actor": "server0.conn0.windowGlobal15032385537/obj52",
                "class": "Error",
                "ownPropertyLength": 5,
                "extensible": true,
                "frozen": false,
                "sealed": false,
                "isError": true,
                "preview": {
                  "kind": "Error",
                  "name": "Error",
                  "message": "err-b",
                  "stack": "@https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html:3:13\n",
                  "fileName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
                  "lineNumber": 3,
                  "columnNumber": 13,
                  "cause": {
                    "type": "object",
                    "actor": "server0.conn0.windowGlobal15032385537/obj53",
                    "class": "Error",
                    "ownPropertyLength": 4,
                    "extensible": true,
                    "frozen": false,
                    "sealed": false,
                    "isError": true,
                    "preview": {
                      "kind": "Error",
                      "name": "Error",
                      "message": "err-a",
                      "stack": "@https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html:2:13\n",
                      "fileName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
                      "lineNumber": 2,
                      "columnNumber": 13
                    }
                  }
                }
              }
            }
          }
        }
      },
      "actorID": "server0.conn0.windowGlobal15032385537/obj50"
    },
    "hasException": true
  },
  "resourceType": "error-message",
  "isAlreadyExistingResource": false
});

rawPackets.set(`throw Error Object with falsy cause`, {
  "pageError": {
    "errorMessage": "Error: null cause",
    "errorMessageName": "",
    "sourceName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
    "sourceId": "server0.conn0.child4/source58",
    "lineText": "",
    "lineNumber": 1,
    "columnNumber": 7,
    "category": "content javascript",
    "innerWindowID": 2147483651,
    "timeStamp": 1572867483805,
    "warning": false,
    "error": true,
    "info": false,
    "private": false,
    "stacktrace": [
      {
        "filename": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
        "sourceId": "server0.conn0.child4/source26",
        "lineNumber": 1,
        "columnNumber": 7,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js line 112 > eval",
        "sourceId": null,
        "lineNumber": 6,
        "columnNumber": 29,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 113,
        "columnNumber": 33,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 66,
        "columnNumber": 19,
        "functionName": null,
        "asyncCause": "MessageListener.receiveMessage"
      }
    ],
    "notes": null,
    "chromeContext": false,
    "isPromiseRejection": false,
    "isForwardedFromContentProcess": false,
    "exception": {
      "_grip": {
        "type": "object",
        "actor": "server0.conn0.windowGlobal15032385537/obj55",
        "class": "Error",
        "ownPropertyLength": 5,
        "extensible": true,
        "frozen": false,
        "sealed": false,
        "isError": true,
        "preview": {
          "kind": "Error",
          "name": "Error",
          "message": "null cause",
          "stack": "@https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html:1:7\n",
          "fileName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
          "lineNumber": 1,
          "columnNumber": 7,
          "cause": {
            "type": "null"
          }
        }
      },
      "actorID": "server0.conn0.windowGlobal15032385537/obj55"
    },
    "hasException": true
  },
  "resourceType": "error-message",
  "isAlreadyExistingResource": false
});

rawPackets.set(`throw Error Object with number cause`, {
  "pageError": {
    "errorMessage": "Error: number cause",
    "errorMessageName": "",
    "sourceName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
    "sourceId": "server0.conn0.child4/source60",
    "lineText": "",
    "lineNumber": 1,
    "columnNumber": 7,
    "category": "content javascript",
    "innerWindowID": 2147483651,
    "timeStamp": 1572867483805,
    "warning": false,
    "error": true,
    "info": false,
    "private": false,
    "stacktrace": [
      {
        "filename": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
        "sourceId": "server0.conn0.child4/source26",
        "lineNumber": 1,
        "columnNumber": 7,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js line 112 > eval",
        "sourceId": null,
        "lineNumber": 6,
        "columnNumber": 29,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 113,
        "columnNumber": 33,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 66,
        "columnNumber": 19,
        "functionName": null,
        "asyncCause": "MessageListener.receiveMessage"
      }
    ],
    "notes": null,
    "chromeContext": false,
    "isPromiseRejection": false,
    "isForwardedFromContentProcess": false,
    "exception": {
      "_grip": {
        "type": "object",
        "actor": "server0.conn0.windowGlobal15032385537/obj57",
        "class": "Error",
        "ownPropertyLength": 5,
        "extensible": true,
        "frozen": false,
        "sealed": false,
        "isError": true,
        "preview": {
          "kind": "Error",
          "name": "Error",
          "message": "number cause",
          "stack": "@https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html:1:7\n",
          "fileName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
          "lineNumber": 1,
          "columnNumber": 7,
          "cause": 0
        }
      },
      "actorID": "server0.conn0.windowGlobal15032385537/obj57"
    },
    "hasException": true
  },
  "resourceType": "error-message",
  "isAlreadyExistingResource": false
});

rawPackets.set(`throw Error Object with string cause`, {
  "pageError": {
    "errorMessage": "Error: string cause",
    "errorMessageName": "",
    "sourceName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
    "sourceId": "server0.conn0.child4/source62",
    "lineText": "",
    "lineNumber": 1,
    "columnNumber": 7,
    "category": "content javascript",
    "innerWindowID": 2147483651,
    "timeStamp": 1572867483805,
    "warning": false,
    "error": true,
    "info": false,
    "private": false,
    "stacktrace": [
      {
        "filename": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
        "sourceId": "server0.conn0.child4/source26",
        "lineNumber": 1,
        "columnNumber": 7,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js line 112 > eval",
        "sourceId": null,
        "lineNumber": 6,
        "columnNumber": 29,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 113,
        "columnNumber": 33,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 66,
        "columnNumber": 19,
        "functionName": null,
        "asyncCause": "MessageListener.receiveMessage"
      }
    ],
    "notes": null,
    "chromeContext": false,
    "isPromiseRejection": false,
    "isForwardedFromContentProcess": false,
    "exception": {
      "_grip": {
        "type": "object",
        "actor": "server0.conn0.windowGlobal15032385537/obj59",
        "class": "Error",
        "ownPropertyLength": 5,
        "extensible": true,
        "frozen": false,
        "sealed": false,
        "isError": true,
        "preview": {
          "kind": "Error",
          "name": "Error",
          "message": "string cause",
          "stack": "@https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html:1:7\n",
          "fileName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
          "lineNumber": 1,
          "columnNumber": 7,
          "cause": "cause message"
        }
      },
      "actorID": "server0.conn0.windowGlobal15032385537/obj59"
    },
    "hasException": true
  },
  "resourceType": "error-message",
  "isAlreadyExistingResource": false
});

rawPackets.set(`throw Error Object with object cause`, {
  "pageError": {
    "errorMessage": "Error: object cause",
    "errorMessageName": "",
    "sourceName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
    "sourceId": "server0.conn0.child4/source64",
    "lineText": "",
    "lineNumber": 1,
    "columnNumber": 7,
    "category": "content javascript",
    "innerWindowID": 2147483651,
    "timeStamp": 1572867483805,
    "warning": false,
    "error": true,
    "info": false,
    "private": false,
    "stacktrace": [
      {
        "filename": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
        "sourceId": "server0.conn0.child4/source26",
        "lineNumber": 1,
        "columnNumber": 7,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js line 112 > eval",
        "sourceId": null,
        "lineNumber": 6,
        "columnNumber": 29,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 113,
        "columnNumber": 33,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 66,
        "columnNumber": 19,
        "functionName": null,
        "asyncCause": "MessageListener.receiveMessage"
      }
    ],
    "notes": null,
    "chromeContext": false,
    "isPromiseRejection": false,
    "isForwardedFromContentProcess": false,
    "exception": {
      "_grip": {
        "type": "object",
        "actor": "server0.conn0.windowGlobal15032385537/obj61",
        "class": "Error",
        "ownPropertyLength": 5,
        "extensible": true,
        "frozen": false,
        "sealed": false,
        "isError": true,
        "preview": {
          "kind": "Error",
          "name": "Error",
          "message": "object cause",
          "stack": "@https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html:1:7\n",
          "fileName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
          "lineNumber": 1,
          "columnNumber": 7,
          "cause": {
            "type": "object",
            "actor": "server0.conn0.windowGlobal15032385537/obj62",
            "class": "Object",
            "ownPropertyLength": 2,
            "extensible": true,
            "frozen": false,
            "sealed": false,
            "isError": false
          }
        }
      },
      "actorID": "server0.conn0.windowGlobal15032385537/obj61"
    },
    "hasException": true
  },
  "resourceType": "error-message",
  "isAlreadyExistingResource": false
});

rawPackets.set(`Promise reject ""`, {
  "pageError": {
    "errorMessage": "uncaught exception: ",
    "errorMessageName": "JSMSG_UNCAUGHT_EXCEPTION",
    "sourceName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
    "sourceId": null,
    "lineText": "",
    "lineNumber": 1,
    "columnNumber": 9,
    "category": "content javascript",
    "innerWindowID": 6442450946,
    "timeStamp": 1572867483805,
    "warning": false,
    "error": true,
    "info": false,
    "private": false,
    "stacktrace": [
      {
        "filename": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
        "sourceId": null,
        "lineNumber": 1,
        "columnNumber": 9,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js line 112 > eval",
        "sourceId": null,
        "lineNumber": 6,
        "columnNumber": 29,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 113,
        "columnNumber": 33,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 66,
        "columnNumber": 19,
        "functionName": null,
        "asyncCause": "MessageListener.receiveMessage"
      }
    ],
    "notes": null,
    "chromeContext": false,
    "isPromiseRejection": true,
    "isForwardedFromContentProcess": false,
    "exception": "",
    "hasException": true
  },
  "resourceType": "error-message",
  "isAlreadyExistingResource": false
});

rawPackets.set(`Promise reject "tomato"`, {
  "pageError": {
    "errorMessage": "uncaught exception: tomato",
    "errorMessageName": "JSMSG_UNCAUGHT_EXCEPTION",
    "sourceName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
    "sourceId": null,
    "lineText": "",
    "lineNumber": 1,
    "columnNumber": 9,
    "category": "content javascript",
    "innerWindowID": 6442450946,
    "timeStamp": 1572867483805,
    "warning": false,
    "error": true,
    "info": false,
    "private": false,
    "stacktrace": [
      {
        "filename": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
        "sourceId": null,
        "lineNumber": 1,
        "columnNumber": 9,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js line 112 > eval",
        "sourceId": null,
        "lineNumber": 6,
        "columnNumber": 29,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 113,
        "columnNumber": 33,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 66,
        "columnNumber": 19,
        "functionName": null,
        "asyncCause": "MessageListener.receiveMessage"
      }
    ],
    "notes": null,
    "chromeContext": false,
    "isPromiseRejection": true,
    "isForwardedFromContentProcess": false,
    "exception": "tomato",
    "hasException": true
  },
  "resourceType": "error-message",
  "isAlreadyExistingResource": false
});

rawPackets.set(`Promise reject false`, {
  "pageError": {
    "errorMessage": "uncaught exception: false",
    "errorMessageName": "JSMSG_UNCAUGHT_EXCEPTION",
    "sourceName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
    "sourceId": null,
    "lineText": "",
    "lineNumber": 1,
    "columnNumber": 9,
    "category": "content javascript",
    "innerWindowID": 6442450946,
    "timeStamp": 1572867483805,
    "warning": false,
    "error": true,
    "info": false,
    "private": false,
    "stacktrace": [
      {
        "filename": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
        "sourceId": null,
        "lineNumber": 1,
        "columnNumber": 9,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js line 112 > eval",
        "sourceId": null,
        "lineNumber": 6,
        "columnNumber": 29,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 113,
        "columnNumber": 33,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 66,
        "columnNumber": 19,
        "functionName": null,
        "asyncCause": "MessageListener.receiveMessage"
      }
    ],
    "notes": null,
    "chromeContext": false,
    "isPromiseRejection": true,
    "isForwardedFromContentProcess": false,
    "exception": false,
    "hasException": true
  },
  "resourceType": "error-message",
  "isAlreadyExistingResource": false
});

rawPackets.set(`Promise reject 0`, {
  "pageError": {
    "errorMessage": "uncaught exception: 0",
    "errorMessageName": "JSMSG_UNCAUGHT_EXCEPTION",
    "sourceName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
    "sourceId": null,
    "lineText": "",
    "lineNumber": 1,
    "columnNumber": 9,
    "category": "content javascript",
    "innerWindowID": 6442450946,
    "timeStamp": 1572867483805,
    "warning": false,
    "error": true,
    "info": false,
    "private": false,
    "stacktrace": [
      {
        "filename": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
        "sourceId": null,
        "lineNumber": 1,
        "columnNumber": 9,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js line 112 > eval",
        "sourceId": null,
        "lineNumber": 6,
        "columnNumber": 29,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 113,
        "columnNumber": 33,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 66,
        "columnNumber": 19,
        "functionName": null,
        "asyncCause": "MessageListener.receiveMessage"
      }
    ],
    "notes": null,
    "chromeContext": false,
    "isPromiseRejection": true,
    "isForwardedFromContentProcess": false,
    "exception": 0,
    "hasException": true
  },
  "resourceType": "error-message",
  "isAlreadyExistingResource": false
});

rawPackets.set(`Promise reject null`, {
  "pageError": {
    "errorMessage": "uncaught exception: null",
    "errorMessageName": "JSMSG_UNCAUGHT_EXCEPTION",
    "sourceName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
    "sourceId": null,
    "lineText": "",
    "lineNumber": 1,
    "columnNumber": 9,
    "category": "content javascript",
    "innerWindowID": 6442450946,
    "timeStamp": 1572867483805,
    "warning": false,
    "error": true,
    "info": false,
    "private": false,
    "stacktrace": [
      {
        "filename": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
        "sourceId": null,
        "lineNumber": 1,
        "columnNumber": 9,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js line 112 > eval",
        "sourceId": null,
        "lineNumber": 6,
        "columnNumber": 29,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 113,
        "columnNumber": 33,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 66,
        "columnNumber": 19,
        "functionName": null,
        "asyncCause": "MessageListener.receiveMessage"
      }
    ],
    "notes": null,
    "chromeContext": false,
    "isPromiseRejection": true,
    "isForwardedFromContentProcess": false,
    "exception": {
      "type": "null"
    },
    "hasException": true
  },
  "resourceType": "error-message",
  "isAlreadyExistingResource": false
});

rawPackets.set(`Promise reject undefined`, {
  "pageError": {
    "errorMessage": "uncaught exception: undefined",
    "errorMessageName": "JSMSG_UNCAUGHT_EXCEPTION",
    "sourceName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
    "sourceId": null,
    "lineText": "",
    "lineNumber": 1,
    "columnNumber": 9,
    "category": "content javascript",
    "innerWindowID": 6442450946,
    "timeStamp": 1572867483805,
    "warning": false,
    "error": true,
    "info": false,
    "private": false,
    "stacktrace": [
      {
        "filename": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
        "sourceId": null,
        "lineNumber": 1,
        "columnNumber": 9,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js line 112 > eval",
        "sourceId": null,
        "lineNumber": 6,
        "columnNumber": 29,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 113,
        "columnNumber": 33,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 66,
        "columnNumber": 19,
        "functionName": null,
        "asyncCause": "MessageListener.receiveMessage"
      }
    ],
    "notes": null,
    "chromeContext": false,
    "isPromiseRejection": true,
    "isForwardedFromContentProcess": false,
    "exception": {
      "type": "undefined"
    },
    "hasException": true
  },
  "resourceType": "error-message",
  "isAlreadyExistingResource": false
});

rawPackets.set(`Promise reject Symbol`, {
  "pageError": {
    "errorMessage": "uncaught exception: Symbol(potato)",
    "errorMessageName": "JSMSG_UNCAUGHT_EXCEPTION",
    "sourceName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
    "sourceId": null,
    "lineText": "",
    "lineNumber": 1,
    "columnNumber": 9,
    "category": "content javascript",
    "innerWindowID": 6442450946,
    "timeStamp": 1572867483805,
    "warning": false,
    "error": true,
    "info": false,
    "private": false,
    "stacktrace": [
      {
        "filename": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
        "sourceId": null,
        "lineNumber": 1,
        "columnNumber": 9,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js line 112 > eval",
        "sourceId": null,
        "lineNumber": 6,
        "columnNumber": 29,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 113,
        "columnNumber": 33,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 66,
        "columnNumber": 19,
        "functionName": null,
        "asyncCause": "MessageListener.receiveMessage"
      }
    ],
    "notes": null,
    "chromeContext": false,
    "isPromiseRejection": true,
    "isForwardedFromContentProcess": false,
    "exception": {
      "type": "symbol",
      "actor": "server0.conn0.windowGlobal15032385537/symbol70",
      "name": "potato"
    },
    "hasException": true
  },
  "resourceType": "error-message",
  "isAlreadyExistingResource": false
});

rawPackets.set(`Promise reject Object`, {
  "pageError": {
    "errorMessage": "uncaught exception: Object",
    "errorMessageName": "JSMSG_UNCAUGHT_EXCEPTION",
    "sourceName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
    "sourceId": null,
    "lineText": "",
    "lineNumber": 1,
    "columnNumber": 9,
    "category": "content javascript",
    "innerWindowID": 6442450946,
    "timeStamp": 1572867483805,
    "warning": false,
    "error": true,
    "info": false,
    "private": false,
    "stacktrace": [
      {
        "filename": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
        "sourceId": null,
        "lineNumber": 1,
        "columnNumber": 9,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js line 112 > eval",
        "sourceId": null,
        "lineNumber": 6,
        "columnNumber": 29,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 113,
        "columnNumber": 33,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 66,
        "columnNumber": 19,
        "functionName": null,
        "asyncCause": "MessageListener.receiveMessage"
      }
    ],
    "notes": null,
    "chromeContext": false,
    "isPromiseRejection": true,
    "isForwardedFromContentProcess": false,
    "exception": {
      "_grip": {
        "type": "object",
        "actor": "server0.conn0.windowGlobal15032385537/obj72",
        "class": "Object",
        "ownPropertyLength": 1,
        "extensible": true,
        "frozen": false,
        "sealed": false,
        "isError": false,
        "preview": {
          "kind": "Object",
          "ownProperties": {
            "vegetable": {
              "configurable": true,
              "enumerable": true,
              "writable": true,
              "value": "cucumber"
            }
          },
          "ownPropertiesLength": 1
        }
      },
      "actorID": "server0.conn0.windowGlobal15032385537/obj72"
    },
    "hasException": true
  },
  "resourceType": "error-message",
  "isAlreadyExistingResource": false
});

rawPackets.set(`Promise reject Error Object`, {
  "pageError": {
    "errorMessage": "Error: pumpkin",
    "errorMessageName": "",
    "sourceName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
    "sourceId": "server0.conn4.child2/source55",
    "lineText": "",
    "lineNumber": 1,
    "columnNumber": 16,
    "category": "content javascript",
    "innerWindowID": 6442450946,
    "timeStamp": 1572867483805,
    "warning": false,
    "error": true,
    "info": false,
    "private": false,
    "stacktrace": [
      {
        "filename": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
        "sourceId": null,
        "lineNumber": 1,
        "columnNumber": 9,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js line 112 > eval",
        "sourceId": null,
        "lineNumber": 6,
        "columnNumber": 29,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 113,
        "columnNumber": 33,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 66,
        "columnNumber": 19,
        "functionName": null,
        "asyncCause": "MessageListener.receiveMessage"
      }
    ],
    "notes": null,
    "chromeContext": false,
    "isPromiseRejection": true,
    "isForwardedFromContentProcess": false,
    "exception": {
      "_grip": {
        "type": "object",
        "actor": "server0.conn0.windowGlobal15032385537/obj74",
        "class": "Error",
        "ownPropertyLength": 4,
        "extensible": true,
        "frozen": false,
        "sealed": false,
        "isError": true,
        "preview": {
          "kind": "Error",
          "name": "Error",
          "message": "pumpkin",
          "stack": "@https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html:1:16\n",
          "fileName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
          "lineNumber": 1,
          "columnNumber": 16
        }
      },
      "actorID": "server0.conn0.windowGlobal15032385537/obj74"
    },
    "hasException": true
  },
  "resourceType": "error-message",
  "isAlreadyExistingResource": false
});

rawPackets.set(`Promise reject Error Object with custom name`, {
  "pageError": {
    "errorMessage": "JuicyError: pineapple",
    "errorMessageName": "",
    "sourceName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
    "sourceId": "server0.conn4.child2/source57",
    "lineText": "",
    "lineNumber": 2,
    "columnNumber": 15,
    "category": "content javascript",
    "innerWindowID": 6442450946,
    "timeStamp": 1572867483805,
    "warning": false,
    "error": true,
    "info": false,
    "private": false,
    "stacktrace": [
      {
        "filename": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
        "sourceId": null,
        "lineNumber": 5,
        "columnNumber": 13,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js line 112 > eval",
        "sourceId": null,
        "lineNumber": 6,
        "columnNumber": 29,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 113,
        "columnNumber": 33,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 66,
        "columnNumber": 19,
        "functionName": null,
        "asyncCause": "MessageListener.receiveMessage"
      }
    ],
    "notes": null,
    "chromeContext": false,
    "isPromiseRejection": true,
    "isForwardedFromContentProcess": false,
    "exception": {
      "_grip": {
        "type": "object",
        "actor": "server0.conn0.windowGlobal15032385537/obj76",
        "class": "Error",
        "ownPropertyLength": 6,
        "extensible": true,
        "frozen": false,
        "sealed": false,
        "isError": true,
        "preview": {
          "kind": "Error",
          "name": "JuicyError",
          "message": "pineapple",
          "stack": "@https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html:2:15\n",
          "fileName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
          "lineNumber": 2,
          "columnNumber": 15
        }
      },
      "actorID": "server0.conn0.windowGlobal15032385537/obj76"
    },
    "hasException": true
  },
  "resourceType": "error-message",
  "isAlreadyExistingResource": false
});

rawPackets.set(`Promise reject Error Object with error cause`, {
  "pageError": {
    "errorMessage": "Error: something went wrong",
    "errorMessageName": "",
    "sourceName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
    "sourceId": "server0.conn0.child4/source81",
    "lineText": "",
    "lineNumber": 5,
    "columnNumber": 15,
    "category": "content javascript",
    "innerWindowID": 2147483651,
    "timeStamp": 1572867483805,
    "warning": false,
    "error": true,
    "info": false,
    "private": false,
    "stacktrace": [
      {
        "filename": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
        "sourceId": null,
        "lineNumber": 5,
        "columnNumber": 15,
        "functionName": null
      },
      {
        "filename": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
        "sourceId": null,
        "lineNumber": 1,
        "columnNumber": 19,
        "functionName": null,
        "asyncCause": "promise callback"
      },
      {
        "filename": "resource://testing-common/content-task.js line 112 > eval",
        "sourceId": null,
        "lineNumber": 6,
        "columnNumber": 29,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 113,
        "columnNumber": 33,
        "functionName": null
      },
      {
        "filename": "resource://testing-common/content-task.js",
        "sourceId": null,
        "lineNumber": 66,
        "columnNumber": 19,
        "functionName": null,
        "asyncCause": "MessageListener.receiveMessage"
      }
    ],
    "notes": null,
    "chromeContext": false,
    "isPromiseRejection": true,
    "isForwardedFromContentProcess": false,
    "exception": {
      "_grip": {
        "type": "object",
        "actor": "server0.conn0.windowGlobal15032385537/obj78",
        "class": "Error",
        "ownPropertyLength": 5,
        "extensible": true,
        "frozen": false,
        "sealed": false,
        "isError": true,
        "preview": {
          "kind": "Error",
          "name": "Error",
          "message": "something went wrong",
          "stack": "@https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html:5:15\npromise callback*@https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html:1:19\n",
          "fileName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
          "lineNumber": 5,
          "columnNumber": 15,
          "cause": {
            "type": "object",
            "actor": "server0.conn0.windowGlobal15032385537/obj79",
            "class": "ReferenceError",
            "ownPropertyLength": 4,
            "extensible": true,
            "frozen": false,
            "sealed": false,
            "isError": true,
            "preview": {
              "kind": "Error",
              "name": "ReferenceError",
              "message": "unknownFunc is not defined",
              "stack": "@https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html:3:9\npromise callback*@https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html:1:19\n",
              "fileName": "https://example.com/browser/devtools/client/webconsole/test/browser/test-console-api.html",
              "lineNumber": 3,
              "columnNumber": 9
            }
          }
        }
      },
      "actorID": "server0.conn0.windowGlobal15032385537/obj78"
    },
    "hasException": true
  },
  "resourceType": "error-message",
  "isAlreadyExistingResource": false
});


const stubPackets = parsePacketsWithFronts(rawPackets);

const stubPreparedMessages = new Map();
for (const [key, packet] of Array.from(stubPackets.entries())) {
  const transformedPacket = prepareMessage(packet, {
    getNextId: () => "1",
  });
  const message = ConsoleMessage(transformedPacket);
  stubPreparedMessages.set(key, message);
}

module.exports = {
  rawPackets,
  stubPreparedMessages,
  stubPackets,
};
