Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: tracing/tracing/value/ui/histogram_set_table_row_state_test.html

Issue 2771723003: [tracing] Move math utilities from base into their own subdirectory (attempt 2) (Closed)
Patch Set: rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright 2017 The Chromium Authors. All rights reserved. 3 Copyright 2017 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be 4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file. 5 found in the LICENSE file.
6 --> 6 -->
7 7
8 <link rel="import" href="/tracing/value/ui/histogram_set_table_row_state.html"> 8 <link rel="import" href="/tracing/value/ui/histogram_set_table_row_state.html">
9 9
10 <script> 10 <script>
11 'use strict'; 11 'use strict';
12 12
13 tr.b.unittest.testSuite(function() { 13 tr.b.unittest.testSuite(function() {
14 test('serialization', function() { 14 test('serialization', function() {
15 const rowState = new tr.v.ui.HistogramSetTableRowState(); 15 const rowState = new tr.v.ui.HistogramSetTableRowState();
16 rowState.expanded = true; 16 rowState.expanded = true;
17 rowState.overviewChart = true; 17 rowState.overviewChart = true;
18 const cellState = new tr.v.ui.HistogramSetTableCellState(); 18 const cellState = new tr.v.ui.HistogramSetTableCellState();
19 rowState.cells.set('A', cellState); 19 rowState.cells.set('A', cellState);
20 cellState.isOpen = true; 20 cellState.isOpen = true;
21 cellState.brushedBinRange = tr.b.Range.fromExplicitRange(2, 4); 21 cellState.brushedBinRange = tr.b.math.Range.fromExplicitRange(2, 4);
22 cellState.mergeSampleDiagnostics = false; 22 cellState.mergeSampleDiagnostics = false;
23 23
24 const clone = rowState.clone(); 24 const clone = rowState.clone();
25 assert.isTrue(clone.expanded); 25 assert.isTrue(clone.expanded);
26 assert.isTrue(clone.overviewChart); 26 assert.isTrue(clone.overviewChart);
27 assert.isTrue(clone.cells.get('A').isOpen); 27 assert.isTrue(clone.cells.get('A').isOpen);
28 assert.strictEqual(2, clone.cells.get('A').brushedBinRange.min); 28 assert.strictEqual(2, clone.cells.get('A').brushedBinRange.min);
29 assert.strictEqual(4, clone.cells.get('A').brushedBinRange.max); 29 assert.strictEqual(4, clone.cells.get('A').brushedBinRange.max);
30 assert.isFalse(clone.cells.get('A').mergeSampleDiagnostics); 30 assert.isFalse(clone.cells.get('A').mergeSampleDiagnostics);
31 }); 31 });
32 }); 32 });
33 </script> 33 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/value/ui/histogram_set_table_row_state.html ('k') | tracing/tracing/value/ui/histogram_set_table_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698