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

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

Issue 23539003: Turn on Polymer TodoMVC tests on Dart buildbots (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 7 years, 4 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 | « samples/third_party/todomvc/web/index.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/test_suite.dart
diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart
index dc7289f7e08517e80c1ca9e0fa2cae0869b5678c..4216b5ca63a266d9fed052281c6bd7a085dcc9fd 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -965,21 +965,29 @@ class StandardTestSuite extends TestSuite {
String content = null;
Path dir = filePath.directoryPath;
String nameNoExt = filePath.filenameWithoutExtension;
+
Path pngPath = dir.append('$nameNoExt.png');
Path txtPath = dir.append('$nameNoExt.txt');
+ Path customHtmlPath = dir.append('$nameNoExt.html');
Path expectedOutput = null;
- if (new File(pngPath.toNativePath()).existsSync()) {
- expectedOutput = pngPath;
- content = getHtmlLayoutContents(scriptType, new Path("$scriptPath"));
- } else if (new File(txtPath.toNativePath()).existsSync()) {
- expectedOutput = txtPath;
- content = getHtmlLayoutContents(scriptType, new Path("$scriptPath"));
+
+ if (new File(customHtmlPath.toNativePath()).existsSync()) {
+ // Use existing HTML document if available.
+ htmlPath = customHtmlPath.toNativePath();
} else {
- content = getHtmlContents(filename, scriptType,
- new Path("$scriptPath"));
+ if (new File(pngPath.toNativePath()).existsSync()) {
+ expectedOutput = pngPath;
+ content = getHtmlLayoutContents(scriptType, new Path("$scriptPath"));
+ } else if (new File(txtPath.toNativePath()).existsSync()) {
+ expectedOutput = txtPath;
+ content = getHtmlLayoutContents(scriptType, new Path("$scriptPath"));
+ } else {
+ content = getHtmlContents(filename, scriptType,
+ new Path("$scriptPath"));
+ }
+ htmlTest.writeStringSync(content);
+ htmlTest.closeSync();
}
- htmlTest.writeStringSync(content);
- htmlTest.closeSync();
// Construct the command(s) that compile all the inputs needed by the
// browser test. For running Dart in DRT, this will be noop commands.
« no previous file with comments | « samples/third_party/todomvc/web/index.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698