eb8e83b8d6b22a1f4a5ec54aa511ad260073fecc
[platform/framework/web/crosswalk.git] / src / third_party / trace-viewer / trace_viewer / tracing / analysis / default_object_view_test.html
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="/tracing/analysis/default_object_view.html">
9 <link rel="import" href="/tracing/selection.html">
10 <link rel="import" href="/tracing/trace_model/object_instance.html">
11
12 <script>
13 'use strict';
14
15 tvcm.unittest.testSuite(function() { // @suppress longLineCheck
16   test('instantiate_snapshotView', function() {
17     var i10 = new tracing.trace_model.ObjectInstance(
18         {}, '0x1000', 'cat', 'name', 10);
19     var s10 = i10.addSnapshot(10, {foo: 1});
20     i10.updateBounds();
21
22     var view = new tracing.analysis.DefaultObjectSnapshotView();
23     view.objectSnapshot = s10;
24     this.addHTMLOutput(view);
25   });
26
27   test('instantiate_instanceView', function() {
28     var i10 = new tracing.trace_model.ObjectInstance(
29         {}, '0x1000', 'cat', 'name', 10);
30     var s10 = i10.addSnapshot(10, {foo: 1});
31     var s20 = i10.addSnapshot(20, {foo: 2});
32     i10.updateBounds();
33
34     var view = new tracing.analysis.DefaultObjectInstanceView();
35     view.objectInstance = i10;
36     this.addHTMLOutput(view);
37   });
38 });
39 </script>