blob: ac38ff1dd5f56fafa7335a8dcbc4cf0beb29c667 [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/analysis_view.html">
<link rel="import" href="/core/test_utils.html">
<link rel="import" href="/core/selection.html">
<link rel="import" href="/model/model.html">
<script>
'use strict';
tr.b.unittest.testSuite(function() {
var Model = tr.Model;
var Selection = tr.c.Selection;
test('analyzeSelectionWithSingleEvent', function() {
var model = new Model();
var p52 = model.getOrCreateProcess(52);
var t53 = p52.getOrCreateThread(53);
var ie1 = new tr.model.ProcessInstantEvent('cat', 'title', 7, 10, {});
var ie2 = new tr.model.ProcessInstantEvent('cat', 'title', 7, 20, {});
p52.instantEvents.push(ie1);
p52.instantEvents.push(ie2);
var selection = new Selection();
selection.push(ie1);
selection.push(ie2);
assert.equal(selection.length, 2);
var subView = document.createElement('tr-c-a-multi-instant-event-sub-view');
subView.selection = selection;
this.addHTMLOutput(subView);
});
});
</script>