blob: 3beea7f0fc45aa277606249b9d46b748e1931b77 [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="/core/trace_model/trace_model.html">
<script>
'use strict';
tv.b.unittest.testSuite(function() {
var TraceModel = tv.c.TraceModel;
var Selection = tv.c.Selection;
var GlobalMemoryDump = tv.c.trace_model.GlobalMemoryDump;
test('basic', function() {
var m = new tv.c.TraceModel();
function addGlobalMemoryDump(timestamp) {
var gmd = new GlobalMemoryDump(m, timestamp);
m.globalMemoryDumps.push(gmd);
return gmd;
}
var d1 = addGlobalMemoryDump(5);
var d2 = addGlobalMemoryDump(20);
var selection = new Selection();
selection.push(d1);
selection.push(d2);
assert.equal(selection.length, 2);
var subView = document.createElement(
'tv-c-multi-global-memory-dump-sub-view');
subView.selection = selection;
this.addHTMLOutput(subView);
});
});
</script>