OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <!-- | 2 <!-- |
3 Copyright 2016 The Chromium Authors. All rights reserved. | 3 Copyright 2016 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/base/assert_utils.html"> | 8 <link rel="import" href="/tracing/base/assert_utils.html"> |
9 <link rel="import" href="/tracing/base/utils.html"> | 9 <link rel="import" href="/tracing/base/utils.html"> |
10 <link rel="import" href="/tracing/ui/base/deep_utils.html"> | 10 <link rel="import" href="/tracing/ui/base/deep_utils.html"> |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 table.fire('click', {}, {node: showOverview}); | 191 table.fire('click', {}, {node: showOverview}); |
192 | 192 |
193 let charts = tr.b.findDeepElementsMatchingPredicate( | 193 let charts = tr.b.findDeepElementsMatchingPredicate( |
194 table, e => ((e.id === 'overview_container') && | 194 table, e => ((e.id === 'overview_container') && |
195 (e.style.display !== 'none'))); | 195 (e.style.display !== 'none'))); |
196 charts = charts.map(div => div.children[0]); | 196 charts = charts.map(div => div.children[0]); |
197 assert.lengthOf(charts, 6); | 197 assert.lengthOf(charts, 6); |
198 | 198 |
199 assert.deepEqual(charts[0].data, [{x: '0', y: 45}, {x: '1', y: 54}]); | 199 assert.deepEqual(charts[0].data, [{x: '0', y: 45}, {x: '1', y: 54}]); |
200 tr.b.assertRangeEquals( | 200 tr.b.assertRangeEquals( |
201 charts[0].dataRange, tr.b.Range.fromExplicitRange(0, 99)); | 201 charts[0].dataRange, tr.b.math.Range.fromExplicitRange(0, 99)); |
202 | 202 |
203 assert.deepEqual( | 203 assert.deepEqual( |
204 charts[1].data, [{x: 'story0', y: 0}, {x: 'story1', y: 90}]); | 204 charts[1].data, [{x: 'story0', y: 0}, {x: 'story1', y: 90}]); |
205 tr.b.assertRangeEquals( | 205 tr.b.assertRangeEquals( |
206 charts[1].dataRange, tr.b.Range.fromExplicitRange(0, 99)); | 206 charts[1].dataRange, tr.b.math.Range.fromExplicitRange(0, 99)); |
207 | 207 |
208 assert.deepEqual( | 208 assert.deepEqual( |
209 charts[2].data, [{x: 'story0', y: 9}, {x: 'story1', y: 99}]); | 209 charts[2].data, [{x: 'story0', y: 9}, {x: 'story1', y: 99}]); |
210 tr.b.assertRangeEquals( | 210 tr.b.assertRangeEquals( |
211 charts[2].dataRange, tr.b.Range.fromExplicitRange(0, 99)); | 211 charts[2].dataRange, tr.b.math.Range.fromExplicitRange(0, 99)); |
212 | 212 |
213 assert.deepEqual(charts[3].data, [{x: '0', y: 50}, {x: '1', y: 60}]); | 213 assert.deepEqual(charts[3].data, [{x: '0', y: 50}, {x: '1', y: 60}]); |
214 tr.b.assertRangeEquals( | 214 tr.b.assertRangeEquals( |
215 charts[3].dataRange, tr.b.Range.fromExplicitRange(0, 110)); | 215 charts[3].dataRange, tr.b.math.Range.fromExplicitRange(0, 110)); |
216 | 216 |
217 assert.deepEqual( | 217 assert.deepEqual( |
218 charts[4].data, [{x: 'story0', y: 0}, {x: 'story1', y: 100}]); | 218 charts[4].data, [{x: 'story0', y: 0}, {x: 'story1', y: 100}]); |
219 tr.b.assertRangeEquals( | 219 tr.b.assertRangeEquals( |
220 charts[4].dataRange, tr.b.Range.fromExplicitRange(0, 110)); | 220 charts[4].dataRange, tr.b.math.Range.fromExplicitRange(0, 110)); |
221 | 221 |
222 assert.deepEqual( | 222 assert.deepEqual( |
223 charts[5].data, [{x: 'story0', y: 10}, {x: 'story1', y: 110}]); | 223 charts[5].data, [{x: 'story0', y: 10}, {x: 'story1', y: 110}]); |
224 tr.b.assertRangeEquals( | 224 tr.b.assertRangeEquals( |
225 charts[5].dataRange, tr.b.Range.fromExplicitRange(0, 110)); | 225 charts[5].dataRange, tr.b.math.Range.fromExplicitRange(0, 110)); |
226 | 226 |
227 let hideOverview = tr.b.findDeepElementMatchingPredicate( | 227 let hideOverview = tr.b.findDeepElementMatchingPredicate( |
228 table, elem => elem.id === 'hide_overview'); | 228 table, elem => elem.id === 'hide_overview'); |
229 // SVG doesn't have click(). | 229 // SVG doesn't have click(). |
230 table.fire('click', {}, {node: hideOverview}); | 230 table.fire('click', {}, {node: hideOverview}); |
231 | 231 |
232 charts = tr.b.findDeepElementsMatchingPredicate( | 232 charts = tr.b.findDeepElementsMatchingPredicate( |
233 table, e => ((e.id === 'overview_container') && | 233 table, e => ((e.id === 'overview_container') && |
234 (e.style.display !== 'none'))); | 234 (e.style.display !== 'none'))); |
235 assert.lengthOf(charts, 0); | 235 assert.lengthOf(charts, 0); |
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1157 } | 1157 } |
1158 subRowPath.pop(); | 1158 subRowPath.pop(); |
1159 } | 1159 } |
1160 subRowPath.pop(); | 1160 subRowPath.pop(); |
1161 } | 1161 } |
1162 subRowPath.pop(); | 1162 subRowPath.pop(); |
1163 } | 1163 } |
1164 }); | 1164 }); |
1165 }); | 1165 }); |
1166 </script> | 1166 </script> |
OLD | NEW |