Chris Craik | 93216d0 | 2015-03-05 13:58:42 -0800 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <!-- |
| 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 |
| 5 | found in the LICENSE file. |
| 6 | --> |
| 7 | |
| 8 | <link rel="import" href="/core/analysis/single_object_snapshot_sub_view.html"> |
| 9 | <link rel="import" href="/core/test_utils.html"> |
| 10 | <link rel="import" href="/core/selection.html"> |
| 11 | <link rel="import" href="/core/trace_model/trace_model.html"> |
| 12 | |
| 13 | <script> |
| 14 | 'use strict'; |
| 15 | |
| 16 | tv.b.unittest.testSuite(function() { |
| 17 | var TraceModel = tv.c.TraceModel; |
| 18 | var Selection = tv.c.Selection; |
| 19 | var ObjectInstance = tv.c.trace_model.ObjectInstance; |
| 20 | |
| 21 | test('instantiate_snapshotView', function() { |
| 22 | var i10 = new tv.c.trace_model.ObjectInstance( |
| 23 | {}, '0x1000', 'cat', 'name', 10); |
| 24 | var s10 = i10.addSnapshot(10, {foo: 1}); |
| 25 | i10.updateBounds(); |
| 26 | |
| 27 | var selection = new Selection(); |
| 28 | selection.push(s10); |
| 29 | |
| 30 | var view = document.createElement('tv-c-single-object-snapshot-sub-view'); |
| 31 | view.selection = selection; |
| 32 | this.addHTMLOutput(view); |
| 33 | }); |
| 34 | }); |
| 35 | </script> |