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

Side by Side Diff: test/inspector/runtime/internal-properties.js

Issue 2672213002: [inspector] introduced v8::debug::EntriesPreview for inspector (Closed)
Patch Set: addressed comments 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 print('Checks internal properties in Runtime.getProperties output');
6
7 Protocol.Runtime.enable();
8 Protocol.Debugger.enable();
9
10 InspectorTest.runTestSuite([
11 function generatorFunction(next) {
12 checkExpression('(function* foo() { yield 1 })').then(next);
13 },
14
15 function regularFunction(next) {
16 checkExpression('(function foo() {})').then(next);
17 },
18
19 function boxedObjects(next) {
20 checkExpression('new Number(239)')
21 .then(() => checkExpression('new Boolean(false)'))
22 .then(() => checkExpression('new String(\'abc\')'))
23 .then(() => checkExpression('Object(Symbol(42))'))
24 .then(next);
25 },
26
27 function promise(next) {
28 checkExpression('Promise.resolve(42)')
29 .then(() => checkExpression('new Promise(() => undefined)'))
30 .then(next);
31 },
32
33 function generatorObject(next) {
34 checkExpression('(function* foo() { yield 1 })()')
35 .then(next);
36 },
37
38 function iteratorObject(next) {
39 checkExpression('(new Map([[1,2]])).entries()')
40 .then(() => checkExpression('(new Set([[1,2]])).entries()'))
41 .then(next);
42 }
43 ]);
44
45 function checkExpression(expression)
46 {
47 InspectorTest.log(`expression: ${expression}`);
48 return Protocol.Runtime.evaluate({ expression: expression })
49 .then(message => Protocol.Runtime.getProperties({ objectId: message.result.r esult.objectId }))
50 .then(message => { delete message.result.result; return message; })
51 .then(InspectorTest.logMessage);
52 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698