blob: eeef68624eb3ef9d5386ef1c30c0150aeab746a1 [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/importer/trace_event_importer.html">
<link rel="import" href="/model/event_set.html">
<link rel="import" href="/model/model.html">
<link rel="import" href="/ui/extras/chrome/cc/raster_task_selection.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.model.EventSet();
selection.push(rasterTasks[0]);
selection.push(rasterTasks[1]);
assert.isTrue(tr.ui.e.chrome.cc.RasterTaskSelection.supports(selection));
var selection = new tr.ui.e.chrome.cc.RasterTaskSelection(selection);
var highlights = selection.extraHighlightsByLayerId;
assert.equal(tr.b.dictionaryLength(highlights), 1);
});
});
</script>