Chromium Code Reviews| Index: tools/testing/dart/test_suite.dart |
| diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart |
| index 64aa4020b569c451f2405e642008485febe9b5e7..c1f4f10303e8cf76c1076c526aa1644891e18061 100644 |
| --- a/tools/testing/dart/test_suite.dart |
| +++ b/tools/testing/dart/test_suite.dart |
| @@ -914,6 +914,11 @@ class StandardTestSuite extends TestSuite { |
| int subtestIndex = 0; |
| // Construct the command that executes the browser test |
| do { |
| + List<Command> commandSet = new List<Command>.from(commands); |
|
ricow1
2012/12/17 13:45:57
add comment describing what we use this for
kustermann
2012/12/17 14:00:47
Done.
|
| + if (subtestIndex != 0) { |
| + commandSet = []; |
| + } |
| + |
| List<String> args = <String>[]; |
| String fullHtmlPath = htmlPath.startsWith('http:') ? htmlPath : |
| (htmlPath.startsWith('/') ? |
| @@ -923,6 +928,7 @@ class StandardTestSuite extends TestSuite { |
| && subtestNames.length > 0) { |
| fullHtmlPath = '${fullHtmlPath}#${subtestNames[subtestIndex]}'; |
| } |
| + |
| if (TestUtils.usesWebDriver(runtime)) { |
| args = [ |
| dartDir.append('tools/testing/run_selenium.py').toNativePath(), |
| @@ -932,40 +938,52 @@ class StandardTestSuite extends TestSuite { |
| if (runtime == 'dartium') { |
| args.add('--executable=$dartiumFilename'); |
| } |
| - } else { |
| - args = [ |
| - dartDir.append('tools/testing/drt-trampoline.py').toNativePath(), |
| - dumpRenderTreeFilename, |
| - '--no-timeout' |
| - ]; |
| - if (compiler == 'none') { |
| - String packageRoot = |
| - packageRootArgument(optionsFromFile['packageRoot']); |
| - if (packageRoot != null) { |
| - args.add(packageRoot); |
| - } |
| + if (subtestIndex != 0) { |
| + args.add('--force-refresh'); |
| } |
| - if (runtime == 'drt' && |
| - (compiler == 'none' || compiler == 'dart2dart')) { |
| - var dartFlags = ['--ignore-unrecognized-flags']; |
| + commandSet.add(new Command('python', args)); |
| + } else { |
| + Expect.isTrue(runtime == "drt"); |
| + |
| + var dartFlags = []; |
| + var dumpRenderTreeOptions = []; |
| + var packageRootUri; |
| + |
| + dumpRenderTreeOptions.add('--no-timeout'); |
| + |
| + if (compiler == 'none' || compiler == 'dart2dart') { |
| + dartFlags.add('--ignore-unrecognized-flags'); |
| if (configuration["checked"]) { |
| dartFlags.add('--enable_asserts'); |
| dartFlags.add("--enable_type_checks"); |
| } |
| dartFlags.addAll(vmOptions); |
| - args.add('--dart-flags=${Strings.join(dartFlags, " ")}'); |
| } |
| - args.add(fullHtmlPath); |
| + if (compiler == 'none') { |
| + var packageRoot = packageRootArgument( |
| + optionsFromFile['packageRoot']); |
| + if (packageRoot != null) { |
| + var absolutePath = TestUtils.absolutePath(new Path(packageRoot)); |
| + packageRootUri = new Uri.fromComponents( |
| + scheme: 'file', |
| + path: absolutePath.toString()); |
| + } |
| + } |
| + |
| if (expectedOutput != null) { |
| - args.add('--out-expectation=${expectedOutput.toNativePath()}'); |
| + if (expectedOutput.toNativePath().endsWith('.png')) { |
| + // pixel tests are specified by running DRT "foo.html'-p" |
| + dumpRenderTreeOptions.add('--notree'); |
| + fullHtmlPath = "${fullHtmlPath}'-p"; |
| + } |
| } |
| + commandSet.add(new DumpRenderTreeCommand(dumpRenderTreeFilename, |
| + fullHtmlPath, |
| + dumpRenderTreeOptions, |
| + dartFlags, |
| + packageRootUri, |
| + expectedOutput)); |
| } |
| - List<Command> commandSet = new List<Command>.from(commands); |
| - if (subtestIndex != 0) { |
| - commandSet = []; |
| - if(TestUtils.usesWebDriver(runtime)) args.add('--force-refresh'); |
| - } |
| - commandSet.add(new Command('python', args)); |
| // Create BrowserTestCase and queue it. |
| String testDisplayName = '$suiteName/$testName'; |