console log/info etc. does handle multiple arguments + newline (\n)

RESOLVED FIXED

Status

()

Firefox
Developer Tools
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: Julian Viereck, Assigned: Julian Viereck)

Tracking

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 3 obsolete attachments)

(Assignee)

Description

7 years ago
The console functions like console.log or console.info can take more then one argument. Also, a string passed to these functions containing a newline character (\n) should cause a new line in the console output.

This is not supported yet.
(Assignee)

Comment 1

7 years ago
Created attachment 456042 [details] [diff] [review]
Patch including unit tests.
Assignee: nobody → jviereck
Status: NEW → ASSIGNED
Attachment #456042 - Flags: review?(ddahl)
(Assignee)

Comment 2

7 years ago
Created attachment 457546 [details] [diff] [review]
added a jsterm property on the HeadsUpDisplay

Required patch for running later unit tests.
Attachment #456042 - Attachment is obsolete: true
Attachment #456042 - Flags: review?(ddahl)
(Assignee)

Comment 3

7 years ago
Created attachment 457547 [details] [diff] [review]
Final Patch
Attachment #457547 - Flags: review?(dietrich)
Comment on attachment 457547 [details] [diff] [review]
Final Patch


>+  let HUD = HUDService.hudWeakReferences[hudId].get();
>+  let jsterm = HUD.jsterm;
>+  let outputLogNode = jsterm.outputNode;
>+  ok(/foo bar/.test(outputLogNode.childNodes[0].childNodes[0].nodeValue),
>+                                              "Emitted both console arguments");

wonky indent.

r=me otherwise.
Attachment #457547 - Flags: review?(dietrich) → review+
OS: Mac OS X → All
Hardware: x86 → All
Version: unspecified → Trunk
(Assignee)

Comment 5

7 years ago
(In reply to comment #4)
> Comment on attachment 457547 [details] [diff] [review]

> >+  ok(/foo bar/.test(outputLogNode.childNodes[0].childNodes[0].nodeValue),
> >+                                              "Emitted both console arguments");
> 
> wonky indent.
> 
> r=me otherwise.

What is the right version?

  ok(/foo bar/.test(outputLogNode.childNodes[0].childNodes[0].nodeValue),
     "Emitted both console arguments");

indent to the open bracket ?
yeah, or even just a single indent...
(Assignee)

Comment 7

7 years ago
Created attachment 457669 [details] [diff] [review]
[checked-in] Final Patch v2

Same as 457547 but fixed indention as required by reviewer.

Note: needs patch from bug 579073 applied.
Attachment #457546 - Attachment is obsolete: true
Attachment #457547 - Attachment is obsolete: true
(Assignee)

Updated

7 years ago
Depends on: 579073
Whiteboard: checkin-needed
(Assignee)

Updated

7 years ago
Blocks: 578943
Comment on attachment 457669 [details] [diff] [review]
[checked-in] Final Patch v2

changeset:   47817:f120e7e60a16
user:        Julian Viereck <jviereck@mozilla.com>
date:        Fri Jul 16 12:00:53 2010 -0300
summary:     bug 576962 - console log/info etc. does handle multiple arguments + newline, r=dietrich
Attachment #457669 - Attachment description: Final Patch v2 → [checked-in] Final Patch v2
Whiteboard: checkin-needed
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
(Assignee)

Updated

7 years ago
Duplicate of this bug: 576523
You need to log in before you can comment on or make changes to this bug.