Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 994 if (compiler != 'none' && | 994 if (compiler != 'none' && |
| 995 customHtml.readAsStringSync().contains('polymer/boot.js')) { | 995 customHtml.readAsStringSync().contains('polymer/boot.js')) { |
| 996 | 996 |
| 997 commands.add(_polymerDeployCommand( | 997 commands.add(_polymerDeployCommand( |
| 998 customHtmlPath, tempDir, optionsFromFile)); | 998 customHtmlPath, tempDir, optionsFromFile)); |
| 999 | 999 |
| 1000 htmlPath = '$tempDir/test/$nameNoExt.html'; | 1000 htmlPath = '$tempDir/test/$nameNoExt.html'; |
| 1001 dartWrapperFilename = '${htmlPath}_bootstrap.dart'; | 1001 dartWrapperFilename = '${htmlPath}_bootstrap.dart'; |
| 1002 compiledDartWrapperFilename = '$dartWrapperFilename.js'; | 1002 compiledDartWrapperFilename = '$dartWrapperFilename.js'; |
| 1003 } else { | 1003 } else { |
| 1004 htmlPath = customHtmlPath; | 1004 htmlPath = '$tempDir/test.html'; |
| 1005 dartWrapperFilename = filePath.toNativePath(); | |
|
ahe
2013/09/25 08:37:06
It's really hard for ricow@ and kustermann@ to kee
| |
| 1006 | |
| 1007 var htmlContents = customHtml.readAsStringSync(); | |
| 1008 if (compiler == 'none') { | |
| 1009 htmlContents = htmlContents.replaceAll('%TEST_SCRIPTS%', | |
| 1010 '<script type="application/dart" ' | |
| 1011 'src="${_createUrlPathFromFile(filePath)}"></script>\n' | |
| 1012 '<script type="text/javascript" ' | |
| 1013 'src="/packages/browser/dart.js"></script>'); | |
| 1014 } else { | |
| 1015 htmlContents = htmlContents.replaceAll('%TEST_SCRIPTS%', | |
| 1016 '<script src="$nameNoExt.js"></script>'); | |
| 1017 compiledDartWrapperFilename = '$tempDir/$nameNoExt.js'; | |
|
kustermann
2013/09/25 09:28:27
Recently dart2js has been changed to emit a "test.
| |
| 1018 } | |
| 1019 new File(htmlPath).writeAsStringSync(htmlContents); | |
| 1005 } | 1020 } |
| 1006 } else { | 1021 } else { |
| 1007 htmlPath = '$tempDir/test.html'; | 1022 htmlPath = '$tempDir/test.html'; |
| 1008 if (isWrappingRequired && !isWebTest) { | 1023 if (isWrappingRequired && !isWebTest) { |
| 1009 // test.dart will import the dart test. | 1024 // test.dart will import the dart test. |
| 1010 _createWrapperFile(dartWrapperFilename, filePath); | 1025 _createWrapperFile(dartWrapperFilename, filePath); |
| 1011 } else { | 1026 } else { |
| 1012 dartWrapperFilename = filename; | 1027 dartWrapperFilename = filename; |
| 1013 } | 1028 } |
| 1014 | 1029 |
| (...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2031 * $pass tests are expected to pass | 2046 * $pass tests are expected to pass |
| 2032 * $failOk tests are expected to fail that we won't fix | 2047 * $failOk tests are expected to fail that we won't fix |
| 2033 * $fail tests are expected to fail that we should fix | 2048 * $fail tests are expected to fail that we should fix |
| 2034 * $crash tests are expected to crash that we should fix | 2049 * $crash tests are expected to crash that we should fix |
| 2035 * $timeout tests are allowed to timeout | 2050 * $timeout tests are allowed to timeout |
| 2036 * $compileErrorSkip tests are skipped on browsers due to compile-time error | 2051 * $compileErrorSkip tests are skipped on browsers due to compile-time error |
| 2037 """; | 2052 """; |
| 2038 print(report); | 2053 print(report); |
| 2039 } | 2054 } |
| 2040 } | 2055 } |
| OLD | NEW |