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

Unified Diff: utils/testrunner/utils.dart

Issue 10909240: Support for pixel layout tests. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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
Index: utils/testrunner/utils.dart
===================================================================
--- utils/testrunner/utils.dart (revision 12649)
+++ utils/testrunner/utils.dart (working copy)
@@ -96,19 +96,24 @@
}
/** Delete a file. */
-void deleteFile(String fname) {
+bool deleteFile(String fname) {
var f = new File(fname);
- f.deleteSync();
+ try {
+ f.deleteSync();
+ } catch (e) {
+ return false;
+ }
+ return true;
}
-/** Get the name of the layout render file for a test. */
-String layoutFileName(String testname) =>
- testname.replaceAll(new RegExp('\.dart\$'), '.render');
+/**
+ * Get the directory that testrunner lives in; we need it to import
+ * support files into the generated scripts.
+ */
-/** Check if a test is a layout render test. renders.
- */
-bool isLayoutRenderTest(String testname) {
- var layoutname = layoutFileName(testname);
- var f = new File(layoutname);
- return f.existsSync();
+String get runnerDirectory() {
+ var libDirectory = makePathAbsolute(new Options().script);
+ return libDirectory.substring(0,
+ libDirectory.lastIndexOf(Platform.pathSeparator));
}
+
« utils/testrunner/layout_test_controller.dart ('K') | « utils/testrunner/testrunner.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698