blob: a2d3d4c144ed6546220eea64703ce2b305172b3f [file] [log] [blame]
<!DOCTYPE html>
<!--
Copyright (c) 2013 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<link rel="import" href="/core/analysis/multi_async_slice_sub_view.html">
<link rel="import" href="/core/test_utils.html">
<link rel="import" href="/core/selection.html">
<link rel="import" href="/core/trace_model/trace_model.html">
<script>
'use strict';
tv.b.unittest.testSuite(function() {
var newAsyncSliceEx = tv.c.test_utils.newAsyncSliceEx;
test('instantiate', function() {
var model = new tv.c.TraceModel();
var p1 = model.getOrCreateProcess(1);
var t1 = p1.getOrCreateThread(1);
t1.asyncSliceGroup.push(newAsyncSliceEx({
title: 'a',
start: 10,
end: 20,
startThread: t1,
endThread: t1
}));
t1.asyncSliceGroup.push(newAsyncSliceEx({
title: 'b',
start: 25,
end: 40,
startThread: t1,
endThread: t1
}));
var selection = new tv.c.Selection();
selection.push(t1.asyncSliceGroup.slices[0]);
selection.push(t1.asyncSliceGroup.slices[1]);
var viewEl = document.createElement('tv-c-a-multi-async-slice-sub-view');
viewEl.selection = selection;
this.addHTMLOutput(viewEl);
});
});
</script>