Closed Bug 576962 Opened 14 years ago Closed 14 years ago

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

Categories

(DevTools :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: julian.viereck, Assigned: julian.viereck)

References

Details

Attachments

(1 file, 3 obsolete files)

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.
Attached patch Patch including unit tests. (obsolete) — Splinter Review
Assignee: nobody → jviereck
Status: NEW → ASSIGNED
Attachment #456042 - Flags: review?(ddahl)
Required patch for running later unit tests.
Attachment #456042 - Attachment is obsolete: true
Attachment #456042 - Flags: review?(ddahl)
Attached patch Final Patch (obsolete) — Splinter Review
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
(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...
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
Depends on: 579073
Whiteboard: checkin-needed
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
Closed: 14 years ago
Resolution: --- → FIXED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: