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

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

Issue 695893002: Working SimpleHTML test front end (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 6 years, 1 month 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
Index: tools/testing/dart/test_runner.dart
diff --git a/tools/testing/dart/test_runner.dart b/tools/testing/dart/test_runner.dart
index befa478fe6b86a455ff86d1bbbff190801136335..23c37b2a60ca6cf28ef51ae97476e3c28286ce5d 100644
--- a/tools/testing/dart/test_runner.dart
+++ b/tools/testing/dart/test_runner.dart
@@ -290,6 +290,24 @@ class BrowserTestCommand extends Command {
}
}
+class BrowserHtmlTestCommand extends BrowserTestCommand {
+ List<String> expectedMessages;
+ BrowserHtmlTestCommand._(String browser,
+ String url,
+ Map configuration,
+ this.expectedMessages)
+ : super._(browser, url, configuration);
+
+ void _buildHashCode(HashCodeBuilder builder) {
+ super._buildHashCode(builder);
+ builder.addJson(expectedMessages);
+ }
+
+ bool _equal(BrowserHtmlTestCommand other) =>
+ super._equal(other) &&
+ identical(expectedMessages, other.expectedMessages);
+}
+
class AnalysisCommand extends ProcessCommand {
final String flavor;
@@ -553,6 +571,15 @@ class CommandBuilder {
return _getUniqueCommand(command);
}
+ BrowserHtmlTestCommand getBrowserHtmlTestCommand(String browser,
+ String url,
+ Map configuration,
+ List<String> expectedMessages) {
+ var command = new BrowserHtmlTestCommand._(
+ browser, url, configuration, expectedMessages);
+ return _getUniqueCommand(command);
+ }
+
CompilationCommand getCompilationCommand(String displayName,
outputFile,
neverSkipCompilation,
@@ -2346,7 +2373,7 @@ class CommandQueue {
_numProcesses--;
if (isBrowserCommand) _numBrowserProcesses--;
- // Don't loose a process
+ // Don't lose a process
Timer.run(() => _tryRunNextCommand());
});
}
@@ -2499,9 +2526,14 @@ class CommandExecutorImpl implements CommandExecutor {
completer.complete(
new BrowserControllerTestOutcome(browserCommand, output));
};
- BrowserTest browserTest = new BrowserTest(browserCommand.url,
- callback,
- timeout);
+
+ BrowserTest browserTest;
+ if (browserCommand is BrowserHtmlTestCommand) {
+ browserTest = new HtmlTest(browserCommand.url, callback, timeout,
+ browserCommand.expectedMessages);
+ } else {
+ browserTest = new BrowserTest(browserCommand.url, callback, timeout);
+ }
_getBrowserTestRunner(browserCommand.browser, browserCommand.configuration)
.then((testRunner) {
testRunner.queueTest(browserTest);

Powered by Google App Engine
This is Rietveld 408576698