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

Unified Diff: test/iron_icon_test.dart

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: update pubspec/changelog 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
Index: test/iron_icon_test.dart
diff --git a/test/iron_icon_test.dart b/test/iron_icon_test.dart
index 087cfc191a65e5db5386235a18927651cad732ca..4d585fdaff7b77bfe20fdc2e8a74b8398b51cbfe 100644
--- a/test/iron_icon_test.dart
+++ b/test/iron_icon_test.dart
@@ -69,11 +69,27 @@ main() async {
style.backgroundPosition, contains(new RegExp(r'-24px 0(%|px)')));
});
});
+
group('when no icon source is provided', () {
test('will politely wait for an icon source without throwing', () {
document.createElement('iron-icon');
fixture('WithoutAnIconSource');
});
});
+
+ group('when loading async', () {
+ test('will get icon after iconset is added', () {
+ var icon = fixture('UsingAsyncIconset');
+ expect(hasIcon(icon), isFalse);
+
+ var done = window.on['iron-iconset-added'].first.then((_) {
+ expect(hasIcon(icon), isTrue,
+ reason: 'icon didn\'t load after iconset loaded');
+ });
+ fixture('AsyncIconset');
+
+ return done;
+ });
+ });
});
}

Powered by Google App Engine
This is Rietveld 408576698