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

Side by Side Diff: test/inspector/runtime/length-or-size-description.js

Issue 2521853003: Re-land of Use parenthesis in descriptions for array/map/set lengths/sizes (Closed)
Patch Set: ac Created 4 years 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 2016 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("Test that descriptions for arrays, maps, and sets include the correct len gth or size.")
6
7 testExpression("new Set()")
kozy 2016/11/23 18:49:10 V8 run microtasks in the scheduled first - run fir
luoe 2016/11/23 19:23:31 Done.
8 .then(() => testExpression("new Set([1,2])"))
9 .then(() => testExpression("new Map()"))
10 .then(() => testExpression("new Map([[1,2],[3,4]])"))
11 .then(() => testExpression("new Array()"))
12 .then(() => testExpression("new Array(2)"))
13 .then(() => testExpression("new Uint8Array()"))
14 .then(() => testExpression("new Uint8Array(2)"))
15 .then(() => InspectorTest.completeTest());
16
17 function testExpression(expression) {
18 return Protocol.Runtime.evaluate({ expression: expression })
19 .then(result => InspectorTest.logMessage(result.result.result.descri ption))
20 .then(() => Protocol.Runtime.evaluate({ expression: "[" + expression + "]", generatePreview: true }))
21 .then(result => InspectorTest.logMessage(result.result.result.previe w.properties[0].value))
22 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698