| Index: chrome/browser/resources/tracing/timeline_track_test.html
|
| diff --git a/chrome/browser/resources/tracing/timeline_track_test.html b/chrome/browser/resources/tracing/timeline_track_test.html
|
| index 6a8fb9986c12cc52003603bea379db7d85f1ad23..855b0349e2d2a03571f78297d27e840845ded77e 100644
|
| --- a/chrome/browser/resources/tracing/timeline_track_test.html
|
| +++ b/chrome/browser/resources/tracing/timeline_track_test.html
|
| @@ -40,6 +40,8 @@ found in the LICENSE file.
|
| <script>
|
| </script>
|
| <script>
|
| + 'use strict';
|
| +
|
| var TimelineAsyncSlice = tracing.TimelineAsyncSlice;
|
| var TimelineAsyncSliceGroup = tracing.TimelineAsyncSliceGroup;
|
| var TimelineCounter = tracing.TimelineCounter;
|
| @@ -89,21 +91,19 @@ found in the LICENSE file.
|
| track.clientWidth / (1.1 * track.slices[track.slices.length - 1].end));
|
| }
|
|
|
| - function testBasicSlicesWithAsyncFlag() {
|
| - var testEl = getTestDiv('testBasicSlicesWithAsyncFlag');
|
| + function testFindAllObjectsMatchingInSliceTrack() {
|
| var track = TimelineSliceTrack();
|
| - testEl.appendChild(track);
|
| - track.asyncStyle = true;
|
| - track.heading = 'testBasicSlices+AsyncFlag';
|
| track.slices = [
|
| new TimelineSlice('a', 0, 1, {}, 1),
|
| new TimelineSlice('b', 1, 2.1, {}, 4.8),
|
| new TimelineSlice('b', 1, 7, {}, 0.5),
|
| new TimelineSlice('c', 2, 7.6, {}, 0.4)
|
| ];
|
| - track.viewport = new TimelineViewport(testEl);
|
| - track.viewport.setPanAndScale(0,
|
| - track.clientWidth / (1.1 * track.slices[track.slices.length - 1].end));
|
| + var hits = track.findAllObjectsMatchingFilter(
|
| + new tracing.TimelineFilter("b"));
|
| + assertEquals(2, hits.length);
|
| + assertEquals(track.slices[1], hits[0].slice);
|
| + assertEquals(track.slices[2], hits[1].slice);
|
| }
|
|
|
| function testShrinkingSliceSizes() {
|
| @@ -192,7 +192,6 @@ found in the LICENSE file.
|
|
|
| var ctr = new TimelineCounter(undefined,
|
| 'testBasicCounter', 'testBasicCounter');
|
| - ctr.numSeries = 1;
|
| ctr.seriesNames = ['value1', 'value2'];
|
| ctr.seriesColors = [tracing.getStringColorId('testBasicCounter.value1'),
|
| tracing.getStringColorId('testBasicCounter.value2')];
|
| @@ -220,8 +219,8 @@ found in the LICENSE file.
|
| function testElideVisualInspection() {
|
| var optDicts = [{ trackName: 'elideOff', elide: false },
|
| { trackName: 'elideOn', elide: true }];
|
| - for (dictIndex in optDicts) {
|
| - dict = optDicts[dictIndex];
|
| + for (var dictIndex in optDicts) {
|
| + var dict = optDicts[dictIndex];
|
| var testEl = getTestDiv(dict.trackName);
|
| var track = TimelineSliceTrack();
|
| if (dict.elide) {
|
|
|