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

Side by Side Diff: tracing/tracing/model/power_series_test.html

Issue 2162963002: [polymer] Merge of master into polymer10-migration (Closed) Base URL: git@github.com:catapult-project/catapult.git@polymer10-migration
Patch Set: Merge polymer10-migration int polymer10-merge Created 4 years, 5 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
« no previous file with comments | « tracing/tracing/model/power_series.html ('k') | tracing/tracing/model/process.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright (c) 2015 The Chromium Authors. All rights reserved. 3 Copyright (c) 2015 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be 4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file. 5 found in the LICENSE file.
6 --> 6 -->
7 7
8 <link rel="import" href="/tracing/model/device.html"> 8 <link rel="import" href="/tracing/model/device.html">
9 <link rel="import" href="/tracing/model/model.html"> 9 <link rel="import" href="/tracing/model/model.html">
10 <link rel="import" href="/tracing/model/power_series.html"> 10 <link rel="import" href="/tracing/model/power_series.html">
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 assert.equal(series.bounds.min, 0); 122 assert.equal(series.bounds.min, 0);
123 assert.equal(series.bounds.max, 1); 123 assert.equal(series.bounds.max, 1);
124 124
125 series.addPowerSample(4, 3); 125 series.addPowerSample(4, 3);
126 series.updateBounds(); 126 series.updateBounds();
127 127
128 assert.equal(series.bounds.min, 0); 128 assert.equal(series.bounds.min, 0);
129 assert.equal(series.bounds.max, 4); 129 assert.equal(series.bounds.max, 4);
130 }); 130 });
131 131
132 test('iterateAllEventsInThisContainer', function() { 132 test('childEvents_empty', function() {
133 var series = new PowerSeries(new Model().device); 133 var series = new PowerSeries(new Model().device);
134 var eventsInSeries = [];
135 for (var event of series.childEvents())
136 eventsInSeries.push(event);
137 assert.deepEqual(eventsInSeries, []);
138 });
134 139
135 var eventsInSeries = []; 140 test('childEvents_nonempty', function() {
136 series.iterateAllEventsInThisContainer( 141 var series = new PowerSeries(new Model().device);
137 function() { return true; },
138 function(event) {
139 eventsInSeries.push(event);
140 });
141
142 assert.deepEqual(eventsInSeries, []);
143
144 var sample1 = series.addPowerSample(0, 1); 142 var sample1 = series.addPowerSample(0, 1);
145 var sample2 = series.addPowerSample(1, 2); 143 var sample2 = series.addPowerSample(1, 2);
146 144 var eventsInSeries = [];
147 eventsInSeries = []; 145 for (var event of series.childEvents())
148 series.iterateAllEventsInThisContainer( 146 eventsInSeries.push(event);
149 function() { return true; },
150 function(event) {
151 eventsInSeries.push(event);
152 });
153
154 assert.deepEqual(eventsInSeries, [sample1, sample2]); 147 assert.deepEqual(eventsInSeries, [sample1, sample2]);
155 }); 148 });
156 }); 149 });
157 </script> 150 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/model/power_series.html ('k') | tracing/tracing/model/process.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698