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

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

Issue 2705533002: [inspector] remove iterators and for...of loops from injected-script-source (Closed)
Patch Set: ac Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: test/inspector/runtime/evaluate-with-generate-preview.js
diff --git a/test/inspector/runtime/evaluate-with-generate-preview.js b/test/inspector/runtime/evaluate-with-generate-preview.js
index 972e97fd7f4ff8c4c7cf890ac96f8b3954af09d1..b572189f6582fb805554a756ffe6942a470e2fb7 100644
--- a/test/inspector/runtime/evaluate-with-generate-preview.js
+++ b/test/inspector/runtime/evaluate-with-generate-preview.js
@@ -43,6 +43,26 @@ var inheritingObj = {};
var inheritingArr = [];
inheritingObj.prototype = obj;
inheritingArr.prototype = arr;
+
+var shortTypedArray = new Uint8Array(3);
+var longTypedArray = new Uint8Array(500001);
+var set = new Set([1, 2, 3]);
+var bigSet = new Set();
+var mixedSet = new Set();
+for (var i = 0; i < 10; i++) {
+ bigSet.add(i);
+ mixedSet["_prop_" + i] = 1;
+ mixedSet.add(i);
+}
+
+var deterministicNativeFunction = Math.log;
+var parentObj = {};
+Object.defineProperty(parentObj, 'propNotNamedProto', {
+ get: deterministicNativeFunction,
+ set: function() {}
+});
+var objInheritsGetterProperty = {__proto__: parentObj};
+allowAccessorFormatting(objInheritsGetterProperty);
`);
InspectorTest.runTestSuite([
@@ -72,5 +92,47 @@ InspectorTest.runTestSuite([
Protocol.Runtime.evaluate({ "expression": "inheritingArr", "generatePreview": true })
.then(result => InspectorTest.logMessage(result.result.result.preview))
.then(next);
+ },
+
+ function testShortTypedArrayPropertiesPreview(next)
+ {
+ Protocol.Runtime.evaluate({ "expression": "shortTypedArray", "generatePreview": true })
+ .then(result => InspectorTest.logMessage(result.result.result.preview))
+ .then(next);
+ },
+
+ function testLongTypedArrayPropertiesPreview(next)
+ {
+ Protocol.Runtime.evaluate({ "expression": "longTypedArray", "generatePreview": true })
+ .then(result => InspectorTest.logMessage(result.result.result.preview))
+ .then(next);
+ },
+
+ function testSetPropertiesPreview(next)
+ {
+ Protocol.Runtime.evaluate({ "expression": "set", "generatePreview": true })
+ .then(result => InspectorTest.logMessage(result.result.result.preview))
+ .then(next);
+ },
+
+ function testBigSetPropertiesPreview(next)
+ {
+ Protocol.Runtime.evaluate({ "expression": "bigSet", "generatePreview": true })
+ .then(result => InspectorTest.logMessage(result.result.result.preview))
+ .then(next);
+ },
+
+ function testMixedSetPropertiesPreview(next)
+ {
+ Protocol.Runtime.evaluate({ "expression": "mixedSet", "generatePreview": true })
+ .then(result => InspectorTest.logMessage(result.result.result.preview))
+ .then(next);
+ },
+
+ function testObjInheritsGetterProperty(next)
+ {
+ Protocol.Runtime.evaluate({ "expression": "objInheritsGetterProperty", "generatePreview": true })
+ .then(result => InspectorTest.logMessage(result.result.result.preview))
+ .then(next);
}
]);
« no previous file with comments | « test/inspector/inspector-test.cc ('k') | test/inspector/runtime/evaluate-with-generate-preview-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698