New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 748729 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Email to this user bounced
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Console pretty prints a single empty element as "empty x 1"

Project Member Reported by eostroukhov@chromium.org, Jul 25 2017

Issue description

This is really minor, but typing expression "[1,,2]" in console outputs [1, empty x 1, 2]

IMHO, this is not tidy. it should simply print "empty", without the multiplicator
 

Comment 1 by l...@chromium.org, Jul 25 2017

Thanks for the report, sounds good to me, as we do this correctly in a lot of other places in DT UI.

Comment 2 by varkor@google.com, Jul 26 2017

Could I fix this issue to get acquainted with the contribution process for DevTools? I've already made the fix in a local branch.

Comment 3 by varkor@google.com, Jul 26 2017

Here is my CL to fix this bug: https://chromium-review.googlesource.com/c/586227/
Project Member

Comment 4 by bugdroid1@chromium.org, Jul 27 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f32a30eecec0bc4702ce20fb36ed704f94a42270

commit f32a30eecec0bc4702ce20fb36ed704f94a42270
Author: Nathanael Alcock <varkor@google.com>
Date: Thu Jul 27 23:33:34 2017

DevTools: Pretty print single empty array element without a quantity

When pretty-printing an array in the console, if there is a single empty
element only, it is no longer displayed with ' × 1' appended.
Bug:748729.

Change-Id: I22013662f9e49786dbf3570c5a40794db8cd2bf5
Reviewed-on: https://chromium-review.googlesource.com/586227
Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
Reviewed-by: Andrey Kosyakov <caseq@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490106}
[modify] https://crrev.com/f32a30eecec0bc4702ce20fb36ed704f94a42270/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-format-array-prototype-expected.txt
[modify] https://crrev.com/f32a30eecec0bc4702ce20fb36ed704f94a42270/third_party/WebKit/LayoutTests/inspector/console/console-log-object-with-getter-expected.txt
[modify] https://crrev.com/f32a30eecec0bc4702ce20fb36ed704f94a42270/third_party/WebKit/Source/devtools/front_end/object_ui/RemoteObjectPreviewFormatter.js

Comment 5 by l...@chromium.org, Jul 27 2017

Cc: l...@chromium.org
Owner: varkor@google.com
Status: Fixed (was: Assigned)
Thank you for your patch!  Marking as fixed, and re-assigning the true owner :)

Sign in to add a comment