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

Side by Side Diff: samples/third_party/dromaeo/Dromaeo.dart

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 import 'dart:html'; 1 import 'dart:html';
2 import 'dart:json'; 2 import 'dart:json' as json;
3 import 'dart:math' as Math; 3 import 'dart:math' as Math;
4 import 'Suites.dart'; 4 import 'Suites.dart';
5 5
6 main() { 6 main() {
7 new Dromaeo().run(); 7 new Dromaeo().run();
8 } 8 }
9 9
10 class SuiteController { 10 class SuiteController {
11 final SuiteDescription _suiteDescription; 11 final SuiteDescription _suiteDescription;
12 final IFrameElement _suiteIframe; 12 final IFrameElement _suiteIframe;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 final List<SuiteController> _suiteControllers; 88 final List<SuiteController> _suiteControllers;
89 Function _handler; 89 Function _handler;
90 90
91 Dromaeo() 91 Dromaeo()
92 : _suiteControllers = new List<SuiteController>() 92 : _suiteControllers = new List<SuiteController>()
93 { 93 {
94 _handler = _createHandler(); 94 _handler = _createHandler();
95 window.on.message.add( 95 window.on.message.add(
96 (MessageEvent event) { 96 (MessageEvent event) {
97 try { 97 try {
98 final response = JSON.parse(event.data); 98 final response = json.parse(event.data);
99 _handler = _handler(response['command'], response['data']); 99 _handler = _handler(response['command'], response['data']);
100 } catch (e, stacktrace) { 100 } catch (e, stacktrace) {
101 window.alert('Exception: ${e}: ${stacktrace}'); 101 window.alert('Exception: ${e}: ${stacktrace}');
102 } 102 }
103 }, 103 },
104 false 104 false
105 ); 105 );
106 } 106 }
107 107
108 run() { 108 run() {
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 } 213 }
214 214
215 Element _byId(String id) { 215 Element _byId(String id) {
216 return document.query('#$id'); 216 return document.query('#$id');
217 } 217 }
218 218
219 int get _suitesTotal { 219 int get _suitesTotal {
220 return _suiteControllers.length; 220 return _suiteControllers.length;
221 } 221 }
222 } 222 }
OLDNEW
« no previous file with comments | « samples/tests/samples/chat/chat_server_test.dart ('k') | samples/third_party/dromaeo/Suites.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698