| 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/core/test_utils.html"> | 8 <link rel="import" href="/tracing/core/test_utils.html"> |
| 9 <link rel="import" href="/tracing/extras/chrome/cc/layer_tree_host_impl.html"> | 9 <link rel="import" href="/tracing/extras/chrome/cc/layer_tree_host_impl.html"> |
| 10 <link rel="import" href="/tracing/extras/chrome/cc/raster_task.html"> |
| 10 <link rel="import" href="/tracing/extras/importer/trace_event_importer.html"> | 11 <link rel="import" href="/tracing/extras/importer/trace_event_importer.html"> |
| 11 <link rel="import" href="/tracing/extras/chrome/cc/raster_task.html"> | |
| 12 <link rel="import" href="/tracing/model/model.html"> | 12 <link rel="import" href="/tracing/model/model.html"> |
| 13 <link rel="import" href="/tracing/ui/extras/chrome/cc/layer_tree_host_impl_view.
html"> | 13 <link rel="import" href="/tracing/ui/extras/chrome/cc/layer_tree_host_impl_view.
html"> |
| 14 | 14 |
| 15 <script src="/tracing/extras/chrome/cc/layer_tree_host_impl_test_data.js"> | 15 <script src="/tracing/extras/chrome/cc/layer_tree_host_impl_test_data.js"> |
| 16 </script> | 16 </script> |
| 17 | 17 |
| 18 <script> | 18 <script> |
| 19 'use strict'; | 19 'use strict'; |
| 20 | 20 |
| 21 tr.b.unittest.testSuite(function() { | 21 tr.b.unittest.testSuite(function() { |
| 22 test('instantiate', function() { | 22 test('instantiate', function() { |
| 23 var m = tr.c.TestUtils.newModelWithEvents([g_catLTHIEvents]); | 23 var m = tr.c.TestUtils.newModelWithEvents([g_catLTHIEvents]); |
| 24 var p = tr.b.dictionaryValues(m.processes)[0]; | 24 var p = tr.b.dictionaryValues(m.processes)[0]; |
| 25 | 25 |
| 26 var instance = p.objects.getAllInstancesNamed('cc::LayerTreeHostImpl')[0]; | 26 var instance = p.objects.getAllInstancesNamed('cc::LayerTreeHostImpl')[0]; |
| 27 var snapshot = instance.snapshots[0]; | 27 var snapshot = instance.snapshots[0]; |
| 28 | 28 |
| 29 var view = new tr.ui.e.chrome.cc.LayerTreeHostImplSnapshotView(); | 29 var view = new tr.ui.e.chrome.cc.LayerTreeHostImplSnapshotView(); |
| 30 view.style.width = '900px'; | 30 view.style.width = '900px'; |
| 31 view.style.height = '400px'; | 31 view.style.height = '400px'; |
| 32 view.objectSnapshot = snapshot; | 32 view.objectSnapshot = snapshot; |
| 33 | 33 |
| 34 this.addHTMLOutput(view); | 34 this.addHTMLOutput(view); |
| 35 }); | 35 }); |
| 36 }); | 36 }); |
| 37 </script> | 37 </script> |
| OLD | NEW |