blob: fd8e57356a0bd99adeee7a7f42bb8c7530dc5cf7 [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/selection.html">
<link rel="import" href="/core/timeline_track_view.html">
<link rel="import" href="/model/sample.html">
<link rel="import" href="/model/stack_frame.html">
<link rel="import" href="/core/tracks/sample_track.html">
'use strict';
tr.b.unittest.testSuite(function() {
var Selection = tr.c.Selection;
var SampleTrack = tr.c.tracks.SampleTrack;
var Sample = tr.model.Sample;
var StackFrame = tr.model.StackFrame;
test('modelMapping', function() {
var track = new SampleTrack(new tr.c.TimelineViewport());
var fA = new StackFrame(undefined, 1, 'cat', 'a', 7);
var sample = new Sample(undefined, undefined, 'instructions_retired',
10, fA, 10);
track.samples = [sample];
var me0 = track.rects[0].modelItem;
assert.equal(me0, sample);