Chromium Code Reviews| 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..6467e144ed4665bd9e2488f20a9441fdbdbf090f 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,16 @@ 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")); |
|
jbates
2012/04/20 22:05:06
nit: 80 chars
|
| + |
| } |
| function testShrinkingSliceSizes() { |
| @@ -192,7 +189,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 +216,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) { |