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

Side by Side Diff: tracing/tracing/ui/analysis/container_memory_dump_sub_view_test.html

Issue 1923953003: [polymer] Switches .appendChild() to Polymer.dom()...appendChild() (Closed) Base URL: git@github.com:catapult-project/catapult.git@polymer10-migration
Patch Set: Created 4 years, 7 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 2015 The Chromium Authors. All rights reserved. 3 Copyright 2015 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/model/event_set.html"> 9 <link rel="import" href="/tracing/model/event_set.html">
10 <link rel="import" 10 <link rel="import"
11 href="/tracing/ui/analysis/container_memory_dump_sub_view.html"> 11 href="/tracing/ui/analysis/container_memory_dump_sub_view.html">
12 <link rel="import" 12 <link rel="import"
13 href="/tracing/ui/analysis/memory_dump_sub_view_test_utils.html"> 13 href="/tracing/ui/analysis/memory_dump_sub_view_test_utils.html">
14 <link rel="import" href="/tracing/ui/base/deep_utils.html"> 14 <link rel="import" href="/tracing/ui/base/deep_utils.html">
15 <link rel="import" href="/tracing/ui/brushing_state_controller.html"> 15 <link rel="import" href="/tracing/ui/brushing_state_controller.html">
16 16
17 <script> 17 <script>
18 'use strict'; 18 'use strict';
19 19
20 tr.b.unittest.testSuite(function() { 20 tr.b.unittest.testSuite(function() {
21 var EventSet = tr.model.EventSet; 21 var EventSet = tr.model.EventSet;
22 var extractVmRegions = tr.ui.analysis.extractVmRegions; 22 var extractVmRegions = tr.ui.analysis.extractVmRegions;
23 var extractMemoryAllocatorDumps = tr.ui.analysis.extractMemoryAllocatorDumps; 23 var extractMemoryAllocatorDumps = tr.ui.analysis.extractMemoryAllocatorDumps;
24 var extractHeapDumps = tr.ui.analysis.extractHeapDumps; 24 var extractHeapDumps = tr.ui.analysis.extractHeapDumps;
25 25
26 function createViewWithSelection(selection, opt_parentElement) { 26 function createViewWithSelection(selection, opt_parentElement) {
27 var viewEl = document.createElement( 27 var viewEl = document.createElement(
28 'tr-ui-a-container-memory-dump-sub-view'); 28 'tr-ui-a-container-memory-dump-sub-view');
29 if (opt_parentElement) 29 if (opt_parentElement)
30 opt_parentElement.appendChild(viewEl); 30 Polymer.dom(opt_parentElement).appendChild(viewEl);
31 if (selection === undefined) { 31 if (selection === undefined) {
32 viewEl.selection = undefined; 32 viewEl.selection = undefined;
33 } else { 33 } else {
34 // Rotate the list of selected dumps to check that the sub-view sorts 34 // Rotate the list of selected dumps to check that the sub-view sorts
35 // them properly. 35 // them properly.
36 var length = selection.length; 36 var length = selection.length;
37 viewEl.selection = new tr.model.EventSet( 37 viewEl.selection = new tr.model.EventSet(
38 selection.slice(length / 2, length).concat( 38 selection.slice(length / 2, length).concat(
39 selection.slice(0, length / 2))); 39 selection.slice(0, length / 2)));
40 } 40 }
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 340
341 // Check the timestamp. 341 // Check the timestamp.
342 assert.equal(column.value(subRow).children[0].value, 42); 342 assert.equal(column.value(subRow).children[0].value, 42);
343 343
344 // Check that the analysis link is associated with the right dump. 344 // Check that the analysis link is associated with the right dump.
345 assert.sameMembers(tr.b.asArray(column.value(subRow).selection), 345 assert.sameMembers(tr.b.asArray(column.value(subRow).selection),
346 [globalMemoryDumps[0].processMemoryDumps[2]]); 346 [globalMemoryDumps[0].processMemoryDumps[2]]);
347 }); 347 });
348 }); 348 });
349 </script> 349 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698