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

Side by Side Diff: client/dom/benchmarks/dromaeo/Dromaeo.dart

Issue 8586002: Fixed a compile error (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 years, 1 month 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 | « no previous file | 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 #import('dart:dom'); 1 #import('dart:dom');
2 #import('dart:json'); 2 #import('dart:json');
3 #import('Suites.dart'); 3 #import('Suites.dart');
4 4
5 main() { 5 main() {
6 window.onload = (Event evt) { 6 window.onload = (Event evt) {
7 new Dromaeo().run(); 7 new Dromaeo().run();
8 }; 8 };
9 } 9 }
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 div.setAttribute('class', clazz); 83 div.setAttribute('class', clazz);
84 return div; 84 return div;
85 } 85 }
86 } 86 }
87 87
88 class Dromaeo { 88 class Dromaeo {
89 final List<SuiteController> _suiteControllers; 89 final List<SuiteController> _suiteControllers;
90 Function _handler; 90 Function _handler;
91 91
92 Dromaeo() 92 Dromaeo()
93 : _suiteControllers = new List<SuiteController>(), 93 : _suiteControllers = new List<SuiteController>()
94 _handler = _createHandler()
95 { 94 {
95 _handler = _createHandler();
96 window.addEventListener( 96 window.addEventListener(
97 'message', 97 'message',
98 (MessageEvent event) { 98 (MessageEvent event) {
99 try { 99 try {
100 final response = JSON.parse(event.data); 100 final response = JSON.parse(event.data);
101 _handler = _handler(response['command'], response['data']); 101 _handler = _handler(response['command'], response['data']);
102 } catch (final e, final stacktrace) { 102 } catch (final e, final stacktrace) {
103 window.alert('Exception: ${e}: ${stacktrace}'); 103 window.alert('Exception: ${e}: ${stacktrace}');
104 } 104 }
105 }, 105 },
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 } 199 }
200 200
201 HTMLElement _byId(String id) { 201 HTMLElement _byId(String id) {
202 return document.getElementById(id); 202 return document.getElementById(id);
203 } 203 }
204 204
205 int get _suitesTotal() { 205 int get _suitesTotal() {
206 return _suiteControllers.length; 206 return _suiteControllers.length;
207 } 207 }
208 } 208 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698