| 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/iteration_helpers.html"> | 8 <link rel="import" href="/tracing/base/iteration_helpers.html"> |
| 9 <link rel="import" href="/tracing/base/multi_dimensional_view.html"> | 9 <link rel="import" href="/tracing/base/multi_dimensional_view.html"> |
| 10 <link rel="import" href="/tracing/core/test_utils.html"> | 10 <link rel="import" href="/tracing/core/test_utils.html"> |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 for (let i = 0; i < expectedStructureDimensionChildren.length; i++) { | 64 for (let i = 0; i < expectedStructureDimensionChildren.length; i++) { |
| 65 addExpectedStructureToMap(expectedStructureDimensionChildren[i], map); | 65 addExpectedStructureToMap(expectedStructureDimensionChildren[i], map); |
| 66 } | 66 } |
| 67 } | 67 } |
| 68 } | 68 } |
| 69 | 69 |
| 70 function checkTreeStructure(actualTreeNode, expectedStructureNode, | 70 function checkTreeStructure(actualTreeNode, expectedStructureNode, |
| 71 actualTreeNodesById, expectedStructureNodesById) { | 71 actualTreeNodesById, expectedStructureNodesById) { |
| 72 // Check the multi-dimensional title. | 72 // Check the multi-dimensional title. |
| 73 assert.deepEqual( | 73 assert.deepEqual( |
| 74 tr.b.asArray(actualTreeNode.title), expectedStructureNode.title); | 74 Array.from(actualTreeNode.title), expectedStructureNode.title); |
| 75 | 75 |
| 76 // Check the values. | 76 // Check the values. |
| 77 assert.deepEqual(actualTreeNode.values, expectedStructureNode.values); | 77 assert.deepEqual(actualTreeNode.values, expectedStructureNode.values); |
| 78 | 78 |
| 79 // Check the children. | 79 // Check the children. |
| 80 const expectedStructureChildNodes = expectedStructureNode.children; | 80 const expectedStructureChildNodes = expectedStructureNode.children; |
| 81 const actualTreeChildNodes = actualTreeNode.children; | 81 const actualTreeChildNodes = actualTreeNode.children; |
| 82 assert.lengthOf(actualTreeChildNodes, expectedStructureChildNodes.length); | 82 assert.lengthOf(actualTreeChildNodes, expectedStructureChildNodes.length); |
| 83 | 83 |
| 84 for (let d = 0; d < expectedStructureChildNodes.length; d++) { | 84 for (let d = 0; d < expectedStructureChildNodes.length; d++) { |
| (...skipping 13283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13368 // Interleaved repetition. | 13368 // Interleaved repetition. |
| 13369 checkZFunction([1, 2, 1, 3, 1, 2, 1], [0, 0, 1, 0, 3, 0, 1]); | 13369 checkZFunction([1, 2, 1, 3, 1, 2, 1], [0, 0, 1, 0, 3, 0, 1]); |
| 13370 checkZFunction('AAABAAB', [0, 2, 1, 0, 2, 1, 0]); | 13370 checkZFunction('AAABAAB', [0, 2, 1, 0, 2, 1, 0]); |
| 13371 | 13371 |
| 13372 // Complex patterns. | 13372 // Complex patterns. |
| 13373 checkZFunction([7, 9, 7, 9, 7, 9, 7, 9], [0, 0, 6, 0, 4, 0, 2, 0]); | 13373 checkZFunction([7, 9, 7, 9, 7, 9, 7, 9], [0, 0, 6, 0, 4, 0, 2, 0]); |
| 13374 checkZFunction('CCGTCCCGTACC', [0, 1, 0, 0, 2, 4, 1, 0, 0, 0, 2, 1]); | 13374 checkZFunction('CCGTCCCGTACC', [0, 1, 0, 0, 2, 4, 1, 0, 0, 0, 2, 1]); |
| 13375 }); | 13375 }); |
| 13376 }); | 13376 }); |
| 13377 </script> | 13377 </script> |
| OLD | NEW |