From a595d247a4abb101e08a3e8cc5d6c5fd6a833bf0 Mon Sep 17 00:00:00 2001 From: Daniel Freedman Date: Mon, 5 Nov 2018 11:56:14 -0800 Subject: [PATCH] fix transform of test file, only test unscoped dom in shady builds --- tests/app/index.html | 2 +- tests/prepare-tests.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/app/index.html b/tests/app/index.html index d8256c6..44e0623 100644 --- a/tests/app/index.html +++ b/tests/app/index.html @@ -137,7 +137,7 @@ const div = Polymer.dom(root).querySelector('div'); assertComputed(div, '10px'); assertComputed(div, 'rgb(255, 0, 255)', 'background-color'); - if ((Polymer.Settings && !Polymer.Settings.useShadow) || (window.ShadyCSS && !window.ShadyCSS.nativeShadow)) { + if (buildType === 'shady') { const testEl = document.createElement('div'); testEl.setAttribute('unscoped', ''); testEl.classList.add('included'); diff --git a/tests/prepare-tests.sh b/tests/prepare-tests.sh index b660924..a76f3d2 100755 --- a/tests/prepare-tests.sh +++ b/tests/prepare-tests.sh @@ -23,7 +23,7 @@ build(){ cp -rv tests/app/* "tests/${outputDir}/" - bin/polymer-css-build --polymer-version=${version} ${shady} ${noInline} --file tests/${outputDir}/index.html tests/${outputDir}/x-app.html tests/${outputDir}/x-app-dom-module.html tests/${outputDir}/x-app-definition.js tests/${outputDir}/x-component.html tests/${outputDir}/shared/shared-style.html tests/${outputDir}/x-nested-apply.html tests/${outputDir}/cr-bug.html tests/${outputDir}/class-element.js tests/${outputDir}/polymer-1-vars.html + bin/polymer-css-build --polymer-version=${version} ${shady} ${noInline} --file tests/${outputDir}/index.html tests/${outputDir}/x-app.html tests/${outputDir}/x-app-dom-module.html tests/${outputDir}/x-app-definition.js tests/${outputDir}/x-component.html tests/${outputDir}/shared/shared-style.html tests/${outputDir}/x-nested-apply.html tests/${outputDir}/cr-bug.html tests/${outputDir}/class-element.js tests/${outputDir}/polymer-1-vars.html tests/${outputDir}/shady-unscoped.html (cd tests/${outputDir}; npx bower install polymer#${version} web-component-tester) }