| 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 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1346 contentShellFilename, | 1346 contentShellFilename, |
| 1347 fullHtmlPath, | 1347 fullHtmlPath, |
| 1348 contentShellOptions, | 1348 contentShellOptions, |
| 1349 dartFlags, | 1349 dartFlags, |
| 1350 environmentOverrides)); | 1350 environmentOverrides)); |
| 1351 } else { | 1351 } else { |
| 1352 commandSet.add( | 1352 commandSet.add( |
| 1353 CommandBuilder.instance.getBrowserTestCommand( | 1353 CommandBuilder.instance.getBrowserTestCommand( |
| 1354 runtime, | 1354 runtime, |
| 1355 fullHtmlPath, | 1355 fullHtmlPath, |
| 1356 configuration)); | 1356 configuration, |
| 1357 !isNegative(info))); |
| 1357 } | 1358 } |
| 1358 | 1359 |
| 1359 // Create BrowserTestCase and queue it. | 1360 // Create BrowserTestCase and queue it. |
| 1360 var fullTestName = multitest ? '$testName/$subtestName' : testName; | 1361 var fullTestName = multitest ? '$testName/$subtestName' : testName; |
| 1361 var expectation = multitest ? expectations[fullTestName] : expectations; | 1362 var expectation = multitest ? expectations[fullTestName] : expectations; |
| 1362 var testCase = new BrowserTestCase( | 1363 var testCase = new BrowserTestCase( |
| 1363 '$suiteName/$fullTestName', | 1364 '$suiteName/$fullTestName', |
| 1364 commandSet, | 1365 commandSet, |
| 1365 configuration, | 1366 configuration, |
| 1366 expectation, | 1367 expectation, |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1429 } | 1430 } |
| 1430 final Uri htmlFile = tempUri.resolve(filePath.filename); | 1431 final Uri htmlFile = tempUri.resolve(filePath.filename); |
| 1431 new File.fromUri(htmlFile).writeAsStringSync(contents); | 1432 new File.fromUri(htmlFile).writeAsStringSync(contents); |
| 1432 | 1433 |
| 1433 var htmlPath = _createUrlPathFromFile(new Path(htmlFile.toFilePath())); | 1434 var htmlPath = _createUrlPathFromFile(new Path(htmlFile.toFilePath())); |
| 1434 var fullHtmlPath = _getUriForBrowserTest(htmlPath, null).toString(); | 1435 var fullHtmlPath = _getUriForBrowserTest(htmlPath, null).toString(); |
| 1435 commands.add(CommandBuilder.instance.getBrowserHtmlTestCommand( | 1436 commands.add(CommandBuilder.instance.getBrowserHtmlTestCommand( |
| 1436 runtime, | 1437 runtime, |
| 1437 fullHtmlPath, | 1438 fullHtmlPath, |
| 1438 configuration, | 1439 configuration, |
| 1439 info.expectedMessages)); | 1440 info.expectedMessages, |
| 1441 !isNegative(info))); |
| 1440 String testDisplayName = '$suiteName/$testName'; | 1442 String testDisplayName = '$suiteName/$testName'; |
| 1441 var testCase = new BrowserTestCase( | 1443 var testCase = new BrowserTestCase( |
| 1442 testDisplayName, | 1444 testDisplayName, |
| 1443 commands, | 1445 commands, |
| 1444 configuration, | 1446 configuration, |
| 1445 expectations, | 1447 expectations, |
| 1446 info, | 1448 info, |
| 1447 isNegative(info), | 1449 isNegative(info), |
| 1448 fullHtmlPath); | 1450 fullHtmlPath); |
| 1449 enqueueNewTestCase(testCase); | 1451 enqueueNewTestCase(testCase); |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1836 File customHtml = new File(customHtmlPath.toNativePath()); | 1838 File customHtml = new File(customHtmlPath.toNativePath()); |
| 1837 if (!customHtml.existsSync()) { | 1839 if (!customHtml.existsSync()) { |
| 1838 super.enqueueBrowserTest(baseCommands, packageRoot, | 1840 super.enqueueBrowserTest(baseCommands, packageRoot, |
| 1839 info, testName, expectations); | 1841 info, testName, expectations); |
| 1840 } else { | 1842 } else { |
| 1841 Path relativeHtml = customHtmlPath.relativeTo(TestUtils.dartDir); | 1843 Path relativeHtml = customHtmlPath.relativeTo(TestUtils.dartDir); |
| 1842 List<Command> commands = []..addAll(baseCommands); | 1844 List<Command> commands = []..addAll(baseCommands); |
| 1843 var fullPath = _createUrlPathFromFile(customHtmlPath); | 1845 var fullPath = _createUrlPathFromFile(customHtmlPath); |
| 1844 | 1846 |
| 1845 commands.add(CommandBuilder.instance.getBrowserTestCommand( | 1847 commands.add(CommandBuilder.instance.getBrowserTestCommand( |
| 1846 runtime, fullPath, configuration)); | 1848 runtime, fullPath, configuration, !isNegative(info))); |
| 1847 String testDisplayName = '$suiteName/$testName'; | 1849 String testDisplayName = '$suiteName/$testName'; |
| 1848 enqueueNewTestCase(new BrowserTestCase(testDisplayName, | 1850 enqueueNewTestCase(new BrowserTestCase(testDisplayName, |
| 1849 commands, | 1851 commands, |
| 1850 configuration, | 1852 configuration, |
| 1851 expectations, | 1853 expectations, |
| 1852 info, | 1854 info, |
| 1853 isNegative(info), | 1855 isNegative(info), |
| 1854 relativeHtml.toNativePath())); | 1856 relativeHtml.toNativePath())); |
| 1855 | 1857 |
| 1856 } | 1858 } |
| (...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2482 * $pass tests are expected to pass | 2484 * $pass tests are expected to pass |
| 2483 * $failOk tests are expected to fail that we won't fix | 2485 * $failOk tests are expected to fail that we won't fix |
| 2484 * $fail tests are expected to fail that we should fix | 2486 * $fail tests are expected to fail that we should fix |
| 2485 * $crash tests are expected to crash that we should fix | 2487 * $crash tests are expected to crash that we should fix |
| 2486 * $timeout tests are allowed to timeout | 2488 * $timeout tests are allowed to timeout |
| 2487 * $compileErrorSkip tests are skipped on browsers due to compile-time error | 2489 * $compileErrorSkip tests are skipped on browsers due to compile-time error |
| 2488 """; | 2490 """; |
| 2489 print(report); | 2491 print(report); |
| 2490 } | 2492 } |
| 2491 } | 2493 } |
| OLD | NEW |