Home | History | Annotate | Download | only in cc
      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 base.require('cc.layer_tree_host_impl');
      8 base.require('cc.layer_tree_host_impl_view');
      9 base.require('tracing.importer.trace_event_importer');
     10 base.require('tracing.trace_model');
     11 base.require('cc.layer_tree_host_impl_test_data');
     12 
     13 base.unittest.testSuite('cc.layer_tree_host_impl_view', function() {
     14   test('instantiate', function() {
     15     var m = new tracing.TraceModel(g_catLTHIEvents);
     16     var p = base.dictionaryValues(m.processes)[0];
     17 
     18     var instance = p.objects.getAllInstancesNamed('cc::LayerTreeHostImpl')[0];
     19     var snapshot = instance.snapshots[0];
     20 
     21     var view = new cc.LayerTreeHostImplSnapshotView();
     22     view.style.width = '800px';
     23     view.style.height = '400px';
     24     view.objectSnapshot = snapshot;
     25 
     26     this.addHTMLOutput(view);
     27   });
     28 });
     29