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

Side by Side Diff: lib/pub_serve.dart

Issue 1086213002: Support a @Timeout annotation. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: CHANGELOG + README Created 5 years, 8 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
« no previous file with comments | « README.md ('k') | lib/src/backend/invoker.dart » ('j') | 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 import 'dart:convert'; 5 import 'dart:convert';
6 6
7 import 'package:barback/barback.dart'; 7 import 'package:barback/barback.dart';
8 import 'package:path/path.dart' as p; 8 import 'package:path/path.dart' as p;
9 9
10 /// A transformer that injects bootstrapping code used by the test runner to run 10 /// A transformer that injects bootstrapping code used by the test runner to run
(...skipping 17 matching lines...) Expand all
28 var id = transform.primaryInput.id; 28 var id = transform.primaryInput.id;
29 29
30 transform.addOutput( 30 transform.addOutput(
31 new Asset.fromString(id.addExtension('.vm_test.dart'), ''' 31 new Asset.fromString(id.addExtension('.vm_test.dart'), '''
32 import "package:test/src/runner/vm/isolate_listener.dart"; 32 import "package:test/src/runner/vm/isolate_listener.dart";
33 33
34 import "${p.url.basename(id.path)}" as test; 34 import "${p.url.basename(id.path)}" as test;
35 35
36 void main(_, Map message) { 36 void main(_, Map message) {
37 var sendPort = message['reply']; 37 var sendPort = message['reply'];
38 IsolateListener.start(sendPort, () => test.main); 38 var metadata = new Metadata.deserialize(message['metadata']);
39 IsolateListener.start(sendPort, metadata, () => test.main);
39 } 40 }
40 ''')); 41 '''));
41 42
42 var browserId = id.addExtension('.browser_test.dart'); 43 var browserId = id.addExtension('.browser_test.dart');
43 transform.addOutput(new Asset.fromString(browserId, ''' 44 transform.addOutput(new Asset.fromString(browserId, '''
44 import "package:test/src/runner/browser/iframe_listener.dart"; 45 import "package:test/src/runner/browser/iframe_listener.dart";
45 46
46 import "${p.url.basename(id.path)}" as test; 47 import "${p.url.basename(id.path)}" as test;
47 48
48 void main(_) { 49 void main(_) {
49 IframeListener.start(() => test.main); 50 IframeListener.start(() => test.main);
50 } 51 }
51 ''')); 52 '''));
52 53
53 transform.addOutput( 54 transform.addOutput(
54 new Asset.fromString(id.addExtension('.browser_test.html'), ''' 55 new Asset.fromString(id.addExtension('.browser_test.html'), '''
55 <!DOCTYPE html> 56 <!DOCTYPE html>
56 <html> 57 <html>
57 <head> 58 <head>
58 <title>${HTML_ESCAPE.convert(id.path)} Test</title> 59 <title>${HTML_ESCAPE.convert(id.path)} Test</title>
59 <script src="${HTML_ESCAPE.convert(p.url.basename(browserId.path))}.js"> 60 <script src="${HTML_ESCAPE.convert(p.url.basename(browserId.path))}.js">
60 </script> 61 </script>
61 </head> 62 </head>
62 </html> 63 </html>
63 ''')); 64 '''));
64 } 65 }
65 } 66 }
OLDNEW
« no previous file with comments | « README.md ('k') | lib/src/backend/invoker.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698