console.clear() clears the console regardless of the Preserve log flag.
Reported by
ahmadbam...@gmail.com,
Jun 21 2017
|
||||||
Issue descriptionUserAgent: 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.
,
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"
,
Jun 29 2017
,
Jun 29 2017
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..!!
,
Jun 29 2017
,
Jul 5 2017
Looks very-well scoped, over to Erik. Also, let's disable console.clear from iframes altogether as a drive-by?
,
Jul 19 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bc0bb7cc655ccb4c1eb7ece209e82bc806de71cf commit bc0bb7cc655ccb4c1eb7ece209e82bc806de71cf Author: luoe <luoe@chromium.org> Date: Wed Jul 19 07:39:59 2017 DevTools: do not clear console when preserving log The 'console.clear()' will not clear the console when 'Preserve log' is enabled. BUG= 735440 Review-Url: https://codereview.chromium.org/2970313002 Cr-Commit-Position: refs/heads/master@{#487782} [modify] https://crrev.com/bc0bb7cc655ccb4c1eb7ece209e82bc806de71cf/third_party/WebKit/LayoutTests/inspector/console/console-clear-function-expected.txt [modify] https://crrev.com/bc0bb7cc655ccb4c1eb7ece209e82bc806de71cf/third_party/WebKit/LayoutTests/inspector/console/console-clear-function.html [modify] https://crrev.com/bc0bb7cc655ccb4c1eb7ece209e82bc806de71cf/third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js [modify] https://crrev.com/bc0bb7cc655ccb4c1eb7ece209e82bc806de71cf/third_party/WebKit/Source/devtools/front_end/console_model/ConsoleModel.js
,
Jul 20 2017
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 Deleted