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

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

Issue 23596007: Remove usage of dart:json. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase. Created 7 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 part of dromaeo; 1 part of dromaeo;
2 2
3 typedef void Test(); 3 typedef void Test();
4 typedef void Operation(); 4 typedef void Operation();
5 typedef void Reporter(Map<String, Result> results); 5 typedef void Reporter(Map<String, Result> results);
6 6
7 class Suite { 7 class Suite {
8 /** 8 /**
9 * Ctor. 9 * Ctor.
10 * [:_window:] The window of the suite. 10 * [:_window:] The window of the suite.
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 'error': result.error, 106 'error': result.error,
107 'percent': (100.0 * _nRanTests / _nTests) 107 'percent': (100.0 * _nRanTests / _nTests)
108 }); 108 });
109 } 109 }
110 110
111 _postMessage(String command, [var data = null]) { 111 _postMessage(String command, [var data = null]) {
112 final payload = { 'command': command }; 112 final payload = { 'command': command };
113 if (data != null) { 113 if (data != null) {
114 payload['data'] = data; 114 payload['data'] = data;
115 } 115 }
116 _window.top.postMessage(json.stringify(payload), '*'); 116 _window.top.postMessage(JSON.encode(payload), '*');
117 } 117 }
118 118
119 // Implementation. 119 // Implementation.
120 120
121 final Window _window; 121 final Window _window;
122 final String _name; 122 final String _name;
123 123
124 List<Operation> _operations; 124 List<Operation> _operations;
125 int _nTests; 125 int _nTests;
126 int _nRanTests; 126 int _nRanTests;
127 127
128 Suite _addOperation(Operation operation) { 128 Suite _addOperation(Operation operation) {
129 _operations.add(operation); 129 _operations.add(operation);
130 return this; 130 return this;
131 } 131 }
132 } 132 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698