| Index: polymer_1.2.3/bower_components/iron-icon/test/iron-icon.html
|
| diff --git a/polymer_1.0.4/bower_components/iron-icon/test/iron-icon.html b/polymer_1.2.3/bower_components/iron-icon/test/iron-icon.html
|
| similarity index 77%
|
| copy from polymer_1.0.4/bower_components/iron-icon/test/iron-icon.html
|
| copy to polymer_1.2.3/bower_components/iron-icon/test/iron-icon.html
|
| index 3b8202f12d44258b2669117cc79396ed8dc966f3..dcc45ee394a6c2aed87bc5eb6bd9747406927393 100644
|
| --- a/polymer_1.0.4/bower_components/iron-icon/test/iron-icon.html
|
| +++ b/polymer_1.2.3/bower_components/iron-icon/test/iron-icon.html
|
| @@ -22,6 +22,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
|
|
| <link rel="import" href="../iron-icon.html">
|
| <link rel="import" href="../../iron-iconset/iron-iconset.html">
|
| + <link rel="import" href="../../promise-polyfill/promise-polyfill.html">
|
| <link rel="import" href="../../test-fixture/test-fixture.html">
|
|
|
| </head>
|
| @@ -48,6 +49,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
| </template>
|
| </test-fixture>
|
|
|
| + <test-fixture id="UsingAsyncIconset">
|
| + <template>
|
| + <iron-icon icon="async:location"></iron-icon>
|
| + </template>
|
| + </test-fixture>
|
| +
|
| + <test-fixture id="AsyncIconset">
|
| + <template>
|
| + <iron-iconset name="async" icons="location blank" src="location.png" size="24" width="48"></iron-iconset>
|
| + </template>
|
| + </test-fixture>
|
| +
|
| <script>
|
| function iconElementFor (node) {
|
| var nodes = Polymer.dom(node.root).childNodes;
|
| @@ -113,6 +126,23 @@ suite('<iron-icon>', function() {
|
| fixture('WithoutAnIconSource');
|
| });
|
| })
|
| +
|
| + suite('when loading async', function() {
|
| + test('will get icon after iconset is added', function() {
|
| + var icon = fixture('UsingAsyncIconset');
|
| + expect(hasIcon(icon)).to.be.false;
|
| + return new Promise(function(resolve, reject) {
|
| + window.addEventListener('iron-iconset-added', function() {
|
| + if (hasIcon(icon)) {
|
| + resolve();
|
| + } else {
|
| + reject(new Error('icon didn\'t load after iconset loaded'));
|
| + }
|
| + });
|
| + fixture('AsyncIconset');
|
| + });
|
| + });
|
| + });
|
| });
|
| </script>
|
|
|
|
|