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

Side by Side Diff: utils/testrunner/utils.dart

Issue 10914049: Added support for layout render tests. These use expected values for the text render output from Du… (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « utils/testrunner/testrunner.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * Read the contents of a file [fileName] into a [List] of [String]s. 6 * Read the contents of a file [fileName] into a [List] of [String]s.
7 * If the file does not exist and [errorIfNoFile] is true, throw an 7 * If the file does not exist and [errorIfNoFile] is true, throw an
8 * exception, else return an empty list. 8 * exception, else return an empty list.
9 */ 9 */
10 List<String> getFileContents(String filename, bool errorIfNoFile) { 10 List<String> getFileContents(String filename, bool errorIfNoFile) {
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 if (--dirCount == 0) { 93 if (--dirCount == 0) {
94 onComplete(files); 94 onComplete(files);
95 } 95 }
96 } 96 }
97 97
98 /** Delete a file. */ 98 /** Delete a file. */
99 void deleteFile(String fname) { 99 void deleteFile(String fname) {
100 var f = new File(fname); 100 var f = new File(fname);
101 f.deleteSync(); 101 f.deleteSync();
102 } 102 }
103
104 /** Get the name of the layout render file for a test. */
105 String layoutFileName(String testname) =>
106 testname.replaceAll(new RegExp('\.dart\$'), '.render');
107
108 /** Check if a test is a layout render test. renders.
109 */
110 bool isLayoutRenderTest(String testname) {
111 var layoutname = layoutFileName(testname);
112 var f = new File(layoutname);
113 return f.existsSync();
114 }
OLDNEW
« no previous file with comments | « utils/testrunner/testrunner.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698