blob: 3a037d741ea2b8cedabace8e5fb474cbe028a2fa [file] [log] [blame]
Chris Craikbeca7ae2015-04-07 13:29:55 -07001<!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/multi_thread_slice_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 newSliceEx = tv.c.test_utils.newSliceEx;
18
19 test('instantiate', function() {
20 var model = new tv.c.TraceModel();
21 var t53 = model.getOrCreateProcess(52).getOrCreateThread(53);
22 t53.sliceGroup.pushSlice(
23 newSliceEx({title: 'a', start: 0.0, duration: 0.5}));
24 t53.sliceGroup.pushSlice(
25 newSliceEx({title: 'b', start: 1.0, duration: 2}));
26 t53.sliceGroup.createSubSlices();
27
28 var selection = new tv.c.Selection();
29 selection.push(t53.sliceGroup.slices[0]);
30 selection.push(t53.sliceGroup.slices[1]);
31
32 var viewEl = document.createElement('tv-c-a-multi-thread-slice-sub-view');
33 viewEl.selection = selection;
34 this.addHTMLOutput(viewEl);
35 });
36
37});
38</script>