| Index: tracing/tracing/ui/base/bar_chart_test.html
|
| diff --git a/tracing/tracing/ui/base/column_chart_test.html b/tracing/tracing/ui/base/bar_chart_test.html
|
| similarity index 71%
|
| copy from tracing/tracing/ui/base/column_chart_test.html
|
| copy to tracing/tracing/ui/base/bar_chart_test.html
|
| index 2398b3e1cfba92800a2e79e8e06c8673adeaa386..dd790974a54b294f5f91c2ae210136c8bea10d2b 100644
|
| --- a/tracing/tracing/ui/base/column_chart_test.html
|
| +++ b/tracing/tracing/ui/base/bar_chart_test.html
|
| @@ -5,65 +5,15 @@ 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/ui/base/column_chart.html">
|
| +<link rel="import" href="/tracing/ui/base/bar_chart.html">
|
| <link rel="import" href="/tracing/ui/base/deep_utils.html">
|
|
|
| <script>
|
| 'use strict';
|
|
|
| tr.b.unittest.testSuite(function() {
|
| - test('chartLegendKey', function() {
|
| - var key = document.createElement('tr-ui-b-chart-legend-key');
|
| - key.textContent = 'Lorem ipsum dolor sit amet';
|
| - key.color = 'red';
|
| - this.addHTMLOutput(key);
|
| -
|
| - key = document.createElement('tr-ui-b-chart-legend-key');
|
| - key.textContent = 'ipsum dolor sit amet';
|
| - key.target = 'orange ipsum';
|
| - key.color = 'orange';
|
| - this.addHTMLOutput(key);
|
| - key.addEventListener('requestSelectionChange', function(e) {
|
| - console.debug(e);
|
| - });
|
| -
|
| - key = document.createElement('tr-ui-b-chart-legend-key');
|
| - key.target = 'brown dolor';
|
| - key.color = 'brown';
|
| - key.textContent = 'dolor sit amet';
|
| - this.addHTMLOutput(key);
|
| - key.addEventListener('requestSelectionChange', function(e) {
|
| - console.debug(e);
|
| - });
|
| - });
|
| -
|
| - test('instantiation_legendTargets', function() {
|
| - var chart = new tr.ui.b.ColumnChart();
|
| - chart.getDataSeries('lorem_ipsum').target = 'lorem_ipsumTarget';
|
| - chart.getDataSeries('qux').target = 'quxTarget';
|
| - chart.getDataSeries('lorem_ipsum').optional = true;
|
| - chart.getDataSeries('bar').optional = true;
|
| - chart.isStacked = true;
|
| - chart.hideXAxis = true;
|
| - chart.width = 140;
|
| - chart.height = 200;
|
| - chart.chartTitle = 'title';
|
| - chart.data = [{x: 0, foo: 3, lorem_ipsum: 5, bar: 1, qux: 2}];
|
| - this.addHTMLOutput(chart);
|
| - chart.addEventListener('requestSelectionChange', function(e) {
|
| - console.debug(e);
|
| - });
|
| -
|
| - assert.isDefined(tr.b.findDeepElementMatchingPredicate(
|
| - chart, function(element) {
|
| - return element.tagName === 'TR-UI-B-CHART-LEGEND-KEY' &&
|
| - element.textContent === 'lorem_ipsum' &&
|
| - element.target === 'lorem_ipsumTarget';
|
| - }));
|
| - });
|
| -
|
| test('instantiation_singleSeries', function() {
|
| - var chart = new tr.ui.b.ColumnChart();
|
| + var chart = new tr.ui.b.BarChart();
|
| chart.width = 400;
|
| chart.height = 200;
|
| chart.chartTitle = 'Chart title';
|
| @@ -78,7 +28,7 @@ tr.b.unittest.testSuite(function() {
|
| });
|
|
|
| test('instantiation_singleDatum', function() {
|
| - var chart = new tr.ui.b.ColumnChart();
|
| + var chart = new tr.ui.b.BarChart();
|
| chart.width = 400;
|
| chart.height = 200;
|
| chart.chartTitle = 'Chart title';
|
| @@ -90,7 +40,7 @@ tr.b.unittest.testSuite(function() {
|
| });
|
|
|
| test('instantiation_stacked', function() {
|
| - var chart = new tr.ui.b.ColumnChart();
|
| + var chart = new tr.ui.b.BarChart();
|
| chart.isStacked = true;
|
| chart.width = 400;
|
| chart.height = 200;
|
| @@ -106,7 +56,7 @@ tr.b.unittest.testSuite(function() {
|
| });
|
|
|
| test('instantiation_singleSeries_yLogScale', function() {
|
| - var chart = new tr.ui.b.ColumnChart();
|
| + var chart = new tr.ui.b.BarChart();
|
| chart.isYLogScale = true;
|
| chart.width = 400;
|
| chart.height = 200;
|
| @@ -124,14 +74,14 @@ tr.b.unittest.testSuite(function() {
|
| });
|
|
|
| test('undefined', function() {
|
| - var chart = new tr.ui.b.ColumnChart();
|
| + var chart = new tr.ui.b.BarChart();
|
| assert.throws(function() {
|
| chart.data = undefined;
|
| });
|
| });
|
|
|
| test('instantiation_twoSeries', function() {
|
| - var chart = new tr.ui.b.ColumnChart();
|
| + var chart = new tr.ui.b.BarChart();
|
|
|
| chart.width = 400;
|
| chart.height = 200;
|
| @@ -153,7 +103,7 @@ tr.b.unittest.testSuite(function() {
|
| });
|
|
|
| test('instantiation_twoSeries_yLogScale', function() {
|
| - var chart = new tr.ui.b.ColumnChart();
|
| + var chart = new tr.ui.b.BarChart();
|
| chart.isYLogScale = true;
|
| chart.width = 400;
|
| chart.height = 200;
|
| @@ -175,7 +125,7 @@ tr.b.unittest.testSuite(function() {
|
| });
|
|
|
| test('instantiation_twoSparseSeriesWithFirstValueSparse', function() {
|
| - var chart = new tr.ui.b.ColumnChart();
|
| + var chart = new tr.ui.b.BarChart();
|
|
|
| chart.width = 400;
|
| chart.height = 200;
|
| @@ -193,7 +143,7 @@ tr.b.unittest.testSuite(function() {
|
| });
|
|
|
| test('instantiation_twoSparseSeriesWithFirstValueNotSparse', function() {
|
| - var chart = new tr.ui.b.ColumnChart();
|
| + var chart = new tr.ui.b.BarChart();
|
|
|
| chart.width = 400;
|
| chart.height = 200;
|
| @@ -211,7 +161,7 @@ tr.b.unittest.testSuite(function() {
|
| });
|
|
|
| test('brushRangeFromIndices', function() {
|
| - var chart = new tr.ui.b.ColumnChart();
|
| + var chart = new tr.ui.b.BarChart();
|
| var data = [
|
| {x: 10, value: 50},
|
| {x: 30, value: 60},
|
| @@ -242,7 +192,7 @@ tr.b.unittest.testSuite(function() {
|
| });
|
|
|
| test('instantiation_interactiveBrushing', function() {
|
| - var chart = new tr.ui.b.ColumnChart();
|
| + var chart = new tr.ui.b.BarChart();
|
| chart.width = 400;
|
| chart.height = 200;
|
| chart.chartTitle = 'Chart title';
|
|
|