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; |
+ }); |
+ }); |
}); |
} |