blob: ce9166c69af690d5039c8c43d1b85b56aa1db302 [file] [log] [blame]
Chris Craik93216d02015-03-05 13:58:42 -08001<!DOCTYPE html>
2<!--
3Copyright (c) 2013 The Chromium Authors. All rights reserved.
4Use of this source code is governed by a BSD-style license that can be
5found 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
16tv.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>