Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(475)

Side by Side Diff: test/inspector/runtime/evaluate-with-generate-preview.js

Issue 2767323002: [inspector] better isArrayLike for injected-script-source.js (Closed)
Patch Set: length on array should be own property Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 ]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698