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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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 allowAccessorFormatting(objInheritsGetterProperty); |
66 `); | 66 `); |
67 | 67 |
68 InspectorTest.makeContextDirty(); | |
dgozman
2017/03/23 21:10:20
Let's rename this to setupInjectedScriptEnvironmen
kozy
2017/03/24 00:40:37
Done in previous CL.
| |
69 | |
68 InspectorTest.runTestSuite([ | 70 InspectorTest.runTestSuite([ |
69 function testObjectPropertiesPreview(next) | 71 function testObjectPropertiesPreview(next) |
70 { | 72 { |
71 Protocol.Runtime.evaluate({ "expression": "obj", "generatePreview": true }) | 73 Protocol.Runtime.evaluate({ "expression": "obj", "generatePreview": true }) |
72 .then(result => InspectorTest.logMessage(result.result.result.preview)) | 74 .then(result => InspectorTest.logMessage(result.result.result.preview)) |
73 .then(next); | 75 .then(next); |
74 }, | 76 }, |
75 | 77 |
76 function testArrayPropertiesPreview(next) | 78 function testArrayPropertiesPreview(next) |
77 { | 79 { |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
127 Protocol.Runtime.evaluate({ "expression": "mixedSet", "generatePreview": tru e }) | 129 Protocol.Runtime.evaluate({ "expression": "mixedSet", "generatePreview": tru e }) |
128 .then(result => InspectorTest.logMessage(result.result.result.preview)) | 130 .then(result => InspectorTest.logMessage(result.result.result.preview)) |
129 .then(next); | 131 .then(next); |
130 }, | 132 }, |
131 | 133 |
132 function testObjInheritsGetterProperty(next) | 134 function testObjInheritsGetterProperty(next) |
133 { | 135 { |
134 Protocol.Runtime.evaluate({ "expression": "objInheritsGetterProperty", "gene ratePreview": true }) | 136 Protocol.Runtime.evaluate({ "expression": "objInheritsGetterProperty", "gene ratePreview": true }) |
135 .then(result => InspectorTest.logMessage(result.result.result.preview)) | 137 .then(result => InspectorTest.logMessage(result.result.result.preview)) |
136 .then(next); | 138 .then(next); |
139 }, | |
140 | |
141 function testObjWithArrayAsProto(next) | |
142 { | |
143 Protocol.Runtime.evaluate({ "expression": "Object.create([1,2])", "generateP review": true }) | |
144 .then(result => InspectorTest.logMessage(result.result.result.preview)) | |
145 .then(next); | |
137 } | 146 } |
138 ]); | 147 ]); |
OLD | NEW |