3 Copyright (c) 2013 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file.
8 <link rel="import" href="/cc.html">
9 <link rel="import" href="/cc/picture.html">
10 <link rel="import" href="/tracing/importer/trace_event_importer.html">
11 <link rel="import" href="/tracing/trace_model.html">
13 <script src="/cc/layer_tree_host_impl_test_data.js"></script>
18 tvcm.unittest.testSuite(function() {
19 test('basic', function() {
20 var m = new tracing.TraceModel(g_catLTHIEvents);
21 var p = tvcm.dictionaryValues(m.processes)[0];
23 var instance = p.objects.getAllInstancesNamed('cc::Picture')[0];
24 var snapshot = instance.snapshots[0];
26 assertTrue(snapshot instanceof cc.PictureSnapshot);
27 instance.wasDeleted(150);
30 test('getOps', function() {
31 var m = new tracing.TraceModel(g_catLTHIEvents);
32 var p = tvcm.dictionaryValues(m.processes)[0];
34 var instance = p.objects.getAllInstancesNamed('cc::Picture')[0];
35 var snapshot = instance.snapshots[0];
37 var ops = snapshot.getOps();
40 assertEquals(142, ops.length);
43 assertEquals('Save', op0.cmd_string);
44 assertTrue(op0.info instanceof Array);