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

Side by Side Diff: dart/tests/try/web/sandbox.dart

Issue 740273003: Incremental compiler: support optional arguments. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r42234. Created 6 years 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 | « dart/tests/try/web/incremental_compilation_update_test.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 /// Helper library that creates an iframe sandbox that can be used to load 5 /// Helper library that creates an iframe sandbox that can be used to load
6 /// code. 6 /// code.
7 library trydart.test.sandbox; 7 library trydart.test.sandbox;
8 8
9 import 'dart:html'; 9 import 'dart:html';
10 import 'dart:async'; 10 import 'dart:async';
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 switch (message) { 95 switch (message) {
96 case 'dart-calling-main': 96 case 'dart-calling-main':
97 case 'dart-main-done': 97 case 'dart-main-done':
98 case 'unittest-suite-done': 98 case 'unittest-suite-done':
99 case 'unittest-suite-fail': 99 case 'unittest-suite-fail':
100 case 'unittest-suite-success': 100 case 'unittest-suite-success':
101 case 'unittest-suite-wait-for-done': 101 case 'unittest-suite-wait-for-done':
102 break; 102 break;
103 103
104 default: 104 default:
105 completer.completeError('Unexpected message: "$message".'); 105 completer.completeError(
106 'Unexpected message: "$message" (expected "$expectedMessage").');
106 } 107 }
107 } 108 }
108 } 109 }
109 110
110 Future expect(data) { 111 Future expect(data) {
111 if (data is String) { 112 if (data is String) {
112 Expect.isTrue(completer == null || completer.isCompleted); 113 Expect.isTrue(completer == null || completer.isCompleted);
113 expectedMessage = data; 114 expectedMessage = data;
114 completer = new Completer(); 115 completer = new Completer();
115 return completer.future; 116 return completer.future;
116 } else if (data is Iterable) { 117 } else if (data is Iterable) {
117 return Future.forEach(data, expect); 118 return Future.forEach(data, expect);
118 } else { 119 } else {
119 throw 'Unexpected data type: ${data.runtimeType}.'; 120 throw 'Unexpected data type: ${data.runtimeType}.';
120 } 121 }
121 } 122 }
122 123
123 void start() { 124 void start() {
124 wallclock = new Stopwatch()..start(); 125 wallclock = new Stopwatch()..start();
125 window.onMessage.listen(onMessage); 126 window.onMessage.listen(onMessage);
126 } 127 }
127 } 128 }
OLDNEW
« no previous file with comments | « dart/tests/try/web/incremental_compilation_update_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698