| OLD | NEW |
| 1 // Copyright 2017 the V8 project authors. All rights reserved. | 1 // Copyright 2017 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 print('Checks that console message storage doesn\'t exceed limits'); | 5 InspectorTest.log('Checks that console message storage doesn\'t exceed limits'); |
| 6 | 6 |
| 7 InspectorTest.addScript(` | 7 InspectorTest.addScript(` |
| 8 function generateEmptyMessages(n) { | 8 function generateEmptyMessages(n) { |
| 9 for (var i = 0; i < n; ++i) { | 9 for (var i = 0; i < n; ++i) { |
| 10 console.log(''); | 10 console.log(''); |
| 11 } | 11 } |
| 12 } | 12 } |
| 13 | 13 |
| 14 function generate1MbMessages(n) { | 14 function generate1MbMessages(n) { |
| 15 for (var i = 0; i < n; ++i) { | 15 for (var i = 0; i < n; ++i) { |
| (...skipping 19 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 function testMaxConsoleMessagesV8Size(next) { | 36 function testMaxConsoleMessagesV8Size(next) { |
| 37 messagesReported = 0; | 37 messagesReported = 0; |
| 38 Protocol.Runtime.evaluate({ expression: 'generate1MbMessages(11)'}) | 38 Protocol.Runtime.evaluate({ expression: 'generate1MbMessages(11)'}) |
| 39 .then(() => Protocol.Runtime.enable()) | 39 .then(() => Protocol.Runtime.enable()) |
| 40 .then(() => Protocol.Runtime.disable()) | 40 .then(() => Protocol.Runtime.disable()) |
| 41 .then(() => InspectorTest.log(`Messages reported: ${messagesReported}`)) | 41 .then(() => InspectorTest.log(`Messages reported: ${messagesReported}`)) |
| 42 .then(next); | 42 .then(next); |
| 43 } | 43 } |
| 44 ]); | 44 ]); |
| OLD | NEW |