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

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

Issue 10966020: Added support for running an HTTP server during the test and being able to serve up static files. L… (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
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 * A pipeline task to create a HTML/CSS wrapper for a test so it can run in DRT. 6 * A pipeline task to create a HTML/CSS wrapper for a test so it can run in DRT.
7 */ 7 */
8 class HtmlWrapTask extends PipelineTask { 8 class HtmlWrapTask extends PipelineTask {
9 final String _testFileTemplate; 9 final String _testFileTemplate;
10 final String _htmlSourceFileTemplate; 10 final String _htmlSourceFileTemplate;
11 final String _htmlDestFileTemplate; 11 final String _htmlDestFileTemplate;
12 final String _cssSourceFileTemplate; 12 final String _cssSourceFileTemplate;
13 final String _cssDestFileTemplate; 13 final String _cssDestFileTemplate;
14 14
15 HtmlWrapTask(this._testFileTemplate, this._htmlSourceFileTemplate, 15 HtmlWrapTask(this._testFileTemplate, this._htmlSourceFileTemplate,
16 this._htmlDestFileTemplate, this._cssSourceFileTemplate, 16 this._htmlDestFileTemplate, this._cssSourceFileTemplate,
17 this._cssDestFileTemplate); 17 this._cssDestFileTemplate);
18 18
19 void execute(Path testfile, List stdout, List stderr, bool logging, 19 execute(Path testfile, List stdout, List stderr, bool logging,
20 Function exitHandler) { 20 Function exitHandler) {
21 var testname = expandMacros(_testFileTemplate, testfile); 21 var testname = expandMacros(_testFileTemplate, testfile);
22 22
23 // If the test already has a corresponding HTML file we copy that, 23 // If the test already has a corresponding HTML file we copy that,
24 // else we create a new wrapper. 24 // else we create a new wrapper.
25 var htmlSourceName = expandMacros(_htmlSourceFileTemplate, testfile); 25 var htmlSourceName = expandMacros(_htmlSourceFileTemplate, testfile);
26 var htmlDestName = expandMacros(_htmlDestFileTemplate, testfile); 26 var htmlDestName = expandMacros(_htmlDestFileTemplate, testfile);
27 var cssSourceName = expandMacros(_cssSourceFileTemplate, testfile); 27 var cssSourceName = expandMacros(_cssSourceFileTemplate, testfile);
28 var cssDestName = expandMacros(_cssDestFileTemplate, testfile); 28 var cssDestName = expandMacros(_cssDestFileTemplate, testfile);
29 29
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 } 144 }
145 exitHandler(0); 145 exitHandler(0);
146 } 146 }
147 147
148 void cleanup(Path testfile, List stdout, List stderr, 148 void cleanup(Path testfile, List stdout, List stderr,
149 bool logging, bool keepFiles) { 149 bool logging, bool keepFiles) {
150 deleteFiles([_htmlDestFileTemplate, _cssDestFileTemplate], testfile, 150 deleteFiles([_htmlDestFileTemplate, _cssDestFileTemplate], testfile,
151 logging, keepFiles, stdout); 151 logging, keepFiles, stdout);
152 } 152 }
153 } 153 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698