console.count() default parameters exhibit odd behavior |
|||
Issue description
Chrome Version : 56.0.2924.87
URLs (if applicable) :
Other browsers tested:
Add OK or FAIL, along with the version, after other browsers where you
have tested this issue:
Safari: FAIL
Firefox: FAIL
Edge: OK
IE: N/A
What steps will reproduce the problem?
(1) [OPTIONAL] Read up on the issue https://github.com/whatwg/console/issues/88
(2) Open up DevTools on any page
(3) Run:
console.count()
console.count(undefined)
console.count("default")
or equally, the code in this bin: https://jsbin.com/leduripolo/1/edit?js,console
What is the expected result?
The expected result is:
> default: 1
> default: 2
> default: 3
namely that all three calls increment the same internal counter.
What happens instead?
Instead, the default parameter defined in console IDL (https://console.spec.whatwg.org/#console-namespace) does not behave properly and the output is:
> : 1
> undefined: 1
> default: 1
The spec just changed (the day this issue was opened) to have count()'s default parameter equal to the string "default" instead of "", but even before the spec change console.count(undefined) for some reason converted undefined => "undefined" instead of using the default parameter.
Please provide any additional information below. Attach a screenshot if
possible.
This is somewhat related to https://bugs.chromium.org/p/chromium/issues/detail?id=696798.
,
Mar 17 2017
,
Nov 30 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/135e5a98873351552d01931c97f03046fc7a566a commit 135e5a98873351552d01931c97f03046fc7a566a Author: Erik Luo <luoe@chromium.org> Date: Thu Nov 30 20:51:06 2017 Skip tests for console.time/count related V8 changes Bug: 700624 , 727514 Change-Id: I54f08aa19e76f505303b9314fa56d7deb3fcb348 Reviewed-on: https://chromium-review.googlesource.com/794490 Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org> Commit-Queue: Erik Luo <luoe@chromium.org> Cr-Commit-Position: refs/heads/master@{#520672} [modify] https://crrev.com/135e5a98873351552d01931c97f03046fc7a566a/third_party/WebKit/LayoutTests/TestExpectations
,
Dec 1 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4a7469f71620aa241876bed601f931fcdbbec87e commit 4a7469f71620aa241876bed601f931fcdbbec87e Author: Erik Luo <luoe@chromium.org> Date: Fri Dec 01 03:47:32 2017 Skip another virtual test for V8 changes to console Also add rebased expectations in CL for reviewers. Bug: 700624 , 727514 Change-Id: I25b4194786b234f36618feac3df708253a5efde9 Reviewed-on: https://chromium-review.googlesource.com/802461 Reviewed-by: Andrey Kosyakov <caseq@chromium.org> Commit-Queue: Erik Luo <luoe@chromium.org> Cr-Commit-Position: refs/heads/master@{#520843} [modify] https://crrev.com/4a7469f71620aa241876bed601f931fcdbbec87e/third_party/WebKit/LayoutTests/TestExpectations [modify] https://crrev.com/4a7469f71620aa241876bed601f931fcdbbec87e/third_party/WebKit/LayoutTests/http/tests/devtools/console/console-tests-expected.txt [modify] https://crrev.com/4a7469f71620aa241876bed601f931fcdbbec87e/third_party/WebKit/LayoutTests/http/tests/devtools/tracing/console-timeline-expected.txt
,
Dec 1 2017
The following revision refers to this bug: https://chromium.googlesource.com/v8/v8.git/+/d9806cec94d78a5b95333d1930721967f22d22c0 commit d9806cec94d78a5b95333d1930721967f22d22c0 Author: Erik Luo <luoe@chromium.org> Date: Fri Dec 01 20:17:20 2017 DevTools: also use default label for console.count Aligns console.count() behavior with spec, which says the default label should be "default" when the label provided is not defined. Bug: chromium:700624 Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel Change-Id: Ie58af210d300ef3151082b23187dd18e356f5de8 Reviewed-on: https://chromium-review.googlesource.com/780620 Commit-Queue: Erik Luo <luoe@chromium.org> Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org> Cr-Commit-Position: refs/heads/master@{#49804} [modify] https://crrev.com/d9806cec94d78a5b95333d1930721967f22d22c0/src/inspector/v8-console.cc [modify] https://crrev.com/d9806cec94d78a5b95333d1930721967f22d22c0/test/inspector/runtime/console-methods-expected.txt [modify] https://crrev.com/d9806cec94d78a5b95333d1930721967f22d22c0/test/inspector/runtime/console-methods.js [modify] https://crrev.com/d9806cec94d78a5b95333d1930721967f22d22c0/test/inspector/runtime/regression-736302-expected.txt
,
Dec 4 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/449d25524a82d1d93999ed2dcf5dbb3e2e926080 commit 449d25524a82d1d93999ed2dcf5dbb3e2e926080 Author: Erik Luo <luoe@chromium.org> Date: Mon Dec 04 19:51:53 2017 DevTools: rebase expectations after V8 console time/count changes Relevant V8 CLs have landed in this autoroll: https://chromium-review.googlesource.com/c/chromium/src/+/805157 Bug: 700624 , 727514 Change-Id: I73392015ee47bb79499cc7ee8b447673c00387da Reviewed-on: https://chromium-review.googlesource.com/806258 Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org> Commit-Queue: Erik Luo <luoe@chromium.org> Cr-Commit-Position: refs/heads/master@{#521418} [modify] https://crrev.com/449d25524a82d1d93999ed2dcf5dbb3e2e926080/third_party/WebKit/LayoutTests/TestExpectations
,
Dec 4 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by krajshree@chromium.org
, Mar 14 2017Labels: -Pri-3 M-59 OS-Linux OS-Mac OS-Windows Pri-2
Status: Untriaged (was: Unconfirmed)