| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 InspectorTest.log('Checks console.memory'); | |
| 6 | |
| 7 InspectorTest.runAsyncTestSuite([ | |
| 8 async function testWithoutMemory() { | |
| 9 InspectorTest.logMessage( | |
| 10 await Protocol.Runtime.evaluate({expression: 'console.memory'})); | |
| 11 }, | |
| 12 | |
| 13 async function testSetterInStrictMode() { | |
| 14 // crbug.com/468611 | |
| 15 InspectorTest.logMessage( | |
| 16 await Protocol.Runtime.evaluate({ | |
| 17 expression: '"use strict"\nconsole.memory = {};undefined' })); | |
| 18 }, | |
| 19 | |
| 20 async function testWithMemory() { | |
| 21 utils.setMemoryInfoForTest(239); | |
| 22 InspectorTest.logMessage( | |
| 23 await Protocol.Runtime.evaluate({expression: 'console.memory'})); | |
| 24 }, | |
| 25 | |
| 26 async function testSetterDoesntOverride() { | |
| 27 utils.setMemoryInfoForTest(42); | |
| 28 await Protocol.Runtime.evaluate({expression: 'console.memory = 0'}); | |
| 29 InspectorTest.logMessage( | |
| 30 await Protocol.Runtime.evaluate({expression: 'console.memory'})); | |
| 31 } | |
| 32 ]); | |
| OLD | NEW |