| 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/core/test_utils.html"> | 8 <link rel="import" href="/tracing/core/test_utils.html"> |
| 9 <link rel="import" href="/tracing/extras/chrome/blame_context/frame_tree_node.ht
ml"> | 9 <link rel="import" href="/tracing/extras/chrome/blame_context/frame_tree_node.ht
ml"> |
| 10 <link rel="import" href="/tracing/extras/chrome/blame_context/render_frame.html"
> | 10 <link rel="import" href="/tracing/extras/chrome/blame_context/render_frame.html"
> |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 topLevel = TestUtils.newSnapshot(model, topLevelOptions(1, '0x1')); | 122 topLevel = TestUtils.newSnapshot(model, topLevelOptions(1, '0x1')); |
| 123 slice1 = newAttributedSlice(model, 1, 1500, 500, topLevel); | 123 slice1 = newAttributedSlice(model, 1, 1500, 500, topLevel); |
| 124 slice2 = newAttributedSlice(model, 1, 2500, 500, topLevel); | 124 slice2 = newAttributedSlice(model, 1, 2500, 500, topLevel); |
| 125 }); | 125 }); |
| 126 | 126 |
| 127 // The default range of interest contains both slices. | 127 // The default range of interest contains both slices. |
| 128 assert.isTrue(panel.$.table.tableRows[0].eventsOfInterest.equals( | 128 assert.isTrue(panel.$.table.tableRows[0].eventsOfInterest.equals( |
| 129 new tr.model.EventSet([topLevel, slice1, slice2]))); | 129 new tr.model.EventSet([topLevel, slice1, slice2]))); |
| 130 | 130 |
| 131 // The new range of interest contains only slice2. | 131 // The new range of interest contains only slice2. |
| 132 panel.rangeOfInterest = tr.b.Range.fromExplicitRange(slice2.start, | 132 panel.rangeOfInterest = tr.b.math.Range.fromExplicitRange(slice2.start, |
| 133 slice2.end); | 133 slice2.end); |
| 134 assert.isTrue(panel.$.table.tableRows[0].eventsOfInterest.equals( | 134 assert.isTrue(panel.$.table.tableRows[0].eventsOfInterest.equals( |
| 135 new tr.model.EventSet([topLevel, slice2]))); | 135 new tr.model.EventSet([topLevel, slice2]))); |
| 136 | 136 |
| 137 this.addHTMLOutput(panel); | 137 this.addHTMLOutput(panel); |
| 138 }); | 138 }); |
| 139 | 139 |
| 140 /** | 140 /** |
| 141 * Selects a row in the panel. Checks if the context(s) of the row and the | 141 * Selects a row in the panel. Checks if the context(s) of the row and the |
| 142 * slices attributed to the row are selected. | 142 * slices attributed to the row are selected. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 156 assert.isTrue( | 156 assert.isTrue( |
| 157 e.selection.equals(new tr.model.EventSet([topLevel, slice]))); | 157 e.selection.equals(new tr.model.EventSet([topLevel, slice]))); |
| 158 }); | 158 }); |
| 159 panel.$.table.selectedTableRow = panel.$.table.tableRows[0]; | 159 panel.$.table.selectedTableRow = panel.$.table.tableRows[0]; |
| 160 assert.isTrue(selectionChanged); | 160 assert.isTrue(selectionChanged); |
| 161 | 161 |
| 162 this.addHTMLOutput(panel); | 162 this.addHTMLOutput(panel); |
| 163 }); | 163 }); |
| 164 }); | 164 }); |
| 165 </script> | 165 </script> |
| OLD | NEW |