1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
/* 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(`Unknown property ‘such-unknown-property’. Declaration dropped.`, {
"pageError": {
"errorMessage": "Unknown property ‘such-unknown-property’. Declaration dropped.",
"sourceName": "https://example.com/browser/devtools/client/webconsole/test/browser/stub-generators/test-css-message.html",
"sourceId": null,
"lineText": "",
"lineNumber": 3,
"columnNumber": 27,
"category": "CSS Parser",
"innerWindowID": 8589934593,
"timeStamp": 1572867483805,
"warning": true,
"error": false,
"info": false,
"private": false,
"stacktrace": null,
"notes": null,
"chromeContext": false,
"isForwardedFromContentProcess": false
},
"resourceType": "css-message",
"cssSelectors": "p",
"isAlreadyExistingResource": false
});
rawPackets.set(`Error in parsing value for ‘padding-top’. Declaration dropped.`, {
"pageError": {
"errorMessage": "Error in parsing value for ‘padding-top’. Declaration dropped.",
"sourceName": "https://example.com/browser/devtools/client/webconsole/test/browser/stub-generators/test-css-message.html",
"sourceId": null,
"lineText": "",
"lineNumber": 3,
"columnNumber": 18,
"category": "CSS Parser",
"innerWindowID": 8589934593,
"timeStamp": 1572867483805,
"warning": true,
"error": false,
"info": false,
"private": false,
"stacktrace": null,
"notes": null,
"chromeContext": false,
"isForwardedFromContentProcess": false
},
"resourceType": "css-message",
"cssSelectors": "p",
"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,
};
|