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

Side by Side Diff: pkg/unittest/lib/interactive_html_config.dart

Issue 11418075: Dartifying members. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 /** 5 /**
6 * This configuration can be used to rerun selected tests, as well 6 * This configuration can be used to rerun selected tests, as well
7 * as see diagnostic output from tests. It runs each test in its own 7 * as see diagnostic output from tests. It runs each test in its own
8 * IFrame, so the configuration consists of two parts - a 'parent' 8 * IFrame, so the configuration consists of two parts - a 'parent'
9 * config that manages all the tests, and a 'child' config for the 9 * config that manages all the tests, and a 'child' config for the
10 * IFrame that runs the individual tests. 10 * IFrame that runs the individual tests.
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 } else if (msg.messageType == _Message.ERROR) { 235 } else if (msg.messageType == _Message.ERROR) {
236 currentTestCase.error(msg.body, _stack); 236 currentTestCase.error(msg.body, _stack);
237 } 237 }
238 completeTest(); 238 completeTest();
239 } 239 }
240 } 240 }
241 241
242 void onInit() { 242 void onInit() {
243 _installErrorHandler(); 243 _installErrorHandler();
244 _messageHandler = _handleMessage; // We need to make just one closure. 244 _messageHandler = _handleMessage; // We need to make just one closure.
245 document.query('#group-divs').innerHTML = ""; 245 document.query('#group-divs').innerHtml = "";
246 } 246 }
247 247
248 void onStart() { 248 void onStart() {
249 _installErrorHandler(); 249 _installErrorHandler();
250 if (!_doneWrap) { 250 if (!_doneWrap) {
251 _doneWrap = true; 251 _doneWrap = true;
252 for (int i = 0; i < testCases.length; i++) { 252 for (int i = 0; i < testCases.length; i++) {
253 testCases[i].test = wrapTest(testCases[i]); 253 testCases[i].test = wrapTest(testCases[i]);
254 testCases[i].setUp = null; 254 testCases[i].setUp = null;
255 testCases[i].tearDown = null; 255 testCases[i].tearDown = null;
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 } else { 348 } else {
349 _actions.style.display = 'none'; 349 _actions.style.display = 'none';
350 _label.classes.remove('open'); 350 _label.classes.remove('open');
351 _label.classes.add('closed'); 351 _label.classes.add('closed');
352 } 352 }
353 }); 353 });
354 } else { // Reset the test element. 354 } else { // Reset the test element.
355 testItem.classes.clear(); 355 testItem.classes.clear();
356 testItem.classes.add('test-it'); 356 testItem.classes.add('test-it');
357 testItem.classes.add('status-pending'); 357 testItem.classes.add('status-pending');
358 testItem.query('#$_actionIdPrefix$id').innerHTML = ''; 358 testItem.query('#$_actionIdPrefix$id').innerHtml = '';
359 } 359 }
360 } 360 }
361 361
362 // Actually test logging is handled by the child, then posted 362 // Actually test logging is handled by the child, then posted
363 // back to the parent. So here we know that the [message] argument 363 // back to the parent. So here we know that the [message] argument
364 // is in the format used by [_Message]. 364 // is in the format used by [_Message].
365 void logTestCaseMessage(TestCase testCase, String message) { 365 void logTestCaseMessage(TestCase testCase, String message) {
366 var msg = new _Message.fromString(message); 366 var msg = new _Message.fromString(message);
367 if (msg.elapsed < 0) { // No associated test case. 367 if (msg.elapsed < 0) { // No associated test case.
368 document.query('#otherlogs').nodes.add( 368 document.query('#otherlogs').nodes.add(
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 display: block; 664 display: block;
665 list-style-type: disc; 665 list-style-type: disc;
666 -webkit-margin-before: 1em; 666 -webkit-margin-before: 1em;
667 -webkit-margin-after: 1em; 667 -webkit-margin-after: 1em;
668 -webkit-margin-start: 0px; 668 -webkit-margin-start: 0px;
669 -webkit-margin-end: 0px; 669 -webkit-margin-end: 0px;
670 -webkit-padding-start: 40px; 670 -webkit-padding-start: 40px;
671 } 671 }
672 672
673 """; 673 """;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698