• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE html>
2<html>
3<!--
4Copyright (c) 2012 The Chromium Authors. All rights reserved.
5Use of this source code is governed by a BSD-style license that can be
6found in the LICENSE file.
7-->
8<head>
9<title>LinuxPerfDrmParser tests</title>
10<script src="base.js"></script>
11</head>
12<body>
13<script>
14  'use strict';
15
16  base.require('unittest');
17  base.require('test_utils');
18  base.require('linux_perf_importer');
19
20  function testDrmImport() {
21    var lines = [
22      '          chrome-2465  [000]    71.653157: drm_vblank_event: ' +
23                 'crtc=0, seq=4233',
24      '          <idle>-0     [000]    71.669851: drm_vblank_event: ' +
25                 'crtc=0, seq=4234'
26    ];
27    var m = new tracing.TimelineModel(lines.join('\n'), false);
28    assertEquals(0, m.importErrors.length);
29
30    var threads = m.getAllThreads();
31    assertEquals(1, threads.length);
32
33    var vblankThread = threads[0];
34    assertEquals('drm_vblank', vblankThread.name);
35    assertEquals(2, vblankThread.slices.length);
36  }
37
38</script>
39</body>
40</html>
41