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

Side by Side Diff: tools/testing/dart/test_suite.dart

Issue 15755017: Switch from DRT to content shell. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « tools/testing/dart/test_runner.dart ('k') | utils/apidoc/mdn/extractRunner.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 * Classes and methods for enumerating and preparing tests. 6 * Classes and methods for enumerating and preparing tests.
7 * 7 *
8 * This library includes: 8 * This library includes:
9 * 9 *
10 * - Creating tests by listing all the Dart files in certain directories, 10 * - Creating tests by listing all the Dart files in certain directories,
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 enqueueTestCaseFromTestInformation(info); 510 enqueueTestCaseFromTestInformation(info);
511 } 511 }
512 }); 512 });
513 } 513 }
514 }).then((_) { 514 }).then((_) {
515 if (onDone != null) onDone(); 515 if (onDone != null) onDone();
516 }); 516 });
517 } 517 }
518 518
519 /** 519 /**
520 * If DumpRenderTree/Dartium is required, and not yet updated, waits for 520 * If Content shell/Dartium is required, and not yet updated, waits for
521 * the update then completes. Otherwise completes immediately. 521 * the update then completes. Otherwise completes immediately.
522 */ 522 */
523 Future updateDartium() { 523 Future updateDartium() {
524 var completer = new Completer(); 524 var completer = new Completer();
525 var updater = runtimeUpdater(configuration); 525 var updater = runtimeUpdater(configuration);
526 if (updater == null || updater.updated) { 526 if (updater == null || updater.updated) {
527 return new Future.immediate(null); 527 return new Future.immediate(null);
528 } 528 }
529 529
530 assert(updater.isActive); 530 assert(updater.isActive);
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 args.add('--force-refresh'); 1011 args.add('--force-refresh');
1012 } 1012 }
1013 commandSet.add(new Command('python', args)); 1013 commandSet.add(new Command('python', args));
1014 } else { 1014 } else {
1015 if (runtime != "drt") { 1015 if (runtime != "drt") {
1016 print("Unknown runtime $runtime"); 1016 print("Unknown runtime $runtime");
1017 exit(1); 1017 exit(1);
1018 } 1018 }
1019 1019
1020 var dartFlags = []; 1020 var dartFlags = [];
1021 var dumpRenderTreeOptions = []; 1021 var contentShellOptions = [];
1022 1022
1023 dumpRenderTreeOptions.add('--no-timeout'); 1023 contentShellOptions.add('--no-timeout');
1024 contentShellOptions.add('--dump-render-tree');
1024 1025
1025 if (compiler == 'none' || compiler == 'dart2dart') { 1026 if (compiler == 'none' || compiler == 'dart2dart') {
1026 dartFlags.add('--ignore-unrecognized-flags'); 1027 dartFlags.add('--ignore-unrecognized-flags');
1027 if (configuration["checked"]) { 1028 if (configuration["checked"]) {
1028 dartFlags.add('--enable_asserts'); 1029 dartFlags.add('--enable_asserts');
1029 dartFlags.add("--enable_type_checks"); 1030 dartFlags.add("--enable_type_checks");
1030 } 1031 }
1031 dartFlags.addAll(vmOptions); 1032 dartFlags.addAll(vmOptions);
1032 } 1033 }
1033 1034
1034 if (expectedOutput != null) { 1035 if (expectedOutput != null) {
1035 if (expectedOutput.toNativePath().endsWith('.png')) { 1036 if (expectedOutput.toNativePath().endsWith('.png')) {
1036 // pixel tests are specified by running DRT "foo.html'-p" 1037 // pixel tests are specified by running DRT "foo.html'-p"
1037 dumpRenderTreeOptions.add('--notree'); 1038 contentShellOptions.add('--notree');
1038 fullHtmlPath = "${fullHtmlPath}'-p"; 1039 fullHtmlPath = "${fullHtmlPath}'-p";
1039 } 1040 }
1040 } 1041 }
1041 commandSet.add(new DumpRenderTreeCommand(dumpRenderTreeFilename, 1042 commandSet.add(new ContentShellCommand(contentShellFilename,
1042 fullHtmlPath, 1043 fullHtmlPath,
1043 dumpRenderTreeOptions, 1044 contentShellOptions,
1044 dartFlags, 1045 dartFlags,
1045 expectedOutput)); 1046 expectedOutput));
1046 } 1047 }
1047 1048
1048 // Create BrowserTestCase and queue it. 1049 // Create BrowserTestCase and queue it.
1049 String testDisplayName = '$suiteName/$testName'; 1050 String testDisplayName = '$suiteName/$testName';
1050 var testCase; 1051 var testCase;
1051 if (info.optionsFromFile['isMultiHtmlTest']) { 1052 if (info.optionsFromFile['isMultiHtmlTest']) {
1052 testDisplayName = '$testDisplayName/${subtestNames[subtestIndex]}'; 1053 testDisplayName = '$testDisplayName/${subtestNames[subtestIndex]}';
1053 testCase = new BrowserTestCase(testDisplayName, 1054 testCase = new BrowserTestCase(testDisplayName,
1054 commandSet, configuration, completeHandler, 1055 commandSet, configuration, completeHandler,
1055 expectations['$testName/${subtestNames[subtestIndex]}'], 1056 expectations['$testName/${subtestNames[subtestIndex]}'],
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1165 1166
1166 bool get hasRuntime { 1167 bool get hasRuntime {
1167 switch(configuration['runtime']) { 1168 switch(configuration['runtime']) {
1168 case 'none': 1169 case 'none':
1169 return false; 1170 return false;
1170 default: 1171 default:
1171 return true; 1172 return true;
1172 } 1173 }
1173 } 1174 }
1174 1175
1175 String get dumpRenderTreeFilename { 1176 String get contentShellFilename {
1176 if (configuration['drt'] != '') { 1177 if (configuration['drt'] != '') {
1177 return configuration['drt']; 1178 return configuration['drt'];
1178 } 1179 }
1179 if (Platform.operatingSystem == 'macos') { 1180 if (Platform.operatingSystem == 'macos') {
1180 return dartDir.append('/client/tests/drt/DumpRenderTree.app/Contents/' 1181 return dartDir.append('/client/tests/drt/Content Shell.app/Contents/'
1181 'MacOS/DumpRenderTree').toNativePath(); 1182 'MacOS/Content Shell').toNativePath();
1182 } 1183 }
1183 return dartDir.append('client/tests/drt/DumpRenderTree').toNativePath(); 1184 return dartDir.append('client/tests/drt/content_shell').toNativePath();
1184 } 1185 }
1185 1186
1186 String get dartiumFilename { 1187 String get dartiumFilename {
1187 if (configuration['dartium'] != '') { 1188 if (configuration['dartium'] != '') {
1188 return configuration['dartium']; 1189 return configuration['dartium'];
1189 } 1190 }
1190 if (Platform.operatingSystem == 'macos') { 1191 if (Platform.operatingSystem == 'macos') {
1191 return dartDir.append('client/tests/dartium/Chromium.app/Contents/' 1192 return dartDir.append('client/tests/dartium/Chromium.app/Contents/'
1192 'MacOS/Chromium').toNativePath(); 1193 'MacOS/Chromium').toNativePath();
1193 } 1194 }
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after
1929 * $pass tests are expected to pass 1930 * $pass tests are expected to pass
1930 * $failOk tests are expected to fail that we won't fix 1931 * $failOk tests are expected to fail that we won't fix
1931 * $fail tests are expected to fail that we should fix 1932 * $fail tests are expected to fail that we should fix
1932 * $crash tests are expected to crash that we should fix 1933 * $crash tests are expected to crash that we should fix
1933 * $timeout tests are allowed to timeout 1934 * $timeout tests are allowed to timeout
1934 * $compileErrorSkip tests are skipped on browsers due to compile-time error 1935 * $compileErrorSkip tests are skipped on browsers due to compile-time error
1935 """; 1936 """;
1936 print(report); 1937 print(report);
1937 } 1938 }
1938 } 1939 }
OLDNEW
« no previous file with comments | « tools/testing/dart/test_runner.dart ('k') | utils/apidoc/mdn/extractRunner.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698