Bug 1307919 - Add "Learn more" MDN link in message output. r=linclark;

MozReview-Commit-ID: DSAGjD0umzG

--HG--
extra : rebase_source : de07c55b3561d9c7d4385e930d1b410bd48d8e78
This commit is contained in:
Nicolas Chevobbe 2016-10-15 01:06:42 +02:00
Родитель 4eaa17a7e4
Коммит c668cc4404
14 изменённых файлов: 207 добавлений и 99 удалений

Просмотреть файл

@ -32,6 +32,7 @@ function EvaluationResult(props) {
type,
level,
id: messageId,
exceptionDocURL,
} = message;
let messageBody;
@ -53,6 +54,7 @@ function EvaluationResult(props) {
messageId,
scrollToMessage: props.autoscroll,
serviceContainer,
exceptionDocURL,
};
return Message(childProps);
}

Просмотреть файл

@ -42,7 +42,8 @@ function PageError(props) {
messageText: messageBody,
repeat,
stacktrace,
frame
frame,
exceptionDocURL,
} = message;
const childProps = {
@ -60,6 +61,7 @@ function PageError(props) {
frame,
stacktrace,
serviceContainer,
exceptionDocURL,
};
return Message(childProps);
}

Просмотреть файл

@ -13,6 +13,7 @@ const {
DOM: dom,
PropTypes
} = require("devtools/client/shared/vendor/react");
const { l10n } = require("devtools/client/webconsole/new-console-output/utils/messages");
const actions = require("devtools/client/webconsole/new-console-output/actions/index");
const CollapseButton = createFactory(require("devtools/client/webconsole/new-console-output/components/collapse-button"));
const MessageIndent = createFactory(require("devtools/client/webconsole/new-console-output/components/message-indent").MessageIndent);
@ -40,6 +41,7 @@ const Message = createClass({
stacktrace: PropTypes.any,
messageId: PropTypes.string,
scrollToMessage: PropTypes.bool,
exceptionDocURL: PropTypes.string,
serviceContainer: PropTypes.shape({
emitNewMessage: PropTypes.func.isRequired,
onViewSourceInDebugger: PropTypes.func.isRequired,
@ -66,6 +68,11 @@ const Message = createClass({
}
},
onLearnMoreClick: function () {
let {exceptionDocURL} = this.props;
this.props.serviceContainer.openLink(exceptionDocURL);
},
render() {
const {
messageId,
@ -82,6 +89,7 @@ const Message = createClass({
stacktrace,
serviceContainer,
dispatch,
exceptionDocURL,
} = this.props;
topLevelClasses.push("message", source, type, level);
@ -132,6 +140,15 @@ const Message = createClass({
}) : null
);
let learnMore;
if (exceptionDocURL) {
learnMore = dom.a({
className: "learn-more-link webconsole-learn-more-link",
title: exceptionDocURL.split("?")[0],
onClick: this.onLearnMoreClick,
}, `[${l10n.getStr("webConsoleMoreInfoLabel")}]`);
}
return dom.div({
className: topLevelClasses.join(" "),
ref: node => {
@ -145,7 +162,8 @@ const Message = createClass({
dom.span({ className: "message-body-wrapper" },
dom.span({ className: "message-flex-body" },
dom.span({ className: "message-body devtools-monospace" },
messageBody
messageBody,
learnMore
),
repeat,
location

Просмотреть файл

@ -54,6 +54,7 @@ NewConsoleOutputWrapper.prototype = {
});
},
sourceMapService: this.toolbox ? this.toolbox._sourceMapService : null,
openLink: url => this.jsterm.hud.owner.openLink.call(this.jsterm.hud.owner, url)
}
});
let filterBar = FilterBar({

Просмотреть файл

@ -4,10 +4,13 @@
// Test utils.
const expect = require("expect");
const { render } = require("enzyme");
const { render, mount } = require("enzyme");
const sinon = require("sinon");
// React
const { createFactory } = require("devtools/client/shared/vendor/react");
const Provider = createFactory(require("react-redux").Provider);
const { setupStore } = require("devtools/client/webconsole/new-console-output/test/helpers");
// Components under test.
const EvaluationResult = createFactory(require("devtools/client/webconsole/new-console-output/components/message-types/evaluation-result"));
@ -15,6 +18,7 @@ const { INDENT_WIDTH } = require("devtools/client/webconsole/new-console-output/
// Test fakes.
const { stubPreparedMessages } = require("devtools/client/webconsole/new-console-output/test/fixtures/stubs/index");
const serviceContainer = require("devtools/client/webconsole/new-console-output/test/fixtures/serviceContainer");
describe("EvaluationResult component:", () => {
it("renders a grip result", () => {
@ -31,11 +35,32 @@ describe("EvaluationResult component:", () => {
const wrapper = render(EvaluationResult({ message }));
expect(wrapper.find(".message-body").text())
.toBe("ReferenceError: asdf is not defined");
.toBe("ReferenceError: asdf is not defined[Learn More]");
expect(wrapper.find(".message.error").length).toBe(1);
});
it("displays a [Learn more] link", () => {
const store = setupStore([]);
const message = stubPreparedMessages.get("asdf()");
serviceContainer.openLink = sinon.spy();
const wrapper = mount(Provider({store},
EvaluationResult({message, serviceContainer})
));
const url =
"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Errors/Not_defined";
const learnMore = wrapper.find(".learn-more-link");
expect(learnMore.length).toBe(1);
expect(learnMore.prop("title")).toBe(url);
learnMore.simulate("click");
let call = serviceContainer.openLink.getCall(0);
expect(call.args[0]).toEqual(message.exceptionDocURL);
});
it("has the expected indent", () => {
const message = stubPreparedMessages.get("new Date(0)");

Просмотреть файл

@ -30,19 +30,41 @@ describe("PageError component:", () => {
const wrapper = render(PageError({ message, serviceContainer }));
expect(wrapper.find(".message-body").text())
.toBe("ReferenceError: asdf is not defined");
.toBe("ReferenceError: asdf is not defined[Learn More]");
// The stacktrace should be closed by default.
const frameLinks = wrapper.find(`.stack-trace`);
expect(frameLinks.length).toBe(0);
// There should be the location
// There should be the location.
const locationLink = wrapper.find(`.message-location`);
expect(locationLink.length).toBe(1);
// @TODO Will likely change. See https://github.com/devtools-html/gecko-dev/issues/285
expect(locationLink.text()).toBe("test-tempfile.js:3:5");
});
it("displays a [Learn more] link", () => {
const store = setupStore([]);
const message = stubPreparedMessages.get("ReferenceError: asdf is not defined");
serviceContainer.openLink = sinon.spy();
const wrapper = mount(Provider({store},
PageError({message, serviceContainer})
));
// There should be a [Learn more] link.
const url =
"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Errors/Not_defined";
const learnMore = wrapper.find(".learn-more-link");
expect(learnMore.length).toBe(1);
expect(learnMore.prop("title")).toBe(url);
learnMore.simulate("click");
let call = serviceContainer.openLink.getCall(0);
expect(call.args[0]).toEqual(message.exceptionDocURL);
});
it("has a stacktrace which can be openned", () => {
const message = stubPreparedMessages.get("ReferenceError: asdf is not defined");
const wrapper = render(PageError({ message, serviceContainer, open: true }));

Просмотреть файл

@ -13,6 +13,8 @@ class L10n {
return "Console was cleared.";
case "webConsoleXhrIndicator":
return "XHR";
case "webConsoleMoreInfoLabel":
return "Learn More";
}
return str;
}

Просмотреть файл

@ -12,4 +12,5 @@ module.exports = {
sourceMapService: {
subscribe: () => {},
},
};
openLink: () => {},
};

Просмотреть файл

@ -25,14 +25,15 @@ stubPreparedMessages.set("console.log('foobar', 'test')", new ConsoleMessage({
"test"
],
"repeat": 1,
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"log\",\"level\":\"log\",\"messageText\":null,\"parameters\":[\"foobar\",\"test\"],\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.log(%27foobar%27%2C%20%27test%27)\",\"line\":1,\"column\":27},\"groupId\":null}",
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"log\",\"level\":\"log\",\"messageText\":null,\"parameters\":[\"foobar\",\"test\"],\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.log(%27foobar%27%2C%20%27test%27)\",\"line\":1,\"column\":27},\"groupId\":null,\"exceptionDocURL\":null}",
"stacktrace": null,
"frame": {
"source": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.log(%27foobar%27%2C%20%27test%27)",
"line": 1,
"column": 27
},
"groupId": null
"groupId": null,
"exceptionDocURL": null
}));
stubPreparedMessages.set("console.log(undefined)", new ConsoleMessage({
@ -48,14 +49,15 @@ stubPreparedMessages.set("console.log(undefined)", new ConsoleMessage({
}
],
"repeat": 1,
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"log\",\"level\":\"log\",\"messageText\":null,\"parameters\":[{\"type\":\"undefined\"}],\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.log(undefined)\",\"line\":1,\"column\":27},\"groupId\":null}",
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"log\",\"level\":\"log\",\"messageText\":null,\"parameters\":[{\"type\":\"undefined\"}],\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.log(undefined)\",\"line\":1,\"column\":27},\"groupId\":null,\"exceptionDocURL\":null}",
"stacktrace": null,
"frame": {
"source": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.log(undefined)",
"line": 1,
"column": 27
},
"groupId": null
"groupId": null,
"exceptionDocURL": null
}));
stubPreparedMessages.set("console.warn('danger, will robinson!')", new ConsoleMessage({
@ -69,14 +71,15 @@ stubPreparedMessages.set("console.warn('danger, will robinson!')", new ConsoleMe
"danger, will robinson!"
],
"repeat": 1,
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"warn\",\"level\":\"warn\",\"messageText\":null,\"parameters\":[\"danger, will robinson!\"],\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.warn(%27danger%2C%20will%20robinson!%27)\",\"line\":1,\"column\":27},\"groupId\":null}",
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"warn\",\"level\":\"warn\",\"messageText\":null,\"parameters\":[\"danger, will robinson!\"],\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.warn(%27danger%2C%20will%20robinson!%27)\",\"line\":1,\"column\":27},\"groupId\":null,\"exceptionDocURL\":null}",
"stacktrace": null,
"frame": {
"source": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.warn(%27danger%2C%20will%20robinson!%27)",
"line": 1,
"column": 27
},
"groupId": null
"groupId": null,
"exceptionDocURL": null
}));
stubPreparedMessages.set("console.log(NaN)", new ConsoleMessage({
@ -92,14 +95,15 @@ stubPreparedMessages.set("console.log(NaN)", new ConsoleMessage({
}
],
"repeat": 1,
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"log\",\"level\":\"log\",\"messageText\":null,\"parameters\":[{\"type\":\"NaN\"}],\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.log(NaN)\",\"line\":1,\"column\":27},\"groupId\":null}",
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"log\",\"level\":\"log\",\"messageText\":null,\"parameters\":[{\"type\":\"NaN\"}],\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.log(NaN)\",\"line\":1,\"column\":27},\"groupId\":null,\"exceptionDocURL\":null}",
"stacktrace": null,
"frame": {
"source": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.log(NaN)",
"line": 1,
"column": 27
},
"groupId": null
"groupId": null,
"exceptionDocURL": null
}));
stubPreparedMessages.set("console.log(null)", new ConsoleMessage({
@ -115,14 +119,15 @@ stubPreparedMessages.set("console.log(null)", new ConsoleMessage({
}
],
"repeat": 1,
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"log\",\"level\":\"log\",\"messageText\":null,\"parameters\":[{\"type\":\"null\"}],\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.log(null)\",\"line\":1,\"column\":27},\"groupId\":null}",
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"log\",\"level\":\"log\",\"messageText\":null,\"parameters\":[{\"type\":\"null\"}],\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.log(null)\",\"line\":1,\"column\":27},\"groupId\":null,\"exceptionDocURL\":null}",
"stacktrace": null,
"frame": {
"source": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.log(null)",
"line": 1,
"column": 27
},
"groupId": null
"groupId": null,
"exceptionDocURL": null
}));
stubPreparedMessages.set("console.log('鼬')", new ConsoleMessage({
@ -136,14 +141,15 @@ stubPreparedMessages.set("console.log('鼬')", new ConsoleMessage({
"鼬"
],
"repeat": 1,
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"log\",\"level\":\"log\",\"messageText\":null,\"parameters\":[\"鼬\"],\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.log(%27%E9%BC%AC%27)\",\"line\":1,\"column\":27},\"groupId\":null}",
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"log\",\"level\":\"log\",\"messageText\":null,\"parameters\":[\"鼬\"],\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.log(%27%E9%BC%AC%27)\",\"line\":1,\"column\":27},\"groupId\":null,\"exceptionDocURL\":null}",
"stacktrace": null,
"frame": {
"source": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.log(%27%E9%BC%AC%27)",
"line": 1,
"column": 27
},
"groupId": null
"groupId": null,
"exceptionDocURL": null
}));
stubPreparedMessages.set("console.clear()", new ConsoleMessage({
@ -157,14 +163,15 @@ stubPreparedMessages.set("console.clear()", new ConsoleMessage({
"Console was cleared."
],
"repeat": 1,
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"clear\",\"level\":\"log\",\"messageText\":null,\"parameters\":[\"Console was cleared.\"],\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.clear()\",\"line\":1,\"column\":27},\"groupId\":null}",
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"clear\",\"level\":\"log\",\"messageText\":null,\"parameters\":[\"Console was cleared.\"],\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.clear()\",\"line\":1,\"column\":27},\"groupId\":null,\"exceptionDocURL\":null}",
"stacktrace": null,
"frame": {
"source": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.clear()",
"line": 1,
"column": 27
},
"groupId": null
"groupId": null,
"exceptionDocURL": null
}));
stubPreparedMessages.set("console.count('bar')", new ConsoleMessage({
@ -176,14 +183,15 @@ stubPreparedMessages.set("console.count('bar')", new ConsoleMessage({
"messageText": "bar: 1",
"parameters": null,
"repeat": 1,
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"log\",\"level\":\"debug\",\"messageText\":\"bar: 1\",\"parameters\":null,\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.count(%27bar%27)\",\"line\":1,\"column\":27},\"groupId\":null}",
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"log\",\"level\":\"debug\",\"messageText\":\"bar: 1\",\"parameters\":null,\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.count(%27bar%27)\",\"line\":1,\"column\":27},\"groupId\":null,\"exceptionDocURL\":null}",
"stacktrace": null,
"frame": {
"source": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.count(%27bar%27)",
"line": 1,
"column": 27
},
"groupId": null
"groupId": null,
"exceptionDocURL": null
}));
stubPreparedMessages.set("console.assert(false, {message: 'foobar'})", new ConsoleMessage({
@ -218,7 +226,7 @@ stubPreparedMessages.set("console.assert(false, {message: 'foobar'})", new Conso
}
],
"repeat": 1,
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"assert\",\"level\":\"error\",\"messageText\":null,\"parameters\":[{\"type\":\"object\",\"actor\":\"server1.conn8.child1/obj31\",\"class\":\"Object\",\"extensible\":true,\"frozen\":false,\"sealed\":false,\"ownPropertyLength\":1,\"preview\":{\"kind\":\"Object\",\"ownProperties\":{\"message\":{\"configurable\":true,\"enumerable\":true,\"writable\":true,\"value\":\"foobar\"}},\"ownPropertiesLength\":1,\"safeGetterValues\":{}}}],\"repeatId\":null,\"stacktrace\":[{\"columnNumber\":27,\"filename\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.assert(false%2C%20%7Bmessage%3A%20%27foobar%27%7D)\",\"functionName\":\"triggerPacket\",\"language\":2,\"lineNumber\":1}],\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.assert(false%2C%20%7Bmessage%3A%20%27foobar%27%7D)\",\"line\":1,\"column\":27},\"groupId\":null}",
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"assert\",\"level\":\"error\",\"messageText\":null,\"parameters\":[{\"type\":\"object\",\"actor\":\"server1.conn8.child1/obj31\",\"class\":\"Object\",\"extensible\":true,\"frozen\":false,\"sealed\":false,\"ownPropertyLength\":1,\"preview\":{\"kind\":\"Object\",\"ownProperties\":{\"message\":{\"configurable\":true,\"enumerable\":true,\"writable\":true,\"value\":\"foobar\"}},\"ownPropertiesLength\":1,\"safeGetterValues\":{}}}],\"repeatId\":null,\"stacktrace\":[{\"columnNumber\":27,\"filename\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.assert(false%2C%20%7Bmessage%3A%20%27foobar%27%7D)\",\"functionName\":\"triggerPacket\",\"language\":2,\"lineNumber\":1}],\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.assert(false%2C%20%7Bmessage%3A%20%27foobar%27%7D)\",\"line\":1,\"column\":27},\"groupId\":null,\"exceptionDocURL\":null}",
"stacktrace": [
{
"columnNumber": 27,
@ -233,7 +241,8 @@ stubPreparedMessages.set("console.assert(false, {message: 'foobar'})", new Conso
"line": 1,
"column": 27
},
"groupId": null
"groupId": null,
"exceptionDocURL": null
}));
stubPreparedMessages.set("console.log('hello \nfrom \rthe \"string world!')", new ConsoleMessage({
@ -247,14 +256,15 @@ stubPreparedMessages.set("console.log('hello \nfrom \rthe \"string world!')", ne
"hello \nfrom \rthe \"string world!"
],
"repeat": 1,
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"log\",\"level\":\"log\",\"messageText\":null,\"parameters\":[\"hello \\nfrom \\rthe \\\"string world!\"],\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.log(%27hello%20%5Cnfrom%20%5Crthe%20%5C%22string%20world!%27)\",\"line\":1,\"column\":27},\"groupId\":null}",
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"log\",\"level\":\"log\",\"messageText\":null,\"parameters\":[\"hello \\nfrom \\rthe \\\"string world!\"],\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.log(%27hello%20%5Cnfrom%20%5Crthe%20%5C%22string%20world!%27)\",\"line\":1,\"column\":27},\"groupId\":null,\"exceptionDocURL\":null}",
"stacktrace": null,
"frame": {
"source": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.log(%27hello%20%5Cnfrom%20%5Crthe%20%5C%22string%20world!%27)",
"line": 1,
"column": 27
},
"groupId": null
"groupId": null,
"exceptionDocURL": null
}));
stubPreparedMessages.set("console.log('úṇĩçödê țĕșť')", new ConsoleMessage({
@ -268,14 +278,15 @@ stubPreparedMessages.set("console.log('úṇĩçödê țĕșť')", new ConsoleMe
"úṇĩçödê țĕșť"
],
"repeat": 1,
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"log\",\"level\":\"log\",\"messageText\":null,\"parameters\":[\"úṇĩçödê țĕșť\"],\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.log(%27%C3%BA%E1%B9%87%C4%A9%C3%A7%C3%B6d%C3%AA%20%C8%9B%C4%95%C8%99%C5%A5%27)\",\"line\":1,\"column\":27},\"groupId\":null}",
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"log\",\"level\":\"log\",\"messageText\":null,\"parameters\":[\"úṇĩçödê țĕșť\"],\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.log(%27%C3%BA%E1%B9%87%C4%A9%C3%A7%C3%B6d%C3%AA%20%C8%9B%C4%95%C8%99%C5%A5%27)\",\"line\":1,\"column\":27},\"groupId\":null,\"exceptionDocURL\":null}",
"stacktrace": null,
"frame": {
"source": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.log(%27%C3%BA%E1%B9%87%C4%A9%C3%A7%C3%B6d%C3%AA%20%C8%9B%C4%95%C8%99%C5%A5%27)",
"line": 1,
"column": 27
},
"groupId": null
"groupId": null,
"exceptionDocURL": null
}));
stubPreparedMessages.set("console.dirxml(window)", new ConsoleMessage({
@ -293,7 +304,7 @@ stubPreparedMessages.set("console.dirxml(window)", new ConsoleMessage({
"extensible": true,
"frozen": false,
"sealed": false,
"ownPropertyLength": 805,
"ownPropertyLength": 806,
"preview": {
"kind": "ObjectWithURL",
"url": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-console-api.html"
@ -301,14 +312,15 @@ stubPreparedMessages.set("console.dirxml(window)", new ConsoleMessage({
}
],
"repeat": 1,
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"log\",\"level\":\"log\",\"messageText\":null,\"parameters\":[{\"type\":\"object\",\"actor\":\"server1.conn11.child1/obj31\",\"class\":\"Window\",\"extensible\":true,\"frozen\":false,\"sealed\":false,\"ownPropertyLength\":805,\"preview\":{\"kind\":\"ObjectWithURL\",\"url\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-console-api.html\"}}],\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.dirxml(window)\",\"line\":1,\"column\":27},\"groupId\":null}",
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"log\",\"level\":\"log\",\"messageText\":null,\"parameters\":[{\"type\":\"object\",\"actor\":\"server1.conn11.child1/obj31\",\"class\":\"Window\",\"extensible\":true,\"frozen\":false,\"sealed\":false,\"ownPropertyLength\":806,\"preview\":{\"kind\":\"ObjectWithURL\",\"url\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-console-api.html\"}}],\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.dirxml(window)\",\"line\":1,\"column\":27},\"groupId\":null,\"exceptionDocURL\":null}",
"stacktrace": null,
"frame": {
"source": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.dirxml(window)",
"line": 1,
"column": 27
},
"groupId": null
"groupId": null,
"exceptionDocURL": null
}));
stubPreparedMessages.set("console.trace()", new ConsoleMessage({
@ -320,7 +332,7 @@ stubPreparedMessages.set("console.trace()", new ConsoleMessage({
"messageText": null,
"parameters": [],
"repeat": 1,
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"trace\",\"level\":\"log\",\"messageText\":null,\"parameters\":[],\"repeatId\":null,\"stacktrace\":[{\"columnNumber\":3,\"filename\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.trace()\",\"functionName\":\"testStacktraceFiltering\",\"language\":2,\"lineNumber\":3},{\"columnNumber\":3,\"filename\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.trace()\",\"functionName\":\"foo\",\"language\":2,\"lineNumber\":6},{\"columnNumber\":1,\"filename\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.trace()\",\"functionName\":\"triggerPacket\",\"language\":2,\"lineNumber\":9}],\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.trace()\",\"line\":3,\"column\":3},\"groupId\":null}",
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"trace\",\"level\":\"log\",\"messageText\":null,\"parameters\":[],\"repeatId\":null,\"stacktrace\":[{\"columnNumber\":3,\"filename\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.trace()\",\"functionName\":\"testStacktraceFiltering\",\"language\":2,\"lineNumber\":3},{\"columnNumber\":3,\"filename\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.trace()\",\"functionName\":\"foo\",\"language\":2,\"lineNumber\":6},{\"columnNumber\":1,\"filename\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.trace()\",\"functionName\":\"triggerPacket\",\"language\":2,\"lineNumber\":9}],\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.trace()\",\"line\":3,\"column\":3},\"groupId\":null,\"exceptionDocURL\":null}",
"stacktrace": [
{
"columnNumber": 3,
@ -349,7 +361,8 @@ stubPreparedMessages.set("console.trace()", new ConsoleMessage({
"line": 3,
"column": 3
},
"groupId": null
"groupId": null,
"exceptionDocURL": null
}));
stubPreparedMessages.set("console.time('bar')", new ConsoleMessage({
@ -361,14 +374,15 @@ stubPreparedMessages.set("console.time('bar')", new ConsoleMessage({
"messageText": null,
"parameters": null,
"repeat": 1,
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"nullMessage\",\"level\":\"log\",\"messageText\":null,\"parameters\":null,\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.time(%27bar%27)\",\"line\":2,\"column\":1},\"groupId\":null}",
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"nullMessage\",\"level\":\"log\",\"messageText\":null,\"parameters\":null,\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.time(%27bar%27)\",\"line\":2,\"column\":1},\"groupId\":null,\"exceptionDocURL\":null}",
"stacktrace": null,
"frame": {
"source": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.time(%27bar%27)",
"line": 2,
"column": 1
},
"groupId": null
"groupId": null,
"exceptionDocURL": null
}));
stubPreparedMessages.set("console.timeEnd('bar')", new ConsoleMessage({
@ -377,17 +391,18 @@ stubPreparedMessages.set("console.timeEnd('bar')", new ConsoleMessage({
"source": "console-api",
"type": "timeEnd",
"level": "log",
"messageText": "bar: 2ms",
"messageText": "bar: 1.8ms",
"parameters": null,
"repeat": 1,
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"timeEnd\",\"level\":\"log\",\"messageText\":\"bar: 2ms\",\"parameters\":null,\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.time(%27bar%27)\",\"line\":3,\"column\":1},\"groupId\":null}",
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"timeEnd\",\"level\":\"log\",\"messageText\":\"bar: 1.8ms\",\"parameters\":null,\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.time(%27bar%27)\",\"line\":3,\"column\":1},\"groupId\":null,\"exceptionDocURL\":null}",
"stacktrace": null,
"frame": {
"source": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.time(%27bar%27)",
"line": 3,
"column": 1
},
"groupId": null
"groupId": null,
"exceptionDocURL": null
}));
stubPreparedMessages.set("console.table('bar')", new ConsoleMessage({
@ -401,14 +416,15 @@ stubPreparedMessages.set("console.table('bar')", new ConsoleMessage({
"bar"
],
"repeat": 1,
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"log\",\"level\":\"log\",\"messageText\":null,\"parameters\":[\"bar\"],\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.table(%27bar%27)\",\"line\":2,\"column\":1},\"groupId\":null}",
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"log\",\"level\":\"log\",\"messageText\":null,\"parameters\":[\"bar\"],\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.table(%27bar%27)\",\"line\":2,\"column\":1},\"groupId\":null,\"exceptionDocURL\":null}",
"stacktrace": null,
"frame": {
"source": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.table(%27bar%27)",
"line": 2,
"column": 1
},
"groupId": null
"groupId": null,
"exceptionDocURL": null
}));
stubPreparedMessages.set("console.table(['a', 'b', 'c'])", new ConsoleMessage({
@ -439,14 +455,15 @@ stubPreparedMessages.set("console.table(['a', 'b', 'c'])", new ConsoleMessage({
}
],
"repeat": 1,
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"table\",\"level\":\"log\",\"messageText\":null,\"parameters\":[{\"type\":\"object\",\"actor\":\"server1.conn15.child1/obj31\",\"class\":\"Array\",\"extensible\":true,\"frozen\":false,\"sealed\":false,\"ownPropertyLength\":4,\"preview\":{\"kind\":\"ArrayLike\",\"length\":3,\"items\":[\"a\",\"b\",\"c\"]}}],\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.table(%5B%27a%27%2C%20%27b%27%2C%20%27c%27%5D)\",\"line\":2,\"column\":1},\"groupId\":null}",
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"table\",\"level\":\"log\",\"messageText\":null,\"parameters\":[{\"type\":\"object\",\"actor\":\"server1.conn15.child1/obj31\",\"class\":\"Array\",\"extensible\":true,\"frozen\":false,\"sealed\":false,\"ownPropertyLength\":4,\"preview\":{\"kind\":\"ArrayLike\",\"length\":3,\"items\":[\"a\",\"b\",\"c\"]}}],\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.table(%5B%27a%27%2C%20%27b%27%2C%20%27c%27%5D)\",\"line\":2,\"column\":1},\"groupId\":null,\"exceptionDocURL\":null}",
"stacktrace": null,
"frame": {
"source": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.table(%5B%27a%27%2C%20%27b%27%2C%20%27c%27%5D)",
"line": 2,
"column": 1
},
"groupId": null
"groupId": null,
"exceptionDocURL": null
}));
stubPreparedMessages.set("console.group('bar')", new ConsoleMessage({
@ -458,14 +475,15 @@ stubPreparedMessages.set("console.group('bar')", new ConsoleMessage({
"messageText": "bar",
"parameters": null,
"repeat": 1,
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"startGroup\",\"level\":\"log\",\"messageText\":\"bar\",\"parameters\":null,\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.group(%27bar%27)\",\"line\":2,\"column\":1},\"groupId\":null}",
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"startGroup\",\"level\":\"log\",\"messageText\":\"bar\",\"parameters\":null,\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.group(%27bar%27)\",\"line\":2,\"column\":1},\"groupId\":null,\"exceptionDocURL\":null}",
"stacktrace": null,
"frame": {
"source": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.group(%27bar%27)",
"line": 2,
"column": 1
},
"groupId": null
"groupId": null,
"exceptionDocURL": null
}));
stubPreparedMessages.set("console.groupEnd('bar')", new ConsoleMessage({
@ -477,14 +495,15 @@ stubPreparedMessages.set("console.groupEnd('bar')", new ConsoleMessage({
"messageText": null,
"parameters": null,
"repeat": 1,
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"endGroup\",\"level\":\"log\",\"messageText\":null,\"parameters\":null,\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.group(%27bar%27)\",\"line\":3,\"column\":1},\"groupId\":null}",
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"endGroup\",\"level\":\"log\",\"messageText\":null,\"parameters\":null,\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.group(%27bar%27)\",\"line\":3,\"column\":1},\"groupId\":null,\"exceptionDocURL\":null}",
"stacktrace": null,
"frame": {
"source": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.group(%27bar%27)",
"line": 3,
"column": 1
},
"groupId": null
"groupId": null,
"exceptionDocURL": null
}));
stubPreparedMessages.set("console.groupCollapsed('foo')", new ConsoleMessage({
@ -496,14 +515,15 @@ stubPreparedMessages.set("console.groupCollapsed('foo')", new ConsoleMessage({
"messageText": "foo",
"parameters": null,
"repeat": 1,
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"startGroupCollapsed\",\"level\":\"log\",\"messageText\":\"foo\",\"parameters\":null,\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.groupCollapsed(%27foo%27)\",\"line\":2,\"column\":1},\"groupId\":null}",
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"startGroupCollapsed\",\"level\":\"log\",\"messageText\":\"foo\",\"parameters\":null,\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.groupCollapsed(%27foo%27)\",\"line\":2,\"column\":1},\"groupId\":null,\"exceptionDocURL\":null}",
"stacktrace": null,
"frame": {
"source": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.groupCollapsed(%27foo%27)",
"line": 2,
"column": 1
},
"groupId": null
"groupId": null,
"exceptionDocURL": null
}));
stubPreparedMessages.set("console.groupEnd('foo')", new ConsoleMessage({
@ -515,14 +535,15 @@ stubPreparedMessages.set("console.groupEnd('foo')", new ConsoleMessage({
"messageText": null,
"parameters": null,
"repeat": 1,
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"endGroup\",\"level\":\"log\",\"messageText\":null,\"parameters\":null,\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.groupCollapsed(%27foo%27)\",\"line\":3,\"column\":1},\"groupId\":null}",
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"endGroup\",\"level\":\"log\",\"messageText\":null,\"parameters\":null,\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.groupCollapsed(%27foo%27)\",\"line\":3,\"column\":1},\"groupId\":null,\"exceptionDocURL\":null}",
"stacktrace": null,
"frame": {
"source": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.groupCollapsed(%27foo%27)",
"line": 3,
"column": 1
},
"groupId": null
"groupId": null,
"exceptionDocURL": null
}));
stubPreparedMessages.set("console.group()", new ConsoleMessage({
@ -534,14 +555,15 @@ stubPreparedMessages.set("console.group()", new ConsoleMessage({
"messageText": "<no group label>",
"parameters": null,
"repeat": 1,
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"startGroup\",\"level\":\"log\",\"messageText\":\"<no group label>\",\"parameters\":null,\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.group()\",\"line\":2,\"column\":1},\"groupId\":null}",
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"startGroup\",\"level\":\"log\",\"messageText\":\"<no group label>\",\"parameters\":null,\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.group()\",\"line\":2,\"column\":1},\"groupId\":null,\"exceptionDocURL\":null}",
"stacktrace": null,
"frame": {
"source": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.group()",
"line": 2,
"column": 1
},
"groupId": null
"groupId": null,
"exceptionDocURL": null
}));
stubPreparedMessages.set("console.groupEnd()", new ConsoleMessage({
@ -553,14 +575,15 @@ stubPreparedMessages.set("console.groupEnd()", new ConsoleMessage({
"messageText": null,
"parameters": null,
"repeat": 1,
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"endGroup\",\"level\":\"log\",\"messageText\":null,\"parameters\":null,\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.group()\",\"line\":3,\"column\":1},\"groupId\":null}",
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"console-api\",\"type\":\"endGroup\",\"level\":\"log\",\"messageText\":null,\"parameters\":null,\"repeatId\":null,\"stacktrace\":null,\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.group()\",\"line\":3,\"column\":1},\"groupId\":null,\"exceptionDocURL\":null}",
"stacktrace": null,
"frame": {
"source": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=console.group()",
"line": 3,
"column": 1
},
"groupId": null
"groupId": null,
"exceptionDocURL": null
}));
@ -590,7 +613,7 @@ stubPackets.set("console.log('foobar', 'test')", {
},
"private": false,
"styles": [],
"timeStamp": 1475932482736,
"timeStamp": 1476572494539,
"timer": null,
"workerType": "none",
"category": "webdev"
@ -624,7 +647,7 @@ stubPackets.set("console.log(undefined)", {
},
"private": false,
"styles": [],
"timeStamp": 1475932485201,
"timeStamp": 1476572496789,
"timer": null,
"workerType": "none",
"category": "webdev"
@ -656,7 +679,7 @@ stubPackets.set("console.warn('danger, will robinson!')", {
},
"private": false,
"styles": [],
"timeStamp": 1475932487905,
"timeStamp": 1476572499458,
"timer": null,
"workerType": "none",
"category": "webdev"
@ -690,7 +713,7 @@ stubPackets.set("console.log(NaN)", {
},
"private": false,
"styles": [],
"timeStamp": 1475932490983,
"timeStamp": 1476572501339,
"timer": null,
"workerType": "none",
"category": "webdev"
@ -724,7 +747,7 @@ stubPackets.set("console.log(null)", {
},
"private": false,
"styles": [],
"timeStamp": 1475932493685,
"timeStamp": 1476572504208,
"timer": null,
"workerType": "none",
"category": "webdev"
@ -756,7 +779,7 @@ stubPackets.set("console.log('鼬')", {
},
"private": false,
"styles": [],
"timeStamp": 1475932496157,
"timeStamp": 1476572507048,
"timer": null,
"workerType": "none",
"category": "webdev"
@ -785,7 +808,7 @@ stubPackets.set("console.clear()", {
"userContextId": 0
},
"private": false,
"timeStamp": 1475932498831,
"timeStamp": 1476572509784,
"timer": null,
"workerType": "none",
"styles": [],
@ -820,7 +843,7 @@ stubPackets.set("console.count('bar')", {
"userContextId": 0
},
"private": false,
"timeStamp": 1475932502090,
"timeStamp": 1476572512209,
"timer": null,
"workerType": "none",
"styles": [],
@ -874,7 +897,7 @@ stubPackets.set("console.assert(false, {message: 'foobar'})", {
},
"private": false,
"styles": [],
"timeStamp": 1475932504985,
"timeStamp": 1476572514941,
"timer": null,
"stacktrace": [
{
@ -915,7 +938,7 @@ stubPackets.set("console.log('hello \nfrom \rthe \"string world!')", {
},
"private": false,
"styles": [],
"timeStamp": 1475932507548,
"timeStamp": 1476572517131,
"timer": null,
"workerType": "none",
"category": "webdev"
@ -947,7 +970,7 @@ stubPackets.set("console.log('úṇĩçödê țĕșť')", {
},
"private": false,
"styles": [],
"timeStamp": 1475932510208,
"timeStamp": 1476572519136,
"timer": null,
"workerType": "none",
"category": "webdev"
@ -966,7 +989,7 @@ stubPackets.set("console.dirxml(window)", {
"extensible": true,
"frozen": false,
"sealed": false,
"ownPropertyLength": 805,
"ownPropertyLength": 806,
"preview": {
"kind": "ObjectWithURL",
"url": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-console-api.html"
@ -990,7 +1013,7 @@ stubPackets.set("console.dirxml(window)", {
"userContextId": 0
},
"private": false,
"timeStamp": 1475932512694,
"timeStamp": 1476572521656,
"timer": null,
"workerType": "none",
"styles": [],
@ -1020,7 +1043,7 @@ stubPackets.set("console.trace()", {
"userContextId": 0
},
"private": false,
"timeStamp": 1475932515089,
"timeStamp": 1476572524381,
"timer": null,
"stacktrace": [
{
@ -1075,10 +1098,10 @@ stubPackets.set("console.time('bar')", {
"userContextId": 0
},
"private": false,
"timeStamp": 1475932517857,
"timeStamp": 1476572526421,
"timer": {
"name": "bar",
"started": 1855.08
"started": 1214.4750000000001
},
"workerType": "none",
"styles": [],
@ -1110,9 +1133,9 @@ stubPackets.set("console.timeEnd('bar')", {
"userContextId": 0
},
"private": false,
"timeStamp": 1475932517859,
"timeStamp": 1476572526423,
"timer": {
"duration": 2,
"duration": 1.8049999999998363,
"name": "bar"
},
"workerType": "none",
@ -1145,7 +1168,7 @@ stubPackets.set("console.table('bar')", {
"userContextId": 0
},
"private": false,
"timeStamp": 1475932520567,
"timeStamp": 1476572528374,
"timer": null,
"workerType": "none",
"styles": [],
@ -1194,7 +1217,7 @@ stubPackets.set("console.table(['a', 'b', 'c'])", {
"userContextId": 0
},
"private": false,
"timeStamp": 1475932523995,
"timeStamp": 1476572530339,
"timer": null,
"workerType": "none",
"styles": [],
@ -1226,7 +1249,7 @@ stubPackets.set("console.group('bar')", {
"userContextId": 0
},
"private": false,
"timeStamp": 1475932526918,
"timeStamp": 1476572532126,
"timer": null,
"workerType": "none",
"styles": [],
@ -1258,7 +1281,7 @@ stubPackets.set("console.groupEnd('bar')", {
"userContextId": 0
},
"private": false,
"timeStamp": 1475932526919,
"timeStamp": 1476572532127,
"timer": null,
"workerType": "none",
"styles": [],
@ -1290,7 +1313,7 @@ stubPackets.set("console.groupCollapsed('foo')", {
"userContextId": 0
},
"private": false,
"timeStamp": 1475932529277,
"timeStamp": 1476572533893,
"timer": null,
"workerType": "none",
"styles": [],
@ -1322,7 +1345,7 @@ stubPackets.set("console.groupEnd('foo')", {
"userContextId": 0
},
"private": false,
"timeStamp": 1475932529279,
"timeStamp": 1476572533897,
"timer": null,
"workerType": "none",
"styles": [],
@ -1352,7 +1375,7 @@ stubPackets.set("console.group()", {
"userContextId": 0
},
"private": false,
"timeStamp": 1475932531706,
"timeStamp": 1476572535552,
"timer": null,
"workerType": "none",
"styles": [],
@ -1382,7 +1405,7 @@ stubPackets.set("console.groupEnd()", {
"userContextId": 0
},
"private": false,
"timeStamp": 1475932531707,
"timeStamp": 1476572535554,
"timer": null,
"workerType": "none",
"styles": [],

Просмотреть файл

@ -32,9 +32,10 @@ stubPreparedMessages.set("new Date(0)", new ConsoleMessage({
}
},
"repeat": 1,
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"javascript\",\"type\":\"result\",\"level\":\"log\",\"parameters\":{\"type\":\"object\",\"actor\":\"server1.conn0.child1/obj30\",\"class\":\"Date\",\"extensible\":true,\"frozen\":false,\"sealed\":false,\"ownPropertyLength\":0,\"preview\":{\"timestamp\":0}},\"repeatId\":null,\"stacktrace\":null,\"frame\":null}",
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"javascript\",\"type\":\"result\",\"level\":\"log\",\"parameters\":{\"type\":\"object\",\"actor\":\"server1.conn0.child1/obj30\",\"class\":\"Date\",\"extensible\":true,\"frozen\":false,\"sealed\":false,\"ownPropertyLength\":0,\"preview\":{\"timestamp\":0}},\"repeatId\":null,\"stacktrace\":null,\"frame\":null,\"groupId\":null}",
"stacktrace": null,
"frame": null
"frame": null,
"groupId": null
}));
stubPreparedMessages.set("asdf()", new ConsoleMessage({
@ -48,9 +49,11 @@ stubPreparedMessages.set("asdf()", new ConsoleMessage({
"type": "undefined"
},
"repeat": 1,
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"javascript\",\"type\":\"result\",\"level\":\"error\",\"messageText\":\"ReferenceError: asdf is not defined\",\"parameters\":{\"type\":\"undefined\"},\"repeatId\":null,\"stacktrace\":null,\"frame\":null}",
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"javascript\",\"type\":\"result\",\"level\":\"error\",\"messageText\":\"ReferenceError: asdf is not defined\",\"parameters\":{\"type\":\"undefined\"},\"repeatId\":null,\"stacktrace\":null,\"frame\":null,\"groupId\":null,\"exceptionDocURL\":\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Errors/Not_defined?utm_source=mozilla&utm_medium=firefox-console-errors&utm_campaign=default\"}",
"stacktrace": null,
"frame": null
"frame": null,
"groupId": null,
"exceptionDocURL": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Errors/Not_defined?utm_source=mozilla&utm_medium=firefox-console-errors&utm_campaign=default"
}));
@ -69,7 +72,7 @@ stubPackets.set("new Date(0)", {
"timestamp": 0
}
},
"timestamp": 1474405330863,
"timestamp": 1476573073424,
"exception": null,
"helperResult": null
});
@ -80,7 +83,7 @@ stubPackets.set("asdf()", {
"result": {
"type": "undefined"
},
"timestamp": 1474405330881,
"timestamp": 1476573073442,
"exception": {
"type": "object",
"actor": "server1.conn0.child1/obj32",

Просмотреть файл

@ -24,7 +24,8 @@ stubPreparedMessages.set("GET request", new NetworkEventMessage({
},
"response": {},
"source": "network",
"type": "log"
"type": "log",
"groupId": null
}));
stubPreparedMessages.set("XHR GET request", new NetworkEventMessage({
@ -38,7 +39,8 @@ stubPreparedMessages.set("XHR GET request", new NetworkEventMessage({
},
"response": {},
"source": "network",
"type": "log"
"type": "log",
"groupId": null
}));
stubPreparedMessages.set("XHR POST request", new NetworkEventMessage({
@ -52,7 +54,8 @@ stubPreparedMessages.set("XHR POST request", new NetworkEventMessage({
},
"response": {},
"source": "network",
"type": "log"
"type": "log",
"groupId": null
}));
@ -61,8 +64,8 @@ stubPackets.set("GET request", {
"type": "networkEvent",
"eventActor": {
"actor": "server1.conn0.child1/netEvent29",
"startedDateTime": "2016-09-14T02:38:18.046Z",
"timeStamp": 1473820698046,
"startedDateTime": "2016-10-15T23:12:04.196Z",
"timeStamp": 1476573124196,
"url": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/inexistent.html",
"method": "GET",
"isXHR": false,
@ -102,8 +105,8 @@ stubPackets.set("XHR GET request", {
"type": "networkEvent",
"eventActor": {
"actor": "server1.conn1.child1/netEvent29",
"startedDateTime": "2016-09-14T02:38:18.812Z",
"timeStamp": 1473820698812,
"startedDateTime": "2016-10-15T23:12:05.690Z",
"timeStamp": 1476573125690,
"url": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/inexistent.html",
"method": "GET",
"isXHR": true,
@ -143,8 +146,8 @@ stubPackets.set("XHR POST request", {
"type": "networkEvent",
"eventActor": {
"actor": "server1.conn2.child1/netEvent29",
"startedDateTime": "2016-09-14T02:38:19.483Z",
"timeStamp": 1473820699483,
"startedDateTime": "2016-10-15T23:12:07.158Z",
"timeStamp": 1476573127158,
"url": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/inexistent.html",
"method": "POST",
"isXHR": true,

Просмотреть файл

@ -22,7 +22,7 @@ stubPreparedMessages.set("ReferenceError: asdf is not defined", new ConsoleMessa
"messageText": "ReferenceError: asdf is not defined",
"parameters": null,
"repeat": 1,
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"javascript\",\"type\":\"log\",\"level\":\"error\",\"messageText\":\"ReferenceError: asdf is not defined\",\"parameters\":null,\"repeatId\":null,\"stacktrace\":[{\"filename\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=Reference%20Error\",\"lineNumber\":3,\"columnNumber\":5,\"functionName\":\"bar\"},{\"filename\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=Reference%20Error\",\"lineNumber\":6,\"columnNumber\":5,\"functionName\":\"foo\"},{\"filename\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=Reference%20Error\",\"lineNumber\":9,\"columnNumber\":3,\"functionName\":null}],\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=Reference%20Error\",\"line\":3,\"column\":5}}",
"repeatId": "{\"id\":null,\"allowRepeating\":true,\"source\":\"javascript\",\"type\":\"log\",\"level\":\"error\",\"messageText\":\"ReferenceError: asdf is not defined\",\"parameters\":null,\"repeatId\":null,\"stacktrace\":[{\"filename\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=Reference%20Error\",\"lineNumber\":3,\"columnNumber\":5,\"functionName\":\"bar\"},{\"filename\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=Reference%20Error\",\"lineNumber\":6,\"columnNumber\":5,\"functionName\":\"foo\"},{\"filename\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=Reference%20Error\",\"lineNumber\":9,\"columnNumber\":3,\"functionName\":null}],\"frame\":{\"source\":\"http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=Reference%20Error\",\"line\":3,\"column\":5},\"groupId\":null,\"exceptionDocURL\":\"https://developer.mozilla.org/docs/Web/JavaScript/Reference/Errors/Not_defined?utm_source=mozilla&utm_medium=firefox-console-errors&utm_campaign=default\"}",
"stacktrace": [
{
"filename": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=Reference%20Error",
@ -47,7 +47,9 @@ stubPreparedMessages.set("ReferenceError: asdf is not defined", new ConsoleMessa
"source": "http://example.com/browser/devtools/client/webconsole/new-console-output/test/fixtures/stub-generators/test-tempfile.js?key=Reference%20Error",
"line": 3,
"column": 5
}
},
"groupId": null,
"exceptionDocURL": "https://developer.mozilla.org/docs/Web/JavaScript/Reference/Errors/Not_defined?utm_source=mozilla&utm_medium=firefox-console-errors&utm_campaign=default"
}));
@ -63,7 +65,7 @@ stubPackets.set("ReferenceError: asdf is not defined", {
"lineNumber": 3,
"columnNumber": 5,
"category": "content javascript",
"timeStamp": 1473960366996,
"timeStamp": 1476573167137,
"warning": false,
"error": false,
"exception": true,

Просмотреть файл

@ -36,6 +36,7 @@ exports.ConsoleMessage = Immutable.Record({
stacktrace: null,
frame: null,
groupId: null,
exceptionDocURL: null,
});
exports.NetworkEventMessage = Immutable.Record({

Просмотреть файл

@ -163,6 +163,7 @@ function transformPacket(packet) {
messageText: pageError.errorMessage,
stacktrace: pageError.stacktrace ? pageError.stacktrace : null,
frame,
exceptionDocURL: pageError.exceptionDocURL,
});
}
@ -181,6 +182,7 @@ function transformPacket(packet) {
default: {
let {
exceptionMessage: messageText,
exceptionDocURL,
result: parameters
} = packet;
@ -191,6 +193,7 @@ function transformPacket(packet) {
level,
messageText,
parameters,
exceptionDocURL,
});
}
}