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

Side by Side Diff: pkg/polymer/test/js_interop_test.dart

Issue 723393003: update to polymer js 0.5.1 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: little bit of cleanup Created 6 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
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 library polymer.test.web.js_interop_test; 5 library polymer.test.web.js_interop_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:html'; 8 import 'dart:html';
9 import 'dart:js'; 9 import 'dart:js';
10 import 'package:polymer/polymer.dart'; 10 import 'package:polymer/polymer.dart';
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 expect(jsElem.shadowRoot.text, 'FOOBAR', reason: 'text unchanged'); 130 expect(jsElem.shadowRoot.text, 'FOOBAR', reason: 'text unchanged');
131 131
132 interop.callMethod('aJsMethod', [123]); 132 interop.callMethod('aJsMethod', [123]);
133 return flush(); 133 return flush();
134 }).then((_) { 134 }).then((_) {
135 expect(jsElem.shadowRoot.text, '900', reason: 'text set by JS method'); 135 expect(jsElem.shadowRoot.text, '900', reason: 'text set by JS method');
136 expect(interop['baz'], 777, reason: 'unchanged'); 136 expect(interop['baz'], 777, reason: 'unchanged');
137 }); 137 });
138 } 138 }
139 139
140 /// Calls Platform.flush() to flush Polymer.js pending operations, e.g. 140 /// Calls WebComponents.flush() to flush Polymer.js pending operations, e.g.
141 /// dirty checking for data-bindings. 141 /// dirty checking for data-bindings.
142 Future flush() { 142 Future flush() {
143 var Platform = context['Platform']; 143 var Polymer = context['Polymer'];
144 Platform.callMethod('flush'); 144 Polymer.callMethod('flush');
Siggi Cherem (dart-lang) 2014/11/25 17:53:41 same here as in instance.dart -- I thought this wo
jakemac 2014/12/01 18:42:50 Updated comment
145 145
146 var completer = new Completer(); 146 var completer = new Completer();
147 Platform.callMethod('endOfMicrotask', [() => completer.complete()]); 147 Polymer.callMethod('endOfMicrotask', [() => completer.complete()]);
148 return completer.future; 148 return completer.future;
149 } 149 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698