OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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.log("Tests that Runtime.evaluate will generate correct previews.")
; | 5 InspectorTest.log("Tests that Runtime.evaluate will generate correct previews.")
; |
6 | 6 |
7 InspectorTest.addScript( | 7 InspectorTest.addScript( |
8 ` | 8 ` |
9 var f1 = function(){}; | 9 var f1 = function(){}; |
10 | 10 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 mixedSet.add(i); | 55 mixedSet.add(i); |
56 } | 56 } |
57 | 57 |
58 var deterministicNativeFunction = Math.log; | 58 var deterministicNativeFunction = Math.log; |
59 var parentObj = {}; | 59 var parentObj = {}; |
60 Object.defineProperty(parentObj, 'propNotNamedProto', { | 60 Object.defineProperty(parentObj, 'propNotNamedProto', { |
61 get: deterministicNativeFunction, | 61 get: deterministicNativeFunction, |
62 set: function() {} | 62 set: function() {} |
63 }); | 63 }); |
64 var objInheritsGetterProperty = {__proto__: parentObj}; | 64 var objInheritsGetterProperty = {__proto__: parentObj}; |
65 allowAccessorFormatting(objInheritsGetterProperty); | 65 inspector.allowAccessorFormatting(objInheritsGetterProperty); |
66 `); | 66 `); |
67 | 67 |
68 InspectorTest.setupInjectedScriptEnvironment(); | 68 InspectorTest.setupInjectedScriptEnvironment(); |
69 | 69 |
70 InspectorTest.runTestSuite([ | 70 InspectorTest.runTestSuite([ |
71 function testObjectPropertiesPreview(next) | 71 function testObjectPropertiesPreview(next) |
72 { | 72 { |
73 Protocol.Runtime.evaluate({ "expression": "obj", "generatePreview": true }) | 73 Protocol.Runtime.evaluate({ "expression": "obj", "generatePreview": true }) |
74 .then(result => InspectorTest.logMessage(result.result.result.preview)) | 74 .then(result => InspectorTest.logMessage(result.result.result.preview)) |
75 .then(next); | 75 .then(next); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 .then(next); | 138 .then(next); |
139 }, | 139 }, |
140 | 140 |
141 function testObjWithArrayAsProto(next) | 141 function testObjWithArrayAsProto(next) |
142 { | 142 { |
143 Protocol.Runtime.evaluate({ "expression": "Object.create([1,2])", "generateP
review": true }) | 143 Protocol.Runtime.evaluate({ "expression": "Object.create([1,2])", "generateP
review": true }) |
144 .then(result => InspectorTest.logMessage(result.result.result.preview)) | 144 .then(result => InspectorTest.logMessage(result.result.result.preview)) |
145 .then(next); | 145 .then(next); |
146 } | 146 } |
147 ]); | 147 ]); |
OLD | NEW |