<!doctype html>
<!--
Copyright 2015 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="/tracing/core/test_utils.html">

<link rel="import" href="/dashboard/elements/chart-legend.html">
<link rel="import" href="/dashboard/static/testing_common.html">

<script>
'use strict';

tr.b.unittest.testSuite(function() {

  var testOptions = {
    setUp: function() {
      var SERIES_GROUP_LIST = [
          {
              'path': 'mymaster/linux/mybenchmark/foo',
              'tests': [
                  {
                      'name': 'foo',
                      'path': 'mymaster/linux/mybenchmark/foo',
                      'direction': 'Lower',
                      'units': 'ms',
                      'description': 'Foo',
                      'color': 'rgb(200,200,0)',
                      'index': 0,
                      'important': true,
                      'selected': true,
                      'hidden': false
                  },
                  {
                      'name': 'sub-foo',
                      'path': 'mymaster/linux/mybenchmark/foo/sub-foo',
                      'direction': 'Lower',
                      'units': 'ms',
                      'description': 'A subtest of foo',
                      'color': 'rgb(0,200,200)',
                      'index': 1,
                      'important': false,
                      'selected': false,
                      'hidden': true
                  }
              ],
              'collapse': true,
              'numHidden': 1
          }
      ];
    },

    tearDown: function() {
    }
  };

  function createBasicLegend() {
    var legend = document.createElement('chart-legend');
    legend.seriesGroupList = SERIES_GROUP_LIST;
    legend.indicesToGraph = [0];
    return legend;
  }

  test('instantiate_basic', function() {
    var legend = createBasicLegend();
    this.addHTMLOutput(legend);
  }, testOptions);

});
</script>

Add instantiation test for chart-legend.
Add instantiation test for chart-legend.

BUG=#1674

Review URL: https://codereview.chromium.org/1414493005
