blob: fd491085400c4791c003d03de328ba2fc9d7ed5c [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/chrome/cc/raster_task_selection.html">
<link rel="import" href="/extras/importer/trace_event_importer.html">
<link rel="import" href="/model/model.html">
<script src="/extras/chrome/cc/layer_tree_host_impl_test_data.js"></script>
<script>
'use strict';
tr.b.unittest.testSuite(function() {
test('basic', function() {
var m = new tr.Model(g_catLTHIEvents);
var p = m.processes[1];
var rasterTasks = p.threads[1].sliceGroup.slices.filter(function(slice) {
return slice.title == 'RasterTask';
});
var selection = new tr.c.Selection();
selection.push(rasterTasks[0]);
selection.push(rasterTasks[1]);
assert.isTrue(tr.e.cc.RasterTaskSelection.supports(selection));
var selection = new tr.e.cc.RasterTaskSelection(selection);
var highlights = selection.extraHighlightsByLayerId;
assert.equal(tr.b.dictionaryLength(highlights), 1);
});
});
</script>