1 <!DOCTYPE html> 2 <!-- 3 Copyright (c) 2013 The Chromium Authors. All rights reserved. 4 Use of this source code is governed by a BSD-style license that can be 5 found in the LICENSE file. 6 --> 7 8 <link rel="import" href="/tracing/model/event_set.html"> 9 <link rel="import" href="/tracing/model/slice.html"> 10 <link rel="import" href="/tracing/ui/timeline_track_view.html"> 11 <link rel="import" href="/tracing/ui/tracks/slice_track.html"> 12 13 <script> 14 'use strict'; 15 16 tr.b.unittest.testSuite(function() { 17 var SliceTrack = tr.ui.tracks.SliceTrack; 18 var Slice = tr.model.Slice; 19 20 test('modelMapping', function() { 21 var track = new SliceTrack(new tr.ui.TimelineViewport()); 22 var slice = new Slice('', 'a', 0, 1, {}, 1); 23 track.slices = [slice]; 24 var me0 = track.rects[0].modelItem; 25 assert.equal(slice, me0); 26 }); 27 }); 28 </script> 29 30