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

Side by Side Diff: tracing/tracing/base/base.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
« no previous file with comments | « no previous file | tracing/tracing/base/unittest/html_test_results.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright (c) 2014 The Chromium Authors. All rights reserved. 3 Copyright (c) 2014 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 <script> 8 <script>
9 'use strict'; 9 'use strict';
10 10
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 panicOverlay.style.left = 0; 89 panicOverlay.style.left = 0;
90 panicOverlay.style.padding = '8px'; 90 panicOverlay.style.padding = '8px';
91 panicOverlay.style.position = 'fixed'; 91 panicOverlay.style.position = 'fixed';
92 panicOverlay.style.top = 0; 92 panicOverlay.style.top = 0;
93 panicOverlay.style.webkitFlexDirection = 'column'; 93 panicOverlay.style.webkitFlexDirection = 'column';
94 panicOverlay.style.width = '100%'; 94 panicOverlay.style.width = '100%';
95 95
96 panicElement = document.createElement('div'); 96 panicElement = document.createElement('div');
97 panicElement.style.webkitFlex = '1 1 auto'; 97 panicElement.style.webkitFlex = '1 1 auto';
98 panicElement.style.overflow = 'auto'; 98 panicElement.style.overflow = 'auto';
99 panicOverlay.appendChild(panicElement); 99 Polymer.dom(panicOverlay).appendChild(panicElement);
100 100
101 if (!document.body) { 101 if (!document.body) {
102 setTimeout(function() { 102 setTimeout(function() {
103 document.body.appendChild(panicOverlay); 103 Polymer.dom(document.body).appendChild(panicOverlay);
104 }, 150); 104 }, 150);
105 } else { 105 } else {
106 document.body.appendChild(panicOverlay); 106 Polymer.dom(document.body).appendChild(panicOverlay);
107 } 107 }
108 } 108 }
109 109
110 function showPanic(panicTitle, panicDetails) { 110 function showPanic(panicTitle, panicDetails) {
111 if (tr.isHeadless) { 111 if (tr.isHeadless) {
112 if (panicDetails instanceof Error) 112 if (panicDetails instanceof Error)
113 throw panicDetails; 113 throw panicDetails;
114 throw new Error('Panic: ' + panicTitle + ':\n' + panicDetails); 114 throw new Error('Panic: ' + panicTitle + ':\n' + panicDetails);
115 } 115 }
116 116
117 if (panicDetails instanceof Error) 117 if (panicDetails instanceof Error)
118 panicDetails = panicDetails.stack; 118 panicDetails = panicDetails.stack;
119 119
120 showPanicElementIfNeeded(); 120 showPanicElementIfNeeded();
121 var panicMessageEl = document.createElement('div'); 121 var panicMessageEl = document.createElement('div');
122 panicMessageEl.innerHTML = 122 panicMessageEl.innerHTML =
123 '<h2 id="message"></h2>' + 123 '<h2 id="message"></h2>' +
124 '<pre id="details"></pre>'; 124 '<pre id="details"></pre>';
125 panicMessageEl.querySelector('#message').textContent = panicTitle; 125 panicMessageEl.querySelector('#message').textContent = panicTitle;
126 panicMessageEl.querySelector('#details').textContent = panicDetails; 126 panicMessageEl.querySelector('#details').textContent = panicDetails;
127 panicElement.appendChild(panicMessageEl); 127 Polymer.dom(panicElement).appendChild(panicMessageEl);
128 128
129 rawPanicMessages.push({ 129 rawPanicMessages.push({
130 title: panicTitle, 130 title: panicTitle,
131 details: panicDetails 131 details: panicDetails
132 }); 132 });
133 } 133 }
134 134
135 function hasPanic() { 135 function hasPanic() {
136 return rawPanicMessages.length !== 0; 136 return rawPanicMessages.length !== 0;
137 } 137 }
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 isDefined: isDefined, 185 isDefined: isDefined,
186 186
187 showPanic: showPanic, 187 showPanic: showPanic,
188 hasPanic: hasPanic, 188 hasPanic: hasPanic,
189 getPanicText: getPanicText 189 getPanicText: getPanicText
190 }; 190 };
191 })(); 191 })();
192 192
193 tr.initialize(); 193 tr.initialize();
194 </script> 194 </script>
OLDNEW
« no previous file with comments | « no previous file | tracing/tracing/base/unittest/html_test_results.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698