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

Unified Diff: test/iron_a11y_announcer_test.dart

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 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 | « test/fixtures/x_list.html ('k') | test/iron_a11y_keys_behavior_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/iron_a11y_announcer_test.dart
diff --git a/test/iron_a11y_announcer_test.dart b/test/iron_a11y_announcer_test.dart
index 1a3e414f9f21db2c355a607c27098eb82e4d060b..7fb1d06508125da66102d3cb03053d60cfed2e8f 100644
--- a/test/iron_a11y_announcer_test.dart
+++ b/test/iron_a11y_announcer_test.dart
@@ -6,6 +6,7 @@ library polymer_elements.test.iron_a11y_announcer_test;
import 'dart:async';
import 'dart:html';
+import 'dart:js';
import 'package:polymer_elements/iron_a11y_announcer.dart';
import 'package:web_components/web_components.dart';
import 'package:test/test.dart';
@@ -21,9 +22,8 @@ main() async {
});
test('announces when there is an iron-announce event', () async {
- var event = new CustomEvent('iron-announce',
- canBubble: true, detail: {'text': 'foo'});
- document.body.dispatchEvent(event);
+ announcer.fire('iron-announce',
+ detail: {'text': 'foo'}, node: document.body);
// Text isn't set for 100ms
await new Future.delayed(new Duration(milliseconds: 200), () {});
expect(announcer.jsElement['_text'], 'foo');
« no previous file with comments | « test/fixtures/x_list.html ('k') | test/iron_a11y_keys_behavior_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698