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 InspectorTest.addScript(` | 5 InspectorTest.addScript(` |
6 var self = this; | 6 var self = this; |
7 function checkPrototype() { | 7 function checkPrototype() { |
8 const prototype1 = Object.getPrototypeOf(console); | 8 const prototype1 = Object.getPrototypeOf(console); |
9 const prototype2 = Object.getPrototypeOf(prototype1); | 9 const prototype2 = Object.getPrototypeOf(prototype1); |
10 if (Object.getOwnPropertyNames(prototype1).length !== 0) | 10 if (Object.getOwnPropertyNames(prototype1).length !== 0) |
(...skipping 29 matching lines...) Expand all Loading... |
40 async function prototypeChainMustBeCorrect() { | 40 async function prototypeChainMustBeCorrect() { |
41 let message = await Protocol.Runtime.evaluate({ | 41 let message = await Protocol.Runtime.evaluate({ |
42 expression: "checkPrototype()", returnByValue: true }); | 42 expression: "checkPrototype()", returnByValue: true }); |
43 InspectorTest.log(message.result.result.value); | 43 InspectorTest.log(message.result.result.value); |
44 }, | 44 }, |
45 | 45 |
46 async function consoleToString() { | 46 async function consoleToString() { |
47 let message = await Protocol.Runtime.evaluate({ | 47 let message = await Protocol.Runtime.evaluate({ |
48 expression: 'console.toString()', returnByValue: true}) | 48 expression: 'console.toString()', returnByValue: true}) |
49 InspectorTest.log(message.result.result.value); | 49 InspectorTest.log(message.result.result.value); |
| 50 }, |
| 51 |
| 52 async function consoleMethodPropertyDescriptor() { |
| 53 let message = await Protocol.Runtime.evaluate({ |
| 54 expression: 'Object.getOwnPropertyDescriptor(console, \'log\')', |
| 55 returnByValue: true}); |
| 56 InspectorTest.logObject(message.result.result.value); |
50 } | 57 } |
51 ]); | 58 ]); |
OLD | NEW |