Skip to content

Commit

Permalink
Clean up Polymer fn import
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpschaaf committed Apr 20, 2018
1 parent f126684 commit 8069dff
Show file tree
Hide file tree
Showing 25 changed files with 171 additions and 342 deletions.
3 changes: 1 addition & 2 deletions test/smoke/behavior-mixin.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
</template>
</dom-module>
<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
import { DomModule } from '../../lib/elements/dom-module.js';
import { mixinBehaviors } from '../../lib/legacy/class.js';
/** @polymerBehavior */
Expand Down
9 changes: 3 additions & 6 deletions test/smoke/data-table.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@
<slot></slot>
</template>
<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
Polymer({
is: 'data-popup'
});
Expand Down Expand Up @@ -97,8 +96,7 @@
<data-popup>{{value}}</data-popup>
</template>
<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
Polymer({
is: 'data-cell',
properties: {
Expand Down Expand Up @@ -159,8 +157,7 @@
</template>
</template>
<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
Polymer({
is: 'data-row',
properties: {
Expand Down
3 changes: 1 addition & 2 deletions test/smoke/passive-gestures.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@
</template>
</dom-module>
<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
Polymer({
is: 'x-passive',
listeners: {
Expand Down
6 changes: 2 additions & 4 deletions test/unit/behaviors.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@
</dom-module>

<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
window.BehaviorA = {
properties: {

Expand Down Expand Up @@ -311,8 +310,7 @@
</template>
</test-fixture>
<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';

suite('single behavior element', function() {
var el;
Expand Down
21 changes: 7 additions & 14 deletions test/unit/configure.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@
<span id="content">{{content}}</span>
</template>
<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
Polymer({

is: 'x-configure-value',
Expand Down Expand Up @@ -78,8 +77,7 @@
<span id="content">{{content}}</span>
</template>
<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
Polymer({

is: 'x-configure-gchild',
Expand Down Expand Up @@ -117,8 +115,7 @@
<x-configure-gchild id="gchild" content="{{content}}" object="{{object}}"></x-configure-gchild>
</template>
<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
Polymer({

is: 'x-configure-child',
Expand Down Expand Up @@ -185,8 +182,7 @@

<dom-module id="x-configure-simple-child">
<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
Polymer({

is: 'x-configure-simple-child',
Expand Down Expand Up @@ -218,8 +214,7 @@
<x-configure-simple-child id="simple" noeffect="{{simple}}"></x-configure-simple-child>
</template>
<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
Polymer({

is: 'x-configure-host',
Expand Down Expand Up @@ -324,8 +319,7 @@
<x-config-lazy-nodefaults prop="[[foo]]"></x-config-lazy-nodefaults>
</template>
<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
Polymer({
is: 'x-config-lazy-host',
properties: {
Expand All @@ -350,8 +344,7 @@
<x-configure-host content="attr"></x-configure-host>

<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';

function testValueAndChangeHandler(e, value) {
assert.equal(e.content, value, 'Property does not equal configured value');
Expand Down
3 changes: 1 addition & 2 deletions test/unit/custom-style-async.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@
</template>
</dom-module>
<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
Polymer({
is: 'x-host'
});
Expand Down
3 changes: 1 addition & 2 deletions test/unit/custom-style-late.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@
<x-input id="input"></x-input>

<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
import { afterNextRender } from '../../lib/utils/render-status.js';
/* global input */

Expand Down
3 changes: 1 addition & 2 deletions test/unit/custom-style-scope-cache.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
cache-element
</template>
<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
Polymer({
is: 'cache-element'
});
Expand Down
3 changes: 1 addition & 2 deletions test/unit/debounce.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
</test-fixture>

<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
import { Debouncer } from '../../lib/utils/debounce.js';
import { microTask, timeOut, animationFrame, idlePeriod } from '../../lib/utils/async.js';
Polymer({is: 'x-basic'});
Expand Down
6 changes: 2 additions & 4 deletions test/unit/globals.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
<div class$="{{stuff.is.here}}">{{bindings(are, cool)}}</div>
</template>
<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
Polymer({
is: 'global-test',
properties: {
Expand All @@ -64,8 +63,7 @@
<global-test></global-test>

<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';

suite('globals', function() {

Expand Down
3 changes: 1 addition & 2 deletions test/unit/logging.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
<body>
<dom-module id="x-logging">
<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
Polymer({
is: 'x-logging',
properties: {
Expand Down
3 changes: 1 addition & 2 deletions test/unit/mixin-behaviors.html
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,7 @@
</template>
</test-fixture>
<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
import { mixinBehaviors } from '../../lib/legacy/class.js';
import { PolymerElement } from '../../polymer-element.js';

Expand Down
3 changes: 1 addition & 2 deletions test/unit/multi-style.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@
</dom-module>

<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
import { PolymerElement } from '../../polymer-element.js';
import { DomModule } from '../../lib/elements/dom-module.js';
suite('elements including multiple styles', function() {
Expand Down
36 changes: 12 additions & 24 deletions test/unit/polymer-dom-observeNodes.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
<slot id="slot"></slot>
</template>
<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
import { dom } from '../../lib/legacy/polymer.dom.js';
Polymer({
is:'test-self-observe',
Expand All @@ -45,8 +44,7 @@
<div>static</div>
</template>
<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
Polymer({
is:'test-static'
});
Expand All @@ -58,8 +56,7 @@
<span id="slotContainer">[<slot id="slot"></slot>]</span>
</template>
<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
Polymer({
is:'test-slot'
});
Expand All @@ -71,8 +68,7 @@
<test-slot id="slot"><slot></slot></test-slot>
</template>
<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
Polymer({
is:'test-slot1'
});
Expand All @@ -84,8 +80,7 @@
<test-slot1 id="slot"><slot></slot></test-slot1>
</template>
<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
Polymer({
is:'test-slot2'
});
Expand All @@ -97,8 +92,7 @@
<test-slot2 id="slot"><slot></slot></test-slot2>
</template>
<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
Polymer({
is:'test-slot3'
});
Expand All @@ -110,8 +104,7 @@
<div id="slot"><slot></slot></div>
</template>
<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
Polymer({
is:'test-slot-raw'
});
Expand All @@ -123,8 +116,7 @@
[<slot id="slot" name="d"></slot>]
</template>
<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
Polymer({
is:'test-slot-attr'
});
Expand All @@ -136,8 +128,7 @@
<test-slot-attr id="slot"><slot name="c" slot="d"></slot></test-slot-attr>
</template>
<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
Polymer({
is:'test-slot-attr1'
});
Expand All @@ -149,8 +140,7 @@
<test-slot-attr1 id="slot"><slot name="b" slot="c"></slot></test-slot-attr1>
</template>
<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
Polymer({
is:'test-slot-attr2'
});
Expand All @@ -162,8 +152,7 @@
<test-slot-attr2 id="slot"><slot name="a" slot="b"></slot></test-slot-attr2>
</template>
<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
Polymer({
is:'test-slot-attr3'
});
Expand All @@ -175,8 +164,7 @@
<test-slot-attr3 id="slot"><slot name="a" slot="a"></slot></test-slot-attr3>
</template>
<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
Polymer({
is:'test-slot-attr-inside'
});
Expand Down
12 changes: 4 additions & 8 deletions test/unit/polymer-dom.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
<div id="container"><slot id="slot"></slot></div>
</template>
<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
Polymer({
is: 'x-slot'
});
Expand All @@ -36,8 +35,7 @@
<x-slot id="container"><div id="first">first</div><slot id="slot"></slot><div id="last">last</div></x-slot>
</template>
<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
Polymer({
is: 'x-container-slot'
});
Expand All @@ -49,8 +47,7 @@
<div id="scoped"></div>
</template>
<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
Polymer({
is: 'x-event-scoped',
fireComposed: function() {
Expand All @@ -65,8 +62,7 @@
<input id="focusable"></input>
</template>
<script type="module">
import '../../polymer-legacy.js';
import { Polymer } from '../../lib/legacy/polymer-fn.js';
import { Polymer } from '../../polymer-legacy.js';
Polymer({
is: 'x-focusable-in-shadow'
});
Expand Down
Loading

0 comments on commit 8069dff

Please sign in to comment.