blob: a9181cd0440d97f4b7cd913f840e2674d744857d [file] [log] [blame]
<!DOCTYPE html>
<!--
Copyright (c) 2013 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<link rel="import" href="/base/utils.html">
<link rel="import" href="/extras/cc/raster_task_selection.html">
<link rel="import" href="/extras/importer/trace_event_importer.html">
<link rel="import" href="/core/trace_model/trace_model.html">
<script src="/extras/cc/layer_tree_host_impl_test_data.js"></script>
<script>
'use strict';
tv.b.unittest.testSuite(function() {
test('basic', function() {
var m = new tv.c.TraceModel(g_catLTHIEvents);
var p = m.processes[1];
var rasterTasks = p.threads[1].sliceGroup.slices.filter(function(slice) {
return slice.title == 'RasterTask';
});
var selection = new tv.c.Selection();
selection.push(rasterTasks[0]);
selection.push(rasterTasks[1]);
assert.isTrue(tv.e.cc.RasterTaskSelection.supports(selection));
var selection = new tv.e.cc.RasterTaskSelection(selection);
var highlights = selection.extraHighlightsByLayerId;
assert.equal(tv.b.dictionaryLength(highlights), 1);
});
});
</script>