blob: 7669ca286cdf2cab9a9a2a9078443755befc6bb5 [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/single_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.createSubSlices();
25
26 var selection = new tv.c.Selection();
27 selection.push(t53.sliceGroup.slices[0]);
28
29 var viewEl = document.createElement('tv-c-a-single-thread-slice-sub-view');
30 viewEl.selection = selection;
31 this.addHTMLOutput(viewEl);
32 });
33
34});
35</script>