• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
4
5'use strict';
6
7base.require('tracing.analysis.default_object_view');
8base.require('tracing.selection');
9base.require('tracing.trace_model.object_instance');
10
11base.unittest.testSuite('tracing.analysis.default_object_view', function() {
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});
16    i10.updateBounds();
17
18    var view = new tracing.analysis.DefaultObjectSnapshotView();
19    view.objectSnapshot = s10;
20    this.addHTMLOutput(view);
21  });
22
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});
28    i10.updateBounds();
29
30    var view = new tracing.analysis.DefaultObjectInstanceView();
31    view.objectInstance = i10;
32    this.addHTMLOutput(view);
33  });
34});
35