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

Unified Diff: tracing/tracing/base/iteration_helpers_test.html

Issue 2955043002: Remove tr.b.asArray. (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « tracing/tracing/base/iteration_helpers.html ('k') | tracing/tracing/base/multi_dimensional_view_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/base/iteration_helpers_test.html
diff --git a/tracing/tracing/base/iteration_helpers_test.html b/tracing/tracing/base/iteration_helpers_test.html
index 5d90b20497245061c23d4766aedaa28268bc1428..39f704d38cdb8cf69a83997092e65dfe25793e9d 100644
--- a/tracing/tracing/base/iteration_helpers_test.html
+++ b/tracing/tracing/base/iteration_helpers_test.html
@@ -11,7 +11,6 @@ found in the LICENSE file.
tr.b.unittest.testSuite(function() {
const comparePossiblyUndefinedValues = tr.b.comparePossiblyUndefinedValues;
const compareArrays = tr.b.compareArrays;
- const asArray = tr.b.asArray;
const getOnlyElement = tr.b.getOnlyElement;
const getFirstElement = tr.b.getFirstElement;
@@ -23,19 +22,6 @@ tr.b.unittest.testSuite(function() {
assert.isFalse(tr.b.setsEqual(new Set(['a']), new Set(['b'])));
});
- test('asArray_indexed', function() {
- assert.deepEqual(asArray({'0': 2, '1': 4, '2': 6, 'length': 3}), [2, 4, 6]);
- });
-
- test('asArray_iterable', function() {
- function* iterfunc() {
- yield 2;
- yield 4;
- yield 6;
- }
- assert.deepEqual(asArray({[Symbol.iterator]: iterfunc}), [2, 4, 6]);
- });
-
test('comparePossiblyUndefinedValues', function() {
function cmp(x, y) {
assert.isDefined(x);
@@ -212,9 +198,9 @@ tr.b.unittest.testSuite(function() {
];
const dict = tr.b.invertArrayOfDicts(array);
assert.sameMembers(Object.keys(dict), ['a', 'b', 'c']);
- assert.deepEqual(tr.b.asArray(dict.a), [6, undefined, 4, undefined]);
- assert.deepEqual(tr.b.asArray(dict.b), [5, undefined, 3, 1]);
- assert.deepEqual(tr.b.asArray(dict.c), [undefined, undefined, 2, 0]);
+ assert.deepEqual(Array.from(dict.a), [6, undefined, 4, undefined]);
+ assert.deepEqual(Array.from(dict.b), [5, undefined, 3, 1]);
+ assert.deepEqual(Array.from(dict.c), [undefined, undefined, 2, 0]);
});
test('invertArrayOfDicts_customGetter', function() {
@@ -234,11 +220,11 @@ tr.b.unittest.testSuite(function() {
}, fakeThis);
assert.sameMembers(Object.keys(dict), ['a', 'b', 'c']);
assert.deepEqual(
- tr.b.asArray(dict.a), ['test', undefined, undefined, 42]);
+ Array.from(dict.a), ['test', undefined, undefined, 42]);
assert.deepEqual(
- tr.b.asArray(dict.b), [true, undefined, undefined, undefined]);
+ Array.from(dict.b), [true, undefined, undefined, undefined]);
assert.deepEqual(
- tr.b.asArray(dict.c), [undefined, undefined, undefined, false]);
+ Array.from(dict.c), [undefined, undefined, undefined, false]);
});
test('arrayToDict', function() {
« no previous file with comments | « tracing/tracing/base/iteration_helpers.html ('k') | tracing/tracing/base/multi_dimensional_view_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698