Skip to content

Commit

Permalink
Use webcomponents-lite for test
Browse files Browse the repository at this point in the history
Need to test with flags

Move back to WebComponentsReady event
  • Loading branch information
dfreedm committed Mar 13, 2017
1 parent 71b70aa commit 50ae3bb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
1 change: 0 additions & 1 deletion lib/mixins/lazy-upgrade-mixin.html
Expand Up @@ -64,7 +64,6 @@

/** @polymerMixinClass */
return class LazyUpgrade extends base {
// add a configurable
static get properties() {
return {
/**
Expand Down
15 changes: 6 additions & 9 deletions test/unit/lazy-upgrade.html
Expand Up @@ -9,7 +9,7 @@
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<meta charset="utf-8">
<script src="../../../webcomponentsjs/webcomponents-loader.js"></script>
<script src="../../../webcomponentsjs/webcomponents-lite.js"></script>
<script src="../../../web-component-tester/browser.js"></script>
<link rel="import" href="../../polymer-element.html">
<link rel="import" href="../../lib/elements/dom-if.html">
Expand All @@ -18,10 +18,7 @@
<link rel="import" href="../../lib/utils/debounce.html">

<script>
let Loaded = new Promise((resolve) => {
addEventListener('WebComponentsReady', () => {resolve()});
});
Loaded.then(function() {
addEventListener('WebComponentsReady', function() {
let async = Polymer.Async.timeOut.after(150);
window.LazyParentMixin = class LazyParent extends Polymer.LazyUpgradeMixin(Polymer.Element) {
static get observers() {
Expand Down Expand Up @@ -54,7 +51,7 @@
</style>
</template>
<script>
Loaded.then(function() {
addEventListener('WebComponentsReady', function() {
class LazyChild extends Polymer.Element {
static get is() {return 'lazy-child'}
ready() {
Expand All @@ -81,7 +78,7 @@
</dom-if>
</template>
<script>
Loaded.then(function() {
addEventListener('WebComponentsReady', function() {
customElements.define('lazy-upgrade-shadow', class extends window.LazyParentMixin {
static get is() { return 'lazy-upgrade-shadow' }
});
Expand All @@ -91,7 +88,7 @@

<dom-module id="lazy-parent">
<script>
Loaded.then(function() {
addEventListener('WebComponentsReady', function() {
customElements.define('lazy-parent', class extends window.LazyParentMixin {});
});
</script>
Expand Down Expand Up @@ -143,7 +140,7 @@
</template>
</dom-module>
<script>
Loaded.then(() => {
addEventListener('WebComponentsReady', () => {
customElements.define('no-upgrade-shadow', class extends Polymer.Element {
static get is() { return 'no-upgrade-shadow' }
});
Expand Down

0 comments on commit 50ae3bb

Please sign in to comment.