New issue
Advanced search Search tips

Issue 735440 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

console.clear() clears the console regardless of the Preserve log flag.

Reported by ahmadbam...@gmail.com, Jun 21 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36

Steps to reproduce the problem:
1. check the `Preserve log` checkbox 
2. run `console.clear()` in the console or in the loaded code
3. console gets cleared

What is the expected behavior?
calling `console.clear()` in javascript will not clear the console when the `Preserve log` checkbox is checked.

What went wrong?
according to the documentation

> if the Preserve log checkbox is enabled, console.clear() is disabled.

this is a very neat feature, however it does not work, console.clear() always clears the console regardless of the preserve log checkbox status.

Did this work before? N/A 

Chrome version: 58.0.3029.110  Channel: n/a
OS Version: OS X 10.12.5
Flash Version: 

source:
https://developers.google.com/web/tools/chrome-devtools/console/console-reference
"console.clear()" section.
 

Comment 1 Deleted

Comment 2 by woxxom@gmail.com, Jun 21 2017

Repro:
1. open devtools console and enable [x] preserve log
2. type 1+1 and press Enter
3. type console.clear() and press Enter
EXPECTED: previous output including 1+1 and its result 2 are visible
OBSERVED: previous output is deleted

Bisect: 405552 (good) - 405561 (bad)
https://chromium.googlesource.com/chromium/src/+log/f1689c8b..11468876?pretty=fuller
Suspecting r405559 "[DevTools] Remove Console.messagesCleared event"
Labels: Needs-Milestone
Cc: mmanchala@chromium.org
Labels: -Type-Bug -Pri-2 -Needs-Milestone M-61 OS-Linux OS-Windows Pri-1 Type-Bug-Regression
Owner: dgozman@chromium.org
Status: Assigned (was: Unconfirmed)
Able to reproduce the issue on Windows-7,Windows-10,Mac-10.12.4 and Linux Ubuntu-14.04 using chrome stable version 59.0.3071.115  and canary 61.0.3143.0 with the steps mentioned in comment#0

As per comment #2 
Good Build Revision: 405552 
Bad Build Revision : 405561

CHANGE-LOG URL:
---------------
https://chromium.googlesource.com/chromium/src/+log/f1689c8b..11468876?pretty=fuller

Suspecting https://codereview.chromium.org/2146163002 from changelog

@dgozman: Could you please take a look into this issue and reassign if this issue is not related to your change.

Thanks..!!
Cc: dgozman@chromium.org
Owner: kozyatinskiy@chromium.org
Owner: l...@chromium.org
Looks very-well scoped, over to Erik. Also, let's disable console.clear from iframes altogether as a drive-by?

Comment 8 by l...@chromium.org, Jul 20 2017

Status: Fixed (was: Assigned)

Sign in to add a comment