blob: 71c856b1b3e1a6f82af4043597ca0b982d45f8a5 [file] [log] [blame]
<!DOCTYPE html>
<!--
Copyright (c) 2014 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/side_panel/side_panel.html">
<link rel="import" href="/extras/side_panel/time_summary_side_panel.html">
<link rel="import" href="/core/side_panel/side_panel_container.html">
<link rel="import" href="/model/model.html">
<script>
'use strict';
tr.b.unittest.testSuite(function() {
function FakeSelectionController() {
this.addAllEventsMatchingFilterToSelectionReturnValue = [];
this.viewport = undefined;
this.model = undefined;
this.selection = new tr.c.Selection();
this.highlight = new tr.c.Selection();
}
FakeSelectionController.prototype = {
addEventListener: function(name, cb) {
}
};
function createModel() {
var m = new tr.Model();
m.importTraces([], false, false, function() {
var browserProcess = m.getOrCreateProcess(1);
var browserMain = browserProcess.getOrCreateThread(2);
browserMain.sliceGroup.beginSlice('cat', 'Task', 0);
browserMain.sliceGroup.endSlice(10);
browserMain.sliceGroup.beginSlice('cat', 'Task', 20);
browserMain.sliceGroup.endSlice(30);
});
return m;
}
test('instantiateCollapsed', function() {
var selectionController = new FakeSelectionController();
selectionController.model = createModel();
var container = document.createElement('tr-c-side-panel-container');
container.selectionController = selectionController;
this.addHTMLOutput(container);
});
});
</script>