Home | History | Annotate | Download | only in tracks
      1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 'use strict';
      6 
      7 base.require('tracing.test_utils');
      8 base.require('tracing.timeline_viewport');
      9 base.require('tracing.tracks.drawing_container');
     10 base.require('tracing.tracks.ruler_track');
     11 
     12 base.unittest.testSuite('tracing.tracks.ruler_track', function() {
     13   test('instantiate', function() {
     14     var div = document.createElement('div');
     15     this.addHTMLOutput(div);
     16 
     17     var viewport = new tracing.TimelineViewport(div);
     18     var drawingContainer = new tracing.tracks.DrawingContainer(viewport);
     19     div.appendChild(drawingContainer);
     20 
     21     var track = tracing.tracks.RulerTrack(viewport);
     22     drawingContainer.appendChild(track);
     23     drawingContainer.invalidate();
     24 
     25     track.viewport.setPanAndScale(0, track.clientWidth / 1000);
     26   });
     27 });
     28