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

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

Issue 15935008: Remove hackish way of getting the url for browser testing (Closed) Base URL: http://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
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 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 // commands will be executed. On subsequent loop iterations, we 990 // commands will be executed. On subsequent loop iterations, we
991 // don't need to do any compilations. Thus we set "commandSet = []". 991 // don't need to do any compilations. Thus we set "commandSet = []".
992 commandSet = []; 992 commandSet = [];
993 } 993 }
994 994
995 var htmlPath_subtest = _createUrlPathFromFile(new Path(htmlPath)); 995 var htmlPath_subtest = _createUrlPathFromFile(new Path(htmlPath));
996 var fullHtmlPath = _getUriForBrowserTest(info, htmlPath_subtest, 996 var fullHtmlPath = _getUriForBrowserTest(info, htmlPath_subtest,
997 subtestNames, subtestIndex); 997 subtestNames, subtestIndex);
998 998
999 List<String> args = <String>[]; 999 List<String> args = <String>[];
1000
1000 if (TestUtils.usesWebDriver(runtime)) { 1001 if (TestUtils.usesWebDriver(runtime)) {
1001 args = [ 1002 args = [
1002 dartDir.append('tools/testing/run_selenium.py').toNativePath(), 1003 dartDir.append('tools/testing/run_selenium.py').toNativePath(),
1003 '--browser=$runtime', 1004 '--browser=$runtime',
1004 // NOTE: This value will be overridden by the test runner 1005 // NOTE: This value will be overridden by the test runner
1005 '--timeout=${configuration['timeout']}', 1006 '--timeout=${configuration['timeout']}',
1006 '--out=$fullHtmlPath']; 1007 '--out=$fullHtmlPath'];
1007 if (runtime == 'dartium') { 1008 if (runtime == 'dartium') {
1008 args.add('--executable=$dartiumFilename'); 1009 args.add('--executable=$dartiumFilename');
1009 } 1010 }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
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]}'],
1056 info, info.hasCompileError || info.hasRuntimeError, 1057 info, info.hasCompileError || info.hasRuntimeError, fullHtmlPath,
1057 subtestIndex != 0); 1058 subtestIndex != 0);
1058 } else { 1059 } else {
1059 testCase = new BrowserTestCase(testDisplayName, 1060 testCase = new BrowserTestCase(testDisplayName,
1060 commandSet, configuration, completeHandler, expectations, 1061 commandSet, configuration, completeHandler, expectations,
1061 info, info.hasCompileError || info.hasRuntimeError, false); 1062 info, info.hasCompileError || info.hasRuntimeError, fullHtmlPath,
1063 false);
1062 } 1064 }
1063 if (subtestIndex == 0) { 1065 if (subtestIndex == 0) {
1064 multitestParentTest = testCase; 1066 multitestParentTest = testCase;
1065 } else { 1067 } else {
1066 multitestParentTest.addObserver(testCase); 1068 multitestParentTest.addObserver(testCase);
1067 } 1069 }
1070
1068 doTest(testCase); 1071 doTest(testCase);
1069 subtestIndex++; 1072 subtestIndex++;
1070 } while(subtestIndex < subtestNames.length); 1073 } while(subtestIndex < subtestNames.length);
1071 } 1074 }
1072 } 1075 }
1073 1076
1074 /** Helper to create a compilation command for a single input file. */ 1077 /** Helper to create a compilation command for a single input file. */
1075 Command _compileCommand(String inputFile, String outputFile, 1078 Command _compileCommand(String inputFile, String outputFile,
1076 String compiler, String dir, vmOptions, optionsFromFile) { 1079 String compiler, String dir, vmOptions, optionsFromFile) {
1077 String executable = compilerPath; 1080 String executable = compilerPath;
(...skipping 851 matching lines...) Expand 10 before | Expand all | Expand 10 after
1929 * $pass tests are expected to pass 1932 * $pass tests are expected to pass
1930 * $failOk tests are expected to fail that we won't fix 1933 * $failOk tests are expected to fail that we won't fix
1931 * $fail tests are expected to fail that we should fix 1934 * $fail tests are expected to fail that we should fix
1932 * $crash tests are expected to crash that we should fix 1935 * $crash tests are expected to crash that we should fix
1933 * $timeout tests are allowed to timeout 1936 * $timeout tests are allowed to timeout
1934 * $compileErrorSkip tests are skipped on browsers due to compile-time error 1937 * $compileErrorSkip tests are skipped on browsers due to compile-time error
1935 """; 1938 """;
1936 print(report); 1939 print(report);
1937 } 1940 }
1938 } 1941 }
OLDNEW
« tools/testing/dart/test_runner.dart ('K') | « tools/testing/dart/test_runner.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698