Upstream version 9.37.197.0
[platform/framework/web/crosswalk.git] / src / third_party / trace-viewer / trace_viewer / cc / layer_tree_host_impl_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('cc.layer_tree_host_impl');
8 tvcm.require('tracing.importer.trace_event_importer');
9 tvcm.require('tracing.trace_model');
10 tvcm.requireRawScript('cc/layer_tree_host_impl_test_data.js');
11
12 tvcm.unittest.testSuite('cc.layer_tree_host_impl_test', function() {
13   test('basic', function() {
14     var m = new tracing.TraceModel(g_catLTHIEvents);
15     var p = tvcm.dictionaryValues(m.processes)[0];
16
17     var instance = p.objects.getAllInstancesNamed('cc::LayerTreeHostImpl')[0];
18     var snapshot = instance.snapshots[0];
19
20     assertTrue(snapshot instanceof cc.LayerTreeHostImplSnapshot);
21   });
22 });