Index: lib/src/iron-iconset/test/iron-iconset.html |
diff --git a/lib/src/iron-iconset/test/iron-iconset.html b/lib/src/iron-iconset/test/iron-iconset.html |
index 74d4a0b3456b4c773a70bb871cb990d9ad2972b2..ffa4ae8dfc3b2aa0076fd5f5df72ebddfd78aace 100644 |
--- a/lib/src/iron-iconset/test/iron-iconset.html |
+++ b/lib/src/iron-iconset/test/iron-iconset.html |
@@ -22,6 +22,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN |
<link rel="import" href="../iron-iconset.html"> |
<link rel="import" href="../../iron-meta/iron-meta.html"> |
+ <link rel="import" href="../../promise-polyfill/promise-polyfill.html"> |
<link rel="import" href="../../test-fixture/test-fixture.html"> |
</head> |
@@ -63,8 +64,17 @@ suite('<iron-iconset>', function () { |
suite('basic behavior', function () { |
var iconset; |
var meta; |
+ var loadedPromise; |
setup(function () { |
+ loadedPromise = new Promise(function(resolve) { |
+ window.addEventListener('iron-iconset-added', function(ev) { |
+ if (ev && ev.detail === iconset) { |
+ resolve(); |
+ } |
+ }); |
+ }); |
+ |
var elements = fixture('TrivialIconset'); |
iconset = elements[0]; |
@@ -74,6 +84,10 @@ suite('<iron-iconset>', function () { |
test('it can be accessed via iron-meta', function () { |
expect(meta.byKey('foo')).to.be.equal(iconset); |
}); |
+ |
+ test('it fires an iron-iconset-added event on the window', function() { |
+ return loadedPromise; |
+ }); |
}); |
suite('when src, width, iconSize and icons are assigned', function () { |