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

Side by Side Diff: tracing/tracing/ui/analysis/memory_dump_sub_view_util_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 (c) 2015 The Chromium Authors. All rights reserved. 3 Copyright (c) 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" 9 <link rel="import"
10 href="/tracing/ui/analysis/memory_dump_sub_view_test_utils.html"> 10 href="/tracing/ui/analysis/memory_dump_sub_view_test_utils.html">
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 expectedTextContent, opt_expectedColor) { 46 expectedTextContent, opt_expectedColor) {
47 var value = column.formatMultipleFields(fields); 47 var value = column.formatMultipleFields(fields);
48 if (expectedTextContent === undefined) { 48 if (expectedTextContent === undefined) {
49 assert.strictEqual(value, ''); 49 assert.strictEqual(value, '');
50 assert.isUndefined(opt_expectedColor); // Test sanity check. 50 assert.isUndefined(opt_expectedColor); // Test sanity check.
51 return; 51 return;
52 } 52 }
53 53
54 var node = tr.ui.b.asHTMLOrTextNode(value); 54 var node = tr.ui.b.asHTMLOrTextNode(value);
55 var spanEl = document.createElement('span'); 55 var spanEl = document.createElement('span');
56 spanEl.appendChild(node); 56 Polymer.dom(spanEl).appendChild(node);
57 test.addHTMLOutput(spanEl); 57 test.addHTMLOutput(spanEl);
58 58
59 assert.strictEqual(node.textContent, expectedTextContent); 59 assert.strictEqual(node.textContent, expectedTextContent);
60 if (opt_expectedColor === undefined) 60 if (opt_expectedColor === undefined)
61 assert.notInstanceOf(node, HTMLElement); 61 assert.notInstanceOf(node, HTMLElement);
62 else 62 else
63 assert.strictEqual(node.style.color, opt_expectedColor); 63 assert.strictEqual(node.style.color, opt_expectedColor);
64 } 64 }
65 65
66 function checkCompareFieldsEqual(column, fieldValuesA, fieldValuesB) { 66 function checkCompareFieldsEqual(column, fieldValuesA, fieldValuesB) {
(...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after
1196 }); 1196 });
1197 assert.deepEqual(Object.keys(cells), ['a', 'b', 'd']); 1197 assert.deepEqual(Object.keys(cells), ['a', 'b', 'd']);
1198 checkSizeNumericFields( 1198 checkSizeNumericFields(
1199 cells.a, mockColumn, [9, undefined, undefined, undefined]); 1199 cells.a, mockColumn, [9, undefined, undefined, undefined]);
1200 checkSizeNumericFields(cells.b, mockColumn, [314, 159, undefined, 265]); 1200 checkSizeNumericFields(cells.b, mockColumn, [314, 159, undefined, 265]);
1201 checkSizeNumericFields( 1201 checkSizeNumericFields(
1202 cells.d, mockColumn, [undefined, undefined, undefined, 0]); 1202 cells.d, mockColumn, [undefined, undefined, undefined, 0]);
1203 }); 1203 });
1204 }); 1204 });
1205 </script> 1205 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/ui/analysis/memory_dump_sub_view_util.html ('k') | tracing/tracing/ui/analysis/multi_event_details_table.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698