1<!doctype html> 2<!-- 3@license 4Copyright (c) 2014 The Polymer Project Authors. All rights reserved. 5This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt 6The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt 7The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt 8Code distributed by Google as part of the polymer project is also 9subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt 10--> 11<script> 12WCT = {waitFor: function (cb) {HTMLImports.whenReady(cb)}} 13</script> 14<script src="./test-flags.js"></script> 15<script src="../node_modules/wct-browser-legacy/browser.js"></script> 16<script src="../node_modules/@webcomponents/webcomponents-platform/webcomponents-platform.js"></script> 17<script src="../node_modules/es6-promise/dist/es6-promise.auto.min.js"></script> 18<script src="../node_modules/@webcomponents/template/template.js"></script> 19<script src="../node_modules/@webcomponents/html-imports/html-imports.min.js"></script> 20<script src="../node_modules/@webcomponents/shadydom/shadydom.min.js"></script> 21<script src="../node_modules/@webcomponents/custom-elements/custom-elements.min.js"></script> 22<script src="../scoping-shim.min.js"></script> 23<script src="../apply-shim.min.js"></script> 24<script src="../custom-style-interface.min.js"></script> 25<script src="module/generated/make-element.js"></script> 26<script src="module/generated/custom-style-element.js"></script> 27<link rel="import" href="html-imports/custom-style-import.html"> 28 29<template id="x-import"> 30 <style> 31 :host { 32 border: 2px solid var(--color, black); 33 } 34 </style> 35</template> 36 37<x-import id="target"></x-import> 38 39<script> 40 suite('Custom Style upgrades', function() { 41 suiteSetup(function() { 42 makeElement('x-import'); 43 }); 44 test('custom-style in import provides styling', function() { 45 var target = document.querySelector('#target'); 46 assert.equal(getComputedStyle(target).borderColor, 'rgb(0, 0, 255)'); 47 }); 48 }); 49</script>