1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 Copyright (c) 2012 The Chromium Authors. All rights reserved. 5 Use of this source code is governed by a BSD-style license that can be 6 found in the LICENSE file. 7 --> 8 <head i18n-values="dir:textdirection;"> 9 <title>Track tests</title> 10 <style> 11 .container { 12 border: 1px solid red; 13 } 14 </style> 15 <script src="/src/base.js"></script> 16 <script> 17 base.require('unittest'); 18 base.require('test_utils'); 19 base.require('timeline_viewport'); 20 base.require('tracks.ruler_track'); 21 </script> 22 </head> 23 <body> 24 <script> 25 'use strict'; 26 27 var Viewport = tracing.TimelineViewport; 28 var RulerTrack = tracing.tracks.RulerTrack; 29 30 function testViewport() { 31 var testEl = this.addHTMLOutput(); 32 33 var track = RulerTrack(); 34 testEl.appendChild(track); 35 track.viewport = new Viewport(testEl); 36 track.viewport.setPanAndScale(0, 37 track.clientWidth / 1000); 38 } 39 </script> 40 </body> 41 </html> 42