From 26747422d3cdb7b65c0cc464ee5bc5be0f045b94 Mon Sep 17 00:00:00 2001 From: Steven Orvell Date: Thu, 26 Apr 2018 17:18:07 -0700 Subject: [PATCH] Fixes styling tests related to using HTML Imports * [styling-scoped.html] remove test for as this is no longer supported * [custom-style-async.html] convert test that used importHref to use dynamic import --- test/unit/custom-style-async-import.js | 31 +++++++ test/unit/custom-style-async.html | 2 +- test/unit/styling-import.html | 119 ------------------------- test/unit/styling-import1.css | 12 --- test/unit/styling-import2.css | 13 --- test/unit/styling-scoped.html | 19 ---- 6 files changed, 32 insertions(+), 164 deletions(-) create mode 100644 test/unit/custom-style-async-import.js delete mode 100644 test/unit/styling-import.html delete mode 100644 test/unit/styling-import1.css delete mode 100644 test/unit/styling-import2.css diff --git a/test/unit/custom-style-async-import.js b/test/unit/custom-style-async-import.js new file mode 100644 index 0000000000..be7293a937 --- /dev/null +++ b/test/unit/custom-style-async-import.js @@ -0,0 +1,31 @@ +import { Polymer } from '../../lib/legacy/polymer-fn.js'; + +const $_documentContainer = document.createElement('div'); + +$_documentContainer.innerHTML = ` + + + + +`; + +document.body.appendChild($_documentContainer); + +Polymer({ + is: 'x-client' +}); diff --git a/test/unit/custom-style-async.html b/test/unit/custom-style-async.html index 41af8f62d5..ce22058451 100644 --- a/test/unit/custom-style-async.html +++ b/test/unit/custom-style-async.html @@ -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(); diff --git a/test/unit/styling-import.html b/test/unit/styling-import.html deleted file mode 100644 index e02f61d789..0000000000 --- a/test/unit/styling-import.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/unit/styling-import1.css b/test/unit/styling-import1.css deleted file mode 100644 index 3933bf3be0..0000000000 --- a/test/unit/styling-import1.css +++ /dev/null @@ -1,12 +0,0 @@ -/* -@license -Copyright (c) 2017 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt -Code distributed by Google as part of the polymer project is also -subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt -*/ -#one { - border: 1px solid orange; -} \ No newline at end of file diff --git a/test/unit/styling-import2.css b/test/unit/styling-import2.css deleted file mode 100644 index a9bde78ba2..0000000000 --- a/test/unit/styling-import2.css +++ /dev/null @@ -1,13 +0,0 @@ -/* -@license -Copyright (c) 2017 The Polymer Project Authors. All rights reserved. -This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt -The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt -The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt -Code distributed by Google as part of the polymer project is also -subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt -*/ -#two { - display: block; - border: 2px solid brown; -} \ No newline at end of file diff --git a/test/unit/styling-scoped.html b/test/unit/styling-scoped.html index 8282a1ea9e..7d9f287752 100644 --- a/test/unit/styling-scoped.html +++ b/test/unit/styling-scoped.html @@ -687,19 +687,6 @@ - - - - - - -