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

Unified Diff: tools/testing/dart/test_runner.dart

Issue 9649011: Take out force browser close. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/test_runner.dart
===================================================================
--- tools/testing/dart/test_runner.dart (revision 5195)
+++ tools/testing/dart/test_runner.dart (working copy)
@@ -484,9 +484,8 @@
for (var line in testCase.output.stderr) print(line);
for (var line in testCase.output.stdout) print(line);
}
- if (allowRetries != null && allowRetries
- && testCase.usesWebDriver && testCase.output.unexpectedOutput
- && testCase.numRetries > 0) {
+ if (allowRetries && testCase.usesWebDriver
Bill Hesse 2012/03/09 09:37:03 According to the spec, the optional [this.allowRet
+ && testCase.output.unexpectedOutput && testCase.numRetries > 0) {
// Selenium tests can be flaky. Try rerunning.
testCase.output.requestRetry = true;
}
@@ -867,54 +866,12 @@
}
/**
- * Sometimes Webdriver doesn't close every browser window when it's done
- * with a test. At the end of all tests we clear out any neglected processes
- * that are still running.
- */
- void killZombieBrowsers() {
- String chromeName = 'chrome';
- if (new Platform().operatingSystem() == 'macos') {
- chromeName = 'Google\ Chrome';
- }
- Map<String, List<String>> processNames = {'ie': ['iexplore'],
- 'safari': ['Safari'], 'ff': ['firefox', 'firefox-bin'],
- 'chrome': ['chromedriver', chromeName]};
- for (String name in processNames[browserUsed]) {
- Process process = null;
- if (new Platform().operatingSystem() == 'windows') {
- process = new Process.start(
- 'C:\\Windows\\System32\\taskkill.exe', ['/F', '/IM', name + '.exe',
- '/T']);
- } else {
- process = new Process.start('killall', ['-9', name]);
- }
-
- if (name == processNames[browserUsed].last()) {
- process.onExit = (exitCode) {
- process.close();
- _progress.allDone();
- };
- process.onError = (error) {
- _progress.allDone();
- };
- } else {
- process.onExit = (exitCode) {
- process.close();
- };
- }
- }
- }
-
- /**
* Perform any cleanup needed once all tests in a TestSuite have completed
* and notify our progress indicator that we are done.
*/
void _cleanupAndMarkDone() {
- if (browserUsed != '' && _progress is BuildbotProgressIndicator) {
- killZombieBrowsers();
- if (_seleniumServer != null) {
+ if (browserUsed != '' && _seleniumServer != null) {
_seleniumServer.kill();
- }
} else {
_progress.allDone();
}
@@ -1110,7 +1067,9 @@
_tests.addFirst(test);
return;
}
- if (_verbose) print(test.commands.last().commandLine);
+ if (_verbose) {
+ for (Command command in test.commands) print(command.commandLine);
+ }
_progress.start(test);
Function oldCallback = test.completedHandler;
Function wrapper = (TestCase test_arg) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698