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

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

Issue 9969053: Lift restrictions for browser test to pass. (Closed) Base URL: https://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
diff --git a/tools/testing/dart/test_runner.dart b/tools/testing/dart/test_runner.dart
index 059306cbff83d101cd13038db27525f905cfa908..d2c9f8ac572dfa49a26b1d7a223309957abc62b9 100644
--- a/tools/testing/dart/test_runner.dart
+++ b/tools/testing/dart/test_runner.dart
@@ -314,13 +314,19 @@ class BrowserTestOutputImpl extends TestOutputImpl {
}
// Browser tests fail unless stdout contains
- // 'Content-Type: text/plain\nPASS'.
- String previous_line = '';
+ // 'Content-Type: text/plain' followed by 'PASS'.
+ bool has_content_type = false;
for (String line in super.stdout) {
- if (line == 'PASS' && previous_line == 'Content-Type: text/plain') {
- return (exitCode != 0 && !hasCrashed);
+ switch (line) {
+ case 'Content-Type: text/plain':
+ has_content_type = true;
+ break;
+
+ case 'PASS':
+ if (has_content_type) {
+ return (exitCode != 0 && !hasCrashed);
+ }
}
- previous_line = line;
}
return true;
}
« 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