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

Side by Side Diff: samples/third_party/dromaeo/tests/RunnerSuite.dart

Issue 10910013: Remove instances of dart:dom_deprecated from outside of lib/html and lib/dom. Part 1 of many. (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 typedef void Test(); 1 typedef void Test();
2 typedef void Operation(); 2 typedef void Operation();
3 typedef void Reporter(Map<String, Result> results); 3 typedef void Reporter(Map<String, Result> results);
4 4
5 class Suite { 5 class Suite {
6 /** 6 /**
7 * Ctor. 7 * Ctor.
8 * [:_window:] The window of the suite. 8 * [:_window:] The window of the suite.
9 * [:_name:] The name of the suite. 9 * [:_name:] The name of the suite.
10 */ 10 */
11 Suite(this._window, this._name) : 11 Suite(this._window, this._name) :
12 _operations = new List<Operation>(), 12 _operations = new List<Operation>(),
13 _nTests = 0, _nRanTests = 0 { 13 _nTests = 0, _nRanTests = 0 {
14 starter(MessageEvent event) { 14 starter(MessageEvent event) {
15 String command = event.data; 15 String command = event.data;
16 switch (command) { 16 switch (command) {
17 case 'start': 17 case 'start':
18 _run(); 18 _run();
19 return; 19 return;
20 default: 20 default:
21 _window.alert('[${_name}]: unknown command ${command}'); 21 _window.alert('[${_name}]: unknown command ${command}');
22 } 22 }
23 }; 23 };
24 try { 24 _window.on.message.add(starter);
25 // dart:dom_deprecated
26 _window.addEventListener('message', starter, false);
Siggi Cherem (dart-lang) 2012/08/30 20:26:21 mmm.. not sure if they would like to keep also a b
Emily Fortuna 2012/08/30 20:28:06 We stopped tracking this a while ago on the bots.
27 } on NoSuchMethodException catch (e) {
28 // dart:html
29 _window.on.message.add(starter);
30 }
31 } 25 }
32 26
33 /** 27 /**
34 * Adds a preparation step to the suite. 28 * Adds a preparation step to the suite.
35 * [:operation:] The operation to be performed. 29 * [:operation:] The operation to be performed.
36 */ 30 */
37 Suite prep(Operation operation){ 31 Suite prep(Operation operation){
38 return _addOperation(operation); 32 return _addOperation(operation);
39 } 33 }
40 34
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 121
128 List<Operation> _operations; 122 List<Operation> _operations;
129 int _nTests; 123 int _nTests;
130 int _nRanTests; 124 int _nRanTests;
131 125
132 Suite _addOperation(Operation operation) { 126 Suite _addOperation(Operation operation) {
133 _operations.add(operation); 127 _operations.add(operation);
134 return this; 128 return this;
135 } 129 }
136 } 130 }
OLDNEW
« no previous file with comments | « samples/third_party/dromaeo/Suites.dart ('k') | samples/third_party/dromaeo/tests/dom-attr-dom.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698