| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <!-- | 2 <!-- |
| 3 Copyright (c) 2013 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2013 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/base/task.html"> | 8 <link rel="import" href="/tracing/base/task.html"> |
| 9 <link rel="import" href="/tracing/core/test_utils.html"> | 9 <link rel="import" href="/tracing/core/test_utils.html"> |
| 10 <link rel="import" href="/tracing/model/event_set.html"> | 10 <link rel="import" href="/tracing/model/event_set.html"> |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 const controller = timeline.findCtl_.controller; | 276 const controller = timeline.findCtl_.controller; |
| 277 | 277 |
| 278 // Test find with no filterText. | 278 // Test find with no filterText. |
| 279 controller.findNext(); | 279 controller.findNext(); |
| 280 | 280 |
| 281 // Test find with filter txt. | 281 // Test find with filter txt. |
| 282 return new Promise(function(resolve, reject) { | 282 return new Promise(function(resolve, reject) { |
| 283 controller.startFiltering('a').then(function() { | 283 controller.startFiltering('a').then(function() { |
| 284 try { | 284 try { |
| 285 assert.strictEqual(brushingStateController.selection.length, 0); | 285 assert.strictEqual(brushingStateController.selection.length, 0); |
| 286 assert.deepEqual(tr.b.asArray(brushingStateController.findMatches), | 286 assert.deepEqual(Array.from(brushingStateController.findMatches), |
| 287 model.t1.sliceGroup.slices); | 287 model.t1.sliceGroup.slices); |
| 288 | 288 |
| 289 controller.findNext(); | 289 controller.findNext(); |
| 290 assert.isTrue(brushingStateController.selection.equals( | 290 assert.isTrue(brushingStateController.selection.equals( |
| 291 new tr.model.EventSet(model.t1.sliceGroup.slices[0]))); | 291 new tr.model.EventSet(model.t1.sliceGroup.slices[0]))); |
| 292 | 292 |
| 293 controller.startFiltering('xxx').then(function() { | 293 controller.startFiltering('xxx').then(function() { |
| 294 try { | 294 try { |
| 295 assert.strictEqual(brushingStateController.findMatches.length, 0); | 295 assert.strictEqual(brushingStateController.findMatches.length, 0); |
| 296 assert.strictEqual(brushingStateController.selection.length, 1); | 296 assert.strictEqual(brushingStateController.selection.length, 1); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 findTextChangedToCalled = true; | 357 findTextChangedToCalled = true; |
| 358 }; | 358 }; |
| 359 brushingStateController.findTextCleared = function() { | 359 brushingStateController.findTextCleared = function() { |
| 360 assert.strictEqual(findTextChangedToCalled, true); | 360 assert.strictEqual(findTextChangedToCalled, true); |
| 361 }; | 361 }; |
| 362 controller.startFiltering('1'); | 362 controller.startFiltering('1'); |
| 363 controller.startFiltering(''); | 363 controller.startFiltering(''); |
| 364 }); | 364 }); |
| 365 }); | 365 }); |
| 366 </script> | 366 </script> |
| OLD | NEW |