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

Unified Diff: pkg/polymer/test/events_test.dart

Issue 27307004: Converting Polymer's WebComponentsLoaded to an onReady future (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/polymer/test/event_path_test.dart ('k') | pkg/polymer/test/take_attributes_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/test/events_test.dart
diff --git a/pkg/polymer/test/events_test.dart b/pkg/polymer/test/events_test.dart
index 91993291b556e519de28afa6540dd72f0bbafadf..ea35149e37b0b11e3a52e11f75614cb165608d74 100644
--- a/pkg/polymer/test/events_test.dart
+++ b/pkg/polymer/test/events_test.dart
@@ -5,36 +5,34 @@
library polymer.test.web.events_test;
import 'dart:html';
-import 'dart:async';
-import 'package:unittest/unittest.dart';
+import 'package:polymer/polymer.dart';
import 'package:unittest/html_config.dart';
+import 'package:unittest/unittest.dart';
main() {
useHtmlConfiguration();
+ setUp(() => Polymer.onReady);
+
test('host event', () {
// Note: this test is currently the only event in
// polymer/test/js/events.js at commit #7936ff8
- Timer.run(expectAsync0(() {
- var testA = query('#a');
- expect(testA.xtag.clicks, isEmpty);
- testA.click();
- expect(testA.xtag.clicks, ['host click on: test-a (id a)']);
- }));
+ var testA = query('#a');
+ expect(testA.xtag.clicks, isEmpty);
+ testA.click();
+ expect(testA.xtag.clicks, ['host click on: test-a (id a)']);
});
test('local event', () {
- Timer.run(expectAsync0(() {
- var testB = query('#b');
- expect(testB.xtag.clicks, isEmpty);
- testB.click();
- expect(testB.xtag.clicks, []);
- var b1 = testB.shadowRoot.query('#b-1');
- b1.click();
- expect(testB.xtag.clicks, []);
- var b2 = testB.shadowRoot.query('#b-2');
- b2.click();
- expect(testB.xtag.clicks, ['local click under test-b (id b) on b-2']);
- }));
+ var testB = query('#b');
+ expect(testB.xtag.clicks, isEmpty);
+ testB.click();
+ expect(testB.xtag.clicks, []);
+ var b1 = testB.shadowRoot.query('#b-1');
+ b1.click();
+ expect(testB.xtag.clicks, []);
+ var b2 = testB.shadowRoot.query('#b-2');
+ b2.click();
+ expect(testB.xtag.clicks, ['local click under test-b (id b) on b-2']);
});
}
« no previous file with comments | « pkg/polymer/test/event_path_test.dart ('k') | pkg/polymer/test/take_attributes_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698