diff --git a/devtools/client/webconsole/new-console-output/components/message-container.js b/devtools/client/webconsole/new-console-output/components/message-container.js index 9effef2bdbed..bf750a0a2bcc 100644 --- a/devtools/client/webconsole/new-console-output/components/message-container.js +++ b/devtools/client/webconsole/new-console-output/components/message-container.js @@ -70,7 +70,7 @@ const MessageContainer = createClass({ const message = this.props.getMessage(); let MessageComponent = getMessageComponent(message); - return MessageComponent(Object.assign({message, indent: message.indent}, this.props)); + return MessageComponent(Object.assign({message}, this.props)); } }); diff --git a/devtools/client/webconsole/new-console-output/components/message-types/console-api-call.js b/devtools/client/webconsole/new-console-output/components/message-types/console-api-call.js index 68fad67d8ad4..68b5886eefcc 100644 --- a/devtools/client/webconsole/new-console-output/components/message-types/console-api-call.js +++ b/devtools/client/webconsole/new-console-output/components/message-types/console-api-call.js @@ -25,14 +25,12 @@ ConsoleApiCall.propTypes = { message: PropTypes.object.isRequired, open: PropTypes.bool, serviceContainer: PropTypes.object.isRequired, - indent: PropTypes.number.isRequired, timestampsVisible: PropTypes.bool.isRequired, loadedObjectProperties: PropTypes.object, }; ConsoleApiCall.defaultProps = { open: false, - indent: 0, }; function ConsoleApiCall(props) { @@ -42,13 +40,13 @@ function ConsoleApiCall(props) { open, tableData, serviceContainer, - indent, timestampsVisible, repeat, loadedObjectProperties, } = props; const { id: messageId, + indent, source, type, level, diff --git a/devtools/client/webconsole/new-console-output/components/message-types/console-command.js b/devtools/client/webconsole/new-console-output/components/message-types/console-command.js index 37fab526a39d..09748c8367bf 100644 --- a/devtools/client/webconsole/new-console-output/components/message-types/console-command.js +++ b/devtools/client/webconsole/new-console-output/components/message-types/console-command.js @@ -17,27 +17,22 @@ ConsoleCommand.displayName = "ConsoleCommand"; ConsoleCommand.propTypes = { message: PropTypes.object.isRequired, - indent: PropTypes.number.isRequired, timestampsVisible: PropTypes.bool.isRequired, serviceContainer: PropTypes.object, }; -ConsoleCommand.defaultProps = { - indent: 0, -}; - /** * Displays input from the console. */ function ConsoleCommand(props) { const { - indent, message, timestampsVisible, serviceContainer, } = props; const { + indent, source, type, level, diff --git a/devtools/client/webconsole/new-console-output/components/message-types/evaluation-result.js b/devtools/client/webconsole/new-console-output/components/message-types/evaluation-result.js index 93b58e8b4260..40d36d8e1b1f 100644 --- a/devtools/client/webconsole/new-console-output/components/message-types/evaluation-result.js +++ b/devtools/client/webconsole/new-console-output/components/message-types/evaluation-result.js @@ -19,22 +19,16 @@ EvaluationResult.displayName = "EvaluationResult"; EvaluationResult.propTypes = { dispatch: PropTypes.func.isRequired, message: PropTypes.object.isRequired, - indent: PropTypes.number.isRequired, timestampsVisible: PropTypes.bool.isRequired, serviceContainer: PropTypes.object, loadedObjectProperties: PropTypes.object, }; -EvaluationResult.defaultProps = { - indent: 0, -}; - function EvaluationResult(props) { const { dispatch, message, serviceContainer, - indent, timestampsVisible, loadedObjectProperties, } = props; @@ -45,6 +39,7 @@ function EvaluationResult(props) { helperType, level, id: messageId, + indent, exceptionDocURL, frame, timeStamp, diff --git a/devtools/client/webconsole/new-console-output/components/message-types/network-event-message.js b/devtools/client/webconsole/new-console-output/components/message-types/network-event-message.js index c2dd1a4283d3..7ce8ced0fbe1 100644 --- a/devtools/client/webconsole/new-console-output/components/message-types/network-event-message.js +++ b/devtools/client/webconsole/new-console-output/components/message-types/network-event-message.js @@ -22,17 +22,11 @@ NetworkEventMessage.propTypes = { serviceContainer: PropTypes.shape({ openNetworkPanel: PropTypes.func.isRequired, }), - indent: PropTypes.number.isRequired, timestampsVisible: PropTypes.bool.isRequired, networkMessageUpdate: PropTypes.object.isRequired, }; -NetworkEventMessage.defaultProps = { - indent: 0, -}; - function NetworkEventMessage({ - indent, message = {}, serviceContainer, timestampsVisible, @@ -40,6 +34,7 @@ function NetworkEventMessage({ }) { const { actor, + indent, source, type, level, diff --git a/devtools/client/webconsole/new-console-output/components/message-types/page-error.js b/devtools/client/webconsole/new-console-output/components/message-types/page-error.js index 39089bdec075..052cd4328e4b 100644 --- a/devtools/client/webconsole/new-console-output/components/message-types/page-error.js +++ b/devtools/client/webconsole/new-console-output/components/message-types/page-error.js @@ -18,14 +18,12 @@ PageError.displayName = "PageError"; PageError.propTypes = { message: PropTypes.object.isRequired, open: PropTypes.bool, - indent: PropTypes.number.isRequired, timestampsVisible: PropTypes.bool.isRequired, serviceContainer: PropTypes.object, }; PageError.defaultProps = { open: false, - indent: 0, }; function PageError(props) { @@ -34,11 +32,11 @@ function PageError(props) { message, open, serviceContainer, - indent, timestampsVisible, } = props; const { id: messageId, + indent, source, type, level, diff --git a/devtools/client/webconsole/new-console-output/test/components/console-api-call.test.js b/devtools/client/webconsole/new-console-output/test/components/console-api-call.test.js index 9b22a71f99b5..afbd8b8e95ec 100644 --- a/devtools/client/webconsole/new-console-output/test/components/console-api-call.test.js +++ b/devtools/client/webconsole/new-console-output/test/components/console-api-call.test.js @@ -86,7 +86,10 @@ describe("ConsoleAPICall component:", () => { const message = stubPreparedMessages.get("console.log('foobar', 'test')"); const indent = 10; - let wrapper = render(ConsoleApiCall({ message, serviceContainer, indent })); + let wrapper = render(ConsoleApiCall({ + message: Object.assign({}, message, {indent}), + serviceContainer + })); expect(wrapper.find(".indent").prop("style").width) .toBe(`${indent * INDENT_WIDTH}px`); diff --git a/devtools/client/webconsole/new-console-output/test/components/evaluation-result.test.js b/devtools/client/webconsole/new-console-output/test/components/evaluation-result.test.js index 000324577ac5..cb517f358b6f 100644 --- a/devtools/client/webconsole/new-console-output/test/components/evaluation-result.test.js +++ b/devtools/client/webconsole/new-console-output/test/components/evaluation-result.test.js @@ -81,7 +81,9 @@ describe("EvaluationResult component:", () => { const message = stubPreparedMessages.get("new Date(0)"); const indent = 10; - let wrapper = render(EvaluationResult({ message, indent})); + let wrapper = render(EvaluationResult({ + message: Object.assign({}, message, {indent}), + })); expect(wrapper.find(".indent").prop("style").width) .toBe(`${indent * INDENT_WIDTH}px`); diff --git a/devtools/client/webconsole/new-console-output/test/components/network-event-message.test.js b/devtools/client/webconsole/new-console-output/test/components/network-event-message.test.js index 526253666207..960574169b1b 100644 --- a/devtools/client/webconsole/new-console-output/test/components/network-event-message.test.js +++ b/devtools/client/webconsole/new-console-output/test/components/network-event-message.test.js @@ -57,7 +57,10 @@ describe("NetworkEventMessage component:", () => { const message = stubPreparedMessages.get("GET request"); const indent = 10; - let wrapper = render(NetworkEventMessage({ message, serviceContainer, indent})); + let wrapper = render(NetworkEventMessage({ + message: Object.assign({}, message, {indent}), + serviceContainer + })); expect(wrapper.find(".indent").prop("style").width) .toBe(`${indent * INDENT_WIDTH}px`); diff --git a/devtools/client/webconsole/new-console-output/test/components/page-error.test.js b/devtools/client/webconsole/new-console-output/test/components/page-error.test.js index d85f9920614e..1b7c6b37dffa 100644 --- a/devtools/client/webconsole/new-console-output/test/components/page-error.test.js +++ b/devtools/client/webconsole/new-console-output/test/components/page-error.test.js @@ -142,7 +142,10 @@ describe("PageError component:", () => { it("has the expected indent", () => { const message = stubPreparedMessages.get("ReferenceError: asdf is not defined"); const indent = 10; - let wrapper = render(PageError({ message, serviceContainer, indent})); + let wrapper = render(PageError({ + message: Object.assign({}, message, {indent}), + serviceContainer + })); expect(wrapper.find(".indent").prop("style").width) .toBe(`${indent * INDENT_WIDTH}px`);