| 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 internal [[Entries]] in Runtime.getProperties output'); | 5 InspectorTest.log('Checks internal [[Entries]] in Runtime.getProperties output')
; |
| 6 | 6 |
| 7 Protocol.Runtime.enable(); | 7 Protocol.Runtime.enable(); |
| 8 | 8 |
| 9 InspectorTest.runTestSuite([ | 9 InspectorTest.runTestSuite([ |
| 10 function maps(next) { | 10 function maps(next) { |
| 11 checkExpression('new Map([[1,2],[3,4]])') | 11 checkExpression('new Map([[1,2],[3,4]])') |
| 12 .then(() => checkExpression('new Map()')) | 12 .then(() => checkExpression('new Map()')) |
| 13 .then(next); | 13 .then(next); |
| 14 }, | 14 }, |
| 15 | 15 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 var entriesObjectId; | 56 var entriesObjectId; |
| 57 return Protocol.Runtime.evaluate({ expression: expression }) | 57 return Protocol.Runtime.evaluate({ expression: expression }) |
| 58 .then(message => Protocol.Runtime.getProperties({ objectId: message.result.r
esult.objectId })) | 58 .then(message => Protocol.Runtime.getProperties({ objectId: message.result.r
esult.objectId })) |
| 59 .then(message => message.result.internalProperties.filter(p => p.name === '[
[Entries]]')[0]) | 59 .then(message => message.result.internalProperties.filter(p => p.name === '[
[Entries]]')[0]) |
| 60 .then(entries => entriesObjectId = entries.value.objectId) | 60 .then(entries => entriesObjectId = entries.value.objectId) |
| 61 .then(() => Protocol.Runtime.callFunctionOn({ objectId: entriesObjectId, fun
ctionDeclaration: 'function f() { return this; }', returnByValue: true })) | 61 .then(() => Protocol.Runtime.callFunctionOn({ objectId: entriesObjectId, fun
ctionDeclaration: 'function f() { return this; }', returnByValue: true })) |
| 62 .then(message => InspectorTest.logMessage(message.result.result.value)) | 62 .then(message => InspectorTest.logMessage(message.result.result.value)) |
| 63 .then(() => Protocol.Runtime.getProperties({ objectId: entriesObjectId, ownP
roperties: true })) | 63 .then(() => Protocol.Runtime.getProperties({ objectId: entriesObjectId, ownP
roperties: true })) |
| 64 .then(message => InspectorTest.logMessage(message)); | 64 .then(message => InspectorTest.logMessage(message)); |
| 65 } | 65 } |
| OLD | NEW |