Upstream version 11.39.266.0
[platform/framework/web/crosswalk.git] / src / third_party / trace-viewer / third_party / tvcm / src / tvcm / ui / bar_chart_test.html
1 <!DOCTYPE html>
2 <!--
3 Copyright (c) 2014 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file.
6 -->
7 <link rel="import" href="/tvcm/ui/bar_chart.html">
8 <script>
9 'use strict';
10
11 tvcm.unittest.testSuite(function() {
12   test('singleSeries', function() {
13     var chart = new tvcm.ui.BarChart();
14     chart.width = 400;
15     chart.height = 200;
16     chart.chartTitle = 'Chart title';
17     var data = [
18       {label: 'a', value: 100},
19       {label: 'b', value: 40},
20       {label: 'c', value: 20}
21     ];
22     chart.setDataAndXLabelKey(data, 'label');
23     this.addHTMLOutput(chart);
24   });
25
26   test('twoSeries', function() {
27     var chart = new tvcm.ui.BarChart();
28     chart.width = 400;
29     chart.height = 200;
30     chart.chartTitle = 'Chart title';
31     var data = [
32       {label: 'a', value1: 100, value2: 50},
33       {label: 'b', value1: 75, value2: 10},
34       {label: 'c', value1: 50, value2: 125}
35     ];
36     chart.setDataAndXLabelKey(data, 'label');
37     this.addHTMLOutput(chart);
38   });
39 });
40 </script>