OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 /// A simple unit test library for running tests in a browser. | 5 /// A simple unit test library for running tests in a browser. |
6 /// | 6 /// |
7 /// Provides enhanced HTML output with collapsible group headers | 7 /// Provides enhanced HTML output with collapsible group headers |
8 /// and other at-a-glance information about the test results. | 8 /// and other at-a-glance information about the test results. |
9 library unittest.html_enhanced_config; | 9 library unittest.html_enhanced_config; |
10 | 10 |
11 import 'dart:collection' show LinkedHashMap; | 11 import 'dart:collection' show LinkedHashMap; |
12 import 'dart:convert'; | 12 import 'dart:convert'; |
13 import 'dart:html'; | 13 import 'dart:html'; |
14 import 'unittest.dart'; | 14 import 'unittest.dart'; |
15 | 15 |
16 class HtmlEnhancedConfiguration extends SimpleConfiguration { | 16 class HtmlEnhancedConfiguration extends SimpleConfiguration { |
17 /// Whether this is run within dartium layout tests. | 17 /// Whether this is run within dartium layout tests. |
18 final bool _isLayoutTest; | 18 final bool _isLayoutTest; |
19 HtmlEnhancedConfiguration(this._isLayoutTest); | 19 HtmlEnhancedConfiguration(this._isLayoutTest); |
20 | 20 |
21 var _onErrorSubscription = null; | 21 var _onErrorSubscription = null; |
22 var _onMessageSubscription = null; | 22 var _onMessageSubscription = null; |
23 | 23 |
24 void _installOnErrorHandler() { | 24 void _installOnErrorHandler() { |
25 if (_onErrorSubscription == null) { | 25 if (_onErrorSubscription == null) { |
26 // Listen for uncaught errors. | 26 // Listen for uncaught errors. |
27 _onErrorSubscription = window.onError.listen( | 27 _onErrorSubscription = window.onError |
28 (e) => handleExternalError(e, '(DOM callback has errors)')); | 28 .listen((e) => handleExternalError(e, '(DOM callback has errors)')); |
29 } | 29 } |
30 } | 30 } |
31 | 31 |
32 void _installOnMessageHandler() { | 32 void _installOnMessageHandler() { |
33 if (_onMessageSubscription == null) { | 33 if (_onMessageSubscription == null) { |
34 // Listen for errors from JS. | 34 // Listen for errors from JS. |
35 _onMessageSubscription = window.onMessage.listen( | 35 _onMessageSubscription = |
36 (e) => processMessage(e)); | 36 window.onMessage.listen((e) => processMessage(e)); |
37 } | 37 } |
38 } | 38 } |
39 | 39 |
40 void _installHandlers() { | 40 void _installHandlers() { |
41 _installOnErrorHandler(); | 41 _installOnErrorHandler(); |
42 _installOnMessageHandler(); | 42 _installOnMessageHandler(); |
43 } | 43 } |
44 | 44 |
45 void _uninstallHandlers() { | 45 void _uninstallHandlers() { |
46 if (_onErrorSubscription != null) { | 46 if (_onErrorSubscription != null) { |
(...skipping 28 matching lines...) Expand all Loading... |
75 window.postMessage('unittest-suite-wait-for-done', '*'); | 75 window.postMessage('unittest-suite-wait-for-done', '*'); |
76 } | 76 } |
77 | 77 |
78 void onStart() { | 78 void onStart() { |
79 // Listen for uncaught errors. | 79 // Listen for uncaught errors. |
80 _installOnErrorHandler(); | 80 _installOnErrorHandler(); |
81 } | 81 } |
82 | 82 |
83 void onSummary(int passed, int failed, int errors, List<TestCase> results, | 83 void onSummary(int passed, int failed, int errors, List<TestCase> results, |
84 String uncaughtError) { | 84 String uncaughtError) { |
85 _showInteractiveResultsInPage(passed, failed, errors, results, | 85 _showInteractiveResultsInPage( |
86 _isLayoutTest, uncaughtError); | 86 passed, failed, errors, results, _isLayoutTest, uncaughtError); |
87 } | 87 } |
88 | 88 |
89 void onDone(bool success) { | 89 void onDone(bool success) { |
90 _uninstallHandlers(); | 90 _uninstallHandlers(); |
91 window.postMessage('unittest-suite-done', '*'); | 91 window.postMessage('unittest-suite-done', '*'); |
92 } | 92 } |
93 | 93 |
94 void _showInteractiveResultsInPage(int passed, int failed, int errors, | 94 void _showInteractiveResultsInPage(int passed, int failed, int errors, |
95 List<TestCase> results, bool isLayoutTest, String uncaughtError) { | 95 List<TestCase> results, bool isLayoutTest, String uncaughtError) { |
96 if (isLayoutTest && passed == results.length) { | 96 if (isLayoutTest && passed == results.length) { |
97 document.body.innerHtml = "PASS"; | 97 document.body.innerHtml = "PASS"; |
98 } else { | 98 } else { |
99 // changed the StringBuffer to an Element fragment | 99 // changed the StringBuffer to an Element fragment |
100 Element te = new Element.html('<div class="unittest-table"></div>'); | 100 Element te = new Element.html('<div class="unittest-table"></div>'); |
101 | 101 |
102 te.children.add(new Element.html(passed == results.length | 102 te.children.add(new Element.html(passed == results.length |
103 ? "<div class='unittest-overall unittest-pass'>PASS</div>" | 103 ? "<div class='unittest-overall unittest-pass'>PASS</div>" |
104 : "<div class='unittest-overall unittest-fail'>FAIL</div>")); | 104 : "<div class='unittest-overall unittest-fail'>FAIL</div>")); |
105 | 105 |
106 // moved summary to the top since web browsers | 106 // moved summary to the top since web browsers |
107 // don't auto-scroll to the bottom like consoles typically do. | 107 // don't auto-scroll to the bottom like consoles typically do. |
108 if (passed == results.length && uncaughtError == null) { | 108 if (passed == results.length && uncaughtError == null) { |
109 te.children.add(new Element.html(""" | 109 te.children.add(new Element.html(""" |
110 <div class='unittest-pass'>All ${passed} tests passed</div>""")); | 110 <div class='unittest-pass'>All ${passed} tests passed</div>""")); |
111 } else { | 111 } else { |
112 | |
113 if (uncaughtError != null) { | 112 if (uncaughtError != null) { |
114 te.children.add(new Element.html(""" | 113 te.children.add(new Element.html(""" |
115 <div class='unittest-summary'> | 114 <div class='unittest-summary'> |
116 <span class='unittest-error'>Uncaught error: $uncaughtError</span> | 115 <span class='unittest-error'>Uncaught error: $uncaughtError</span> |
117 </div>""")); | 116 </div>""")); |
118 } | 117 } |
119 | 118 |
120 te.children.add(new Element.html(""" | 119 te.children.add(new Element.html(""" |
121 <div class='unittest-summary'> | 120 <div class='unittest-summary'> |
122 <span class='unittest-pass'>Total ${passed} passed</span>, | 121 <span class='unittest-pass'>Total ${passed} passed</span>, |
123 <span class='unittest-fail'>${failed} failed</span>, | 122 <span class='unittest-fail'>${failed} failed</span>, |
124 <span class='unittest-error'> | 123 <span class='unittest-error'> |
125 ${errors + (uncaughtError == null ? 0 : 1)} errors</span> | 124 ${errors + (uncaughtError == null ? 0 : 1)} errors</span> |
126 </div>""")); | 125 </div>""")); |
127 } | 126 } |
128 | 127 |
129 te.children.add(new Element.html(""" | 128 te.children.add(new Element.html(""" |
130 <div><button id='btnCollapseAll'>Collapse All</button></div> | 129 <div><button id='btnCollapseAll'>Collapse All</button></div> |
131 """)); | 130 """)); |
132 | 131 |
133 // handle the click event for the collapse all button | 132 // handle the click event for the collapse all button |
134 te.querySelector('#btnCollapseAll').onClick.listen((_){ | 133 te.querySelector('#btnCollapseAll').onClick.listen((_) { |
135 document | 134 document |
136 .querySelectorAll('.unittest-row') | 135 .querySelectorAll('.unittest-row') |
137 .forEach((el) => el.attributes['class'] = el.attributes['class'] | 136 .forEach((el) => el.attributes['class'] = el.attributes['class'] |
138 .replaceAll('unittest-row ', 'unittest-row-hidden ')); | 137 .replaceAll('unittest-row ', 'unittest-row-hidden ')); |
139 }); | 138 }); |
140 | 139 |
141 var previousGroup = ''; | 140 var previousGroup = ''; |
142 var groupPassFail = true; | 141 var groupPassFail = true; |
143 final indentAmount = 50; | 142 final indentAmount = 50; |
144 | 143 |
145 // order by group and sort numerically within each group | 144 // order by group and sort numerically within each group |
146 var groupedBy = new LinkedHashMap<String, List<TestCase>>(); | 145 var groupedBy = new LinkedHashMap<String, List<TestCase>>(); |
147 | 146 |
148 for (final t in results) { | 147 for (final t in results) { |
149 if (!groupedBy.containsKey(t.currentGroup)) { | 148 if (!groupedBy.containsKey(t.currentGroup)) { |
150 groupedBy[t.currentGroup] = new List<TestCase>(); | 149 groupedBy[t.currentGroup] = new List<TestCase>(); |
151 } | 150 } |
152 | 151 |
153 groupedBy[t.currentGroup].add(t); | 152 groupedBy[t.currentGroup].add(t); |
154 } | 153 } |
155 | 154 |
156 // flatten the list again with tests ordered | 155 // flatten the list again with tests ordered |
157 List<TestCase> flattened = new List<TestCase>(); | 156 List<TestCase> flattened = new List<TestCase>(); |
158 | 157 |
159 groupedBy | 158 groupedBy.values.forEach((tList) { |
160 .values | 159 tList.sort((tcA, tcB) => tcA.id - tcB.id); |
161 .forEach((tList){ | 160 flattened.addAll(tList); |
162 tList.sort((tcA, tcB) => tcA.id - tcB.id); | 161 }); |
163 flattened.addAll(tList); | |
164 } | |
165 ); | |
166 | 162 |
167 var nonAlphanumeric = new RegExp('[^a-z0-9A-Z]'); | 163 var nonAlphanumeric = new RegExp('[^a-z0-9A-Z]'); |
168 | 164 |
169 // output group headers and test rows | 165 // output group headers and test rows |
170 for (final test_ in flattened) { | 166 for (final test_ in flattened) { |
171 | 167 |
172 // replace everything but numbers and letters from the group name with | 168 // replace everything but numbers and letters from the group name with |
173 // '_' so we can use in id and class properties. | 169 // '_' so we can use in id and class properties. |
174 var safeGroup = test_.currentGroup.replaceAll(nonAlphanumeric, '_'); | 170 var safeGroup = test_.currentGroup.replaceAll(nonAlphanumeric, '_'); |
175 | 171 |
176 if (test_.currentGroup != previousGroup) { | 172 if (test_.currentGroup != previousGroup) { |
177 | |
178 previousGroup = test_.currentGroup; | 173 previousGroup = test_.currentGroup; |
179 | 174 |
180 var testsInGroup = results | 175 var testsInGroup = results |
181 .where((TestCase t) => t.currentGroup == previousGroup) | 176 .where((TestCase t) => t.currentGroup == previousGroup) |
182 .toList(); | 177 .toList(); |
183 var groupTotalTestCount = testsInGroup.length; | 178 var groupTotalTestCount = testsInGroup.length; |
184 var groupTestPassedCount = testsInGroup.where( | 179 var groupTestPassedCount = |
185 (TestCase t) => t.result == 'pass').length; | 180 testsInGroup.where((TestCase t) => t.result == 'pass').length; |
186 groupPassFail = groupTotalTestCount == groupTestPassedCount; | 181 groupPassFail = groupTotalTestCount == groupTestPassedCount; |
187 var passFailClass = "unittest-group-status unittest-group-" | 182 var passFailClass = "unittest-group-status unittest-group-" |
188 "status-${groupPassFail ? 'pass' : 'fail'}"; | 183 "status-${groupPassFail ? 'pass' : 'fail'}"; |
189 | 184 |
190 te.children.add(new Element.html(""" | 185 te.children.add(new Element.html(""" |
191 <div> | 186 <div> |
192 <div id='${safeGroup}' | 187 <div id='${safeGroup}' |
193 class='unittest-group ${safeGroup} test${safeGroup}'> | 188 class='unittest-group ${safeGroup} test${safeGroup}'> |
194 <div ${_isIE ? "style='display:inline-block' ": ""} | 189 <div ${_isIE ? "style='display:inline-block' ": ""} |
195 class='unittest-row-status'> | 190 class='unittest-row-status'> |
196 <div class='$passFailClass'></div> | 191 <div class='$passFailClass'></div> |
197 </div> | 192 </div> |
198 <div ${_isIE ? "style='display:inline-block' ": ""}> | 193 <div ${_isIE ? "style='display:inline-block' ": ""}> |
199 ${test_.currentGroup}</div> | 194 ${test_.currentGroup}</div> |
200 | 195 |
201 <div ${_isIE ? "style='display:inline-block' ": ""}> | 196 <div ${_isIE ? "style='display:inline-block' ": ""}> |
202 (${groupTestPassedCount}/${groupTotalTestCount})</div> | 197 (${groupTestPassedCount}/${groupTotalTestCount})</div> |
203 </div> | 198 </div> |
204 </div>""")); | 199 </div>""")); |
205 | 200 |
206 // 'safeGroup' could be empty | 201 // 'safeGroup' could be empty |
207 var grp = (safeGroup == '') ? | 202 var grp = |
208 null : te.querySelector('#${safeGroup}'); | 203 (safeGroup == '') ? null : te.querySelector('#${safeGroup}'); |
209 if (grp != null) { | 204 if (grp != null) { |
210 grp.onClick.listen((_) { | 205 grp.onClick.listen((_) { |
211 var row = document.querySelector('.unittest-row-${safeGroup}'); | 206 var row = document.querySelector('.unittest-row-${safeGroup}'); |
212 if (row.attributes['class'].contains('unittest-row ')){ | 207 if (row.attributes['class'].contains('unittest-row ')) { |
213 document.querySelectorAll('.unittest-row-${safeGroup}').forEach( | 208 document.querySelectorAll('.unittest-row-${safeGroup}').forEach( |
214 (e) => e.attributes['class'] = e.attributes['class'] | 209 (e) => e.attributes['class'] = e.attributes['class'] |
215 .replaceAll('unittest-row ', 'unittest-row-hidden ')); | 210 .replaceAll('unittest-row ', 'unittest-row-hidden ')); |
216 }else{ | 211 } else { |
217 document.querySelectorAll('.unittest-row-${safeGroup}').forEach( | 212 document.querySelectorAll('.unittest-row-${safeGroup}').forEach( |
218 (e) => e.attributes['class'] = e.attributes['class'] | 213 (e) => e.attributes['class'] = e.attributes['class'] |
219 .replaceAll('unittest-row-hidden', 'unittest-row')); | 214 .replaceAll('unittest-row-hidden', 'unittest-row')); |
220 } | 215 } |
221 }); | 216 }); |
222 } | 217 } |
223 } | 218 } |
224 | 219 |
225 _buildRow(test_, te, safeGroup, !groupPassFail); | 220 _buildRow(test_, te, safeGroup, !groupPassFail); |
226 } | 221 } |
227 | 222 |
228 document.body.children.clear(); | 223 document.body.children.clear(); |
229 document.body.children.add(te); | 224 document.body.children.add(te); |
230 } | 225 } |
231 } | 226 } |
232 | 227 |
233 void _buildRow(TestCase test_, Element te, String groupID, bool isVisible) { | 228 void _buildRow(TestCase test_, Element te, String groupID, bool isVisible) { |
234 var background = 'unittest-row-${test_.id % 2 == 0 ? "even" : "odd"}'; | 229 var background = 'unittest-row-${test_.id % 2 == 0 ? "even" : "odd"}'; |
235 var display = '${isVisible ? "unittest-row" : "unittest-row-hidden"}'; | 230 var display = '${isVisible ? "unittest-row" : "unittest-row-hidden"}'; |
236 | 231 |
237 addRowElement(id, status, description){ | 232 addRowElement(id, status, description) { |
238 te.children.add( | 233 te.children.add(new Element.html(''' <div> |
239 new Element.html( | |
240 ''' <div> | |
241 <div class='$display unittest-row-${groupID} $background'> | 234 <div class='$display unittest-row-${groupID} $background'> |
242 <div ${_isIE ? "style='display:inline-block' ": ""} | 235 <div ${_isIE ? "style='display:inline-block' ": ""} |
243 class='unittest-row-id'>$id</div> | 236 class='unittest-row-id'>$id</div> |
244 <div ${_isIE ? "style='display:inline-block' ": ""} | 237 <div ${_isIE ? "style='display:inline-block' ": ""} |
245 class="unittest-row-status unittest-${test_.result}"> | 238 class="unittest-row-status unittest-${test_.result}"> |
246 $status</div> | 239 $status</div> |
247 <div ${_isIE ? "style='display:inline-block' ": ""} | 240 <div ${_isIE ? "style='display:inline-block' ": ""} |
248 class='unittest-row-description'>$description</div> | 241 class='unittest-row-description'>$description</div> |
249 </div> | 242 </div> |
250 </div>''' | 243 </div>''')); |
251 ) | |
252 ); | |
253 } | 244 } |
254 | 245 |
255 if (!test_.isComplete) { | 246 if (!test_.isComplete) { |
256 addRowElement('${test_.id}', 'NO STATUS', 'Test did not complete.'); | 247 addRowElement('${test_.id}', 'NO STATUS', 'Test did not complete.'); |
257 return; | 248 return; |
258 } | 249 } |
259 | 250 |
260 addRowElement('${test_.id}', '${test_.result.toUpperCase()}', | 251 addRowElement('${test_.id}', '${test_.result.toUpperCase()}', |
261 '${test_.description}. ${HTML_ESCAPE.convert(test_.message)}'); | 252 '${test_.description}. ${HTML_ESCAPE.convert(test_.message)}'); |
262 | 253 |
263 if (test_.stackTrace != null) { | 254 if (test_.stackTrace != null) { |
264 addRowElement('', '', | 255 addRowElement('', '', |
265 '<pre>${HTML_ESCAPE.convert(test_.stackTrace.toString())}</pre>'); | 256 '<pre>${HTML_ESCAPE.convert(test_.stackTrace.toString())}</pre>'); |
266 } | 257 } |
267 } | 258 } |
268 | 259 |
269 | |
270 static bool get _isIE => window.navigator.userAgent.contains('MSIE'); | 260 static bool get _isIE => window.navigator.userAgent.contains('MSIE'); |
271 | 261 |
272 String get _htmlTestCSS => | 262 String get _htmlTestCSS => ''' |
273 ''' | |
274 body{ | 263 body{ |
275 font-size: 14px; | 264 font-size: 14px; |
276 font-family: 'Open Sans', 'Lucida Sans Unicode', 'Lucida Grande',''' | 265 font-family: 'Open Sans', 'Lucida Sans Unicode', 'Lucida Grande',''' |
277 ''' sans-serif; | 266 ''' sans-serif; |
278 background: WhiteSmoke; | 267 background: WhiteSmoke; |
279 } | 268 } |
280 | 269 |
281 .unittest-group | 270 .unittest-group |
282 { | 271 { |
283 background: rgb(75,75,75); | 272 background: rgb(75,75,75); |
284 width:98%; | 273 width:98%; |
285 color: WhiteSmoke; | 274 color: WhiteSmoke; |
286 font-weight: bold; | 275 font-weight: bold; |
287 padding: 6px; | 276 padding: 6px; |
288 cursor: pointer; | 277 cursor: pointer; |
289 | 278 |
290 /* Provide some visual separation between groups for IE */ | 279 /* Provide some visual separation between groups for IE */ |
291 ${_isIE ? "border-bottom:solid black 1px;": ""} | 280 ${_isIE ? "border-bottom:solid black 1px;": ""} |
292 ${_isIE ? "border-top:solid #777777 1px;": ""} | 281 ${_isIE ? "border-top:solid #777777 1px;": ""} |
293 | 282 |
294 background-image: -webkit-linear-gradient(bottom, rgb(50,50,50) 0%, ''' | 283 background-image: -webkit-linear-gradient(bottom, rgb(50,50,50) 0%, ''' |
295 '''rgb(100,100,100) 100%); | 284 '''rgb(100,100,100) 100%); |
296 background-image: -moz-linear-gradient(bottom, rgb(50,50,50) 0%, ''' | 285 background-image: -moz-linear-gradient(bottom, rgb(50,50,50) 0%, ''' |
297 '''rgb(100,100,100) 100%); | 286 '''rgb(100,100,100) 100%); |
298 background-image: -ms-linear-gradient(bottom, rgb(50,50,50) 0%, ''' | 287 background-image: -ms-linear-gradient(bottom, rgb(50,50,50) 0%, ''' |
299 '''rgb(100,100,100) 100%); | 288 '''rgb(100,100,100) 100%); |
300 background-image: linear-gradient(bottom, rgb(50,50,50) 0%, ''' | 289 background-image: linear-gradient(bottom, rgb(50,50,50) 0%, ''' |
301 '''rgb(100,100,100) 100%); | 290 '''rgb(100,100,100) 100%); |
302 | 291 |
303 display: -webkit-box; | 292 display: -webkit-box; |
304 display: -moz-box; | 293 display: -moz-box; |
305 display: -ms-box; | 294 display: -ms-box; |
306 display: box; | 295 display: box; |
307 | 296 |
308 -webkit-box-orient: horizontal; | 297 -webkit-box-orient: horizontal; |
309 -moz-box-orient: horizontal; | 298 -moz-box-orient: horizontal; |
310 -ms-box-orient: horizontal; | 299 -ms-box-orient: horizontal; |
311 box-orient: horizontal; | 300 box-orient: horizontal; |
312 | 301 |
313 -webkit-box-align: center; | 302 -webkit-box-align: center; |
314 -moz-box-align: center; | 303 -moz-box-align: center; |
315 -ms-box-align: center; | 304 -ms-box-align: center; |
316 box-align: center; | 305 box-align: center; |
317 } | 306 } |
318 | 307 |
319 .unittest-group-status | 308 .unittest-group-status |
320 { | 309 { |
321 width: 20px; | 310 width: 20px; |
322 height: 20px; | 311 height: 20px; |
323 border-radius: 20px; | 312 border-radius: 20px; |
324 margin-left: 10px; | 313 margin-left: 10px; |
325 } | 314 } |
326 | 315 |
327 .unittest-group-status-pass{ | 316 .unittest-group-status-pass{ |
328 background: Green; | 317 background: Green; |
329 background: ''' | 318 background: ''' |
330 '''-webkit-radial-gradient(center, ellipse cover, #AAFFAA 0%,Green 100%); | 319 '''-webkit-radial-gradient(center, ellipse cover, #AAFFAA 0%,Green 100%); |
331 background: ''' | 320 background: ''' |
332 '''-moz-radial-gradient(center, ellipse cover, #AAFFAA 0%,Green 100%); | 321 '''-moz-radial-gradient(center, ellipse cover, #AAFFAA 0%,Green 100%); |
333 background: ''' | 322 background: ''' |
334 '''-ms-radial-gradient(center, ellipse cover, #AAFFAA 0%,Green 100%); | 323 '''-ms-radial-gradient(center, ellipse cover, #AAFFAA 0%,Green 100%); |
335 background: ''' | 324 background: ''' |
336 '''radial-gradient(center, ellipse cover, #AAFFAA 0%,Green 100%); | 325 '''radial-gradient(center, ellipse cover, #AAFFAA 0%,Green 100%); |
337 } | 326 } |
338 | 327 |
339 .unittest-group-status-fail{ | 328 .unittest-group-status-fail{ |
340 background: Red; | 329 background: Red; |
341 background: ''' | 330 background: ''' |
342 '''-webkit-radial-gradient(center, ellipse cover, #FFAAAA 0%,Red 100%); | 331 '''-webkit-radial-gradient(center, ellipse cover, #FFAAAA 0%,Red 100%); |
343 background: ''' | 332 background: ''' |
344 '''-moz-radial-gradient(center, ellipse cover, #FFAAAA 0%,Red 100%); | 333 '''-moz-radial-gradient(center, ellipse cover, #FFAAAA 0%,Red 100%); |
345 background: ''' | 334 background: ''' |
346 '''-ms-radial-gradient(center, ellipse cover, #AAFFAA 0%,Green 100%); | 335 '''-ms-radial-gradient(center, ellipse cover, #AAFFAA 0%,Green 100%); |
347 background: radial-gradient(center, ellipse cover, #FFAAAA 0%,Red 100%); | 336 background: radial-gradient(center, ellipse cover, #FFAAAA 0%,Red 100%); |
348 } | 337 } |
349 | 338 |
350 .unittest-overall{ | 339 .unittest-overall{ |
351 font-size: 20px; | 340 font-size: 20px; |
352 } | 341 } |
353 | 342 |
354 .unittest-summary{ | 343 .unittest-summary{ |
355 font-size: 18px; | 344 font-size: 18px; |
356 } | 345 } |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 | 397 |
409 '''; | 398 '''; |
410 } | 399 } |
411 | 400 |
412 void useHtmlEnhancedConfiguration([bool isLayoutTest = false]) { | 401 void useHtmlEnhancedConfiguration([bool isLayoutTest = false]) { |
413 unittestConfiguration = isLayoutTest ? _singletonLayout : _singletonNotLayout; | 402 unittestConfiguration = isLayoutTest ? _singletonLayout : _singletonNotLayout; |
414 } | 403 } |
415 | 404 |
416 final _singletonLayout = new HtmlEnhancedConfiguration(true); | 405 final _singletonLayout = new HtmlEnhancedConfiguration(true); |
417 final _singletonNotLayout = new HtmlEnhancedConfiguration(false); | 406 final _singletonNotLayout = new HtmlEnhancedConfiguration(false); |
OLD | NEW |