Skip to content

Fixes styling tests related to using HTML Imports #5207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions test/unit/custom-style-async-import.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { Polymer } from '../../lib/legacy/polymer-fn.js';

const $_documentContainer = document.createElement('div');

$_documentContainer.innerHTML = `<custom-style>
<style is="custom-style">
html {
--cs-blue: {
border : 8px solid blue;
};
}
</style>
</custom-style>
<dom-module id="x-client">
<template>
<style>
:host {
display: inline-block;
border : 4px solid red;
@apply (--cs-blue);
}
</style>
x-client
</template>
</dom-module>`;

document.body.appendChild($_documentContainer);

Polymer({
is: 'x-client'
});
2 changes: 1 addition & 1 deletion test/unit/custom-style-async.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
suite('async global custom-style', function() {

test('async loaded custom-style applies', function(done) {
host.importHref('custom-style-async-import.html', function() {
import('custom-style-async-import.js').then(() => {
afterNextRender(null, function() {
assertComputed(host.$.client, '8px');
done();
Expand Down
119 changes: 0 additions & 119 deletions test/unit/styling-import.html

This file was deleted.

12 changes: 0 additions & 12 deletions test/unit/styling-import1.css

This file was deleted.

13 changes: 0 additions & 13 deletions test/unit/styling-import2.css

This file was deleted.

19 changes: 0 additions & 19 deletions test/unit/styling-scoped.html
Original file line number Diff line number Diff line change
Expand Up @@ -687,19 +687,6 @@
</script>
</dom-module>

<dom-module id="x-only-link-style">
<link rel="import" type="css" href="styling-import-host.css">
<link rel="import" type="css" href="styling-import-host2.css">
<template></template>
<script type="module">
import { PolymerElement } from '../../polymer-element.js';
class XOnlyLink extends PolymerElement {
static get is() { return 'x-only-link-style'; }
}
customElements.define(XOnlyLink.is, XOnlyLink);
</script>
</dom-module>

<dom-module id="double-shared-style">
<template>
<style>
Expand Down Expand Up @@ -1006,12 +993,6 @@
assertComputed(e, '5px', 'padding-top');
});

test('elements without styles work', function() {
var e = document.createElement('x-only-link-style');
document.body.appendChild(e);
assertComputed(e, '2px');
});

});

suite('double including style sheets', function() {
Expand Down