1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
7 tvcm.require('tracing.analysis.default_object_view');
8 tvcm.require('tracing.selection');
9 tvcm.require('tracing.trace_model.object_instance');
11 tvcm.unittest.testSuite('tracing.analysis.default_object_view_test', function() { // @suppress longLineCheck
12 test('instantiate_snapshotView', function() {
13 var i10 = new tracing.trace_model.ObjectInstance(
14 {}, '0x1000', 'cat', 'name', 10);
15 var s10 = i10.addSnapshot(10, {foo: 1});
18 var view = new tracing.analysis.DefaultObjectSnapshotView();
19 view.objectSnapshot = s10;
20 this.addHTMLOutput(view);
23 test('instantiate_instanceView', function() {
24 var i10 = new tracing.trace_model.ObjectInstance(
25 {}, '0x1000', 'cat', 'name', 10);
26 var s10 = i10.addSnapshot(10, {foo: 1});
27 var s20 = i10.addSnapshot(20, {foo: 2});
30 var view = new tracing.analysis.DefaultObjectInstanceView();
31 view.objectInstance = i10;
32 this.addHTMLOutput(view);