Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / trace-viewer / src / tracing / importer / linux_perf / drm_parser_test.js
1 // Copyright (c) 2013 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 tvcm.require('tracing.test_utils');
8 tvcm.require('tracing.importer.linux_perf_importer');
9
10 tvcm.unittest.testSuite('tracing.importer.linux_perf.drm_parser_test', function() { // @suppress longLineCheck
11   test('drmImport', function() {
12     var lines = [
13       ' chrome-2465  [000]    71.653157: drm_vblank_event: crtc=0, seq=4233',
14       ' <idle>-0     [000]    71.669851: drm_vblank_event: crtc=0, seq=4234'
15     ];
16     var m = new tracing.TraceModel(lines.join('\n'), false);
17     assertFalse(m.hasImportWarnings);
18
19     var threads = m.getAllThreads();
20     assertEquals(1, threads.length);
21
22     var vblankThread = threads[0];
23     assertEquals('drm_vblank', vblankThread.name);
24     assertEquals(2, vblankThread.sliceGroup.length);
25   });
26 });