UNPKG

@polymer/polymer

Version:

The Polymer library makes it easy to create your own web components. Give your element some markup and properties, and then use it on a site. Polymer provides features like dynamic templates and data binding to reduce the amount of boilerplate you need to

132 lines (125 loc) 4.64 kB
<!doctype html> <!-- @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 --> <html> <head> <meta charset="utf-8"> <script> WCT = { mochaOptions: { timeout: 60000 } } </script> <script src="../../web-component-tester/browser.js"></script> </head> <body> <script> 'use strict'; let suites = [ 'unit/globals.html', 'unit/property-accessors.html', 'unit/template-stamp.html', 'unit/property-effects.html', 'unit/property-effects-template.html', 'unit/path-effects.html', 'unit/shady.html', 'unit/shady-events.html', 'unit/shady-content.html', 'unit/shady-dynamic.html', 'unit/styling-scoped.html', 'unit/styling-cross-scope-var.html', 'unit/styling-cross-scope-apply.html', 'unit/styling-cross-scope-unknown-host.html', 'unit/styling-only-with-template.html', 'unit/custom-style.html', 'unit/custom-style-late.html', 'unit/custom-style-async.html', 'unit/custom-style-scope-cache.html', 'unit/events.html', 'unit/strict-template-policy.html', 'unit/template-whitespace.html', 'unit/resolveurl.html', 'unit/case-map.html', 'unit/configure.html', 'unit/ready-attached-order.html', 'unit/ready-attached-order-class.html', 'unit/attributes.html', 'unit/async.html', 'unit/behaviors.html', 'unit/behaviors.html?legacyOptimizations=true', 'unit/polymer.element.html', 'unit/polymer.properties-mixin.html', 'unit/polymer.properties-mixin-with-property-accessors.html', 'unit/polymer.legacyelement.html', 'unit/debounce.html', 'unit/inheritance.html', 'unit/path.html', 'unit/templatize.html', 'unit/dom-repeat.html', 'unit/dom-if.html', 'unit/dom-bind.html', 'unit/array-selector.html', 'unit/polymer-dom.html', 'unit/polymer-dom-observeNodes.html', 'unit/flattened-nodes-observer.html', 'unit/importHref.html', 'unit/dynamic-import.html', 'unit/gestures.html', 'unit/logging.html', 'unit/mixin-utils.html', 'unit/mixin-behaviors.html', 'unit/render-status.html', 'unit/dir.html', 'unit/disable-upgrade.html', 'unit/shady-unscoped-style.html', 'unit/html-tag.html', 'unit/legacy-data.html', // 'unit/multi-style.html' 'unit/class-properties.html' ]; function combinations(suites, flags) { return flags.map((f) => { return f ? suites.map(s => `${s}${s.match(/\?/) ? '&' : '?'}${f}`) : suites; }).reduce((arr, s) => arr.concat(s), []); } function addUrlOption(previous = '', next = '') { return previous + (previous ? '&' : '') + next; } // test shadowdom/custom elements polyfills together // preferring both if possible. let flags = ['']; if (window.customElements) { // NOTE: disabled because Native ShadowDOM and Polyfilled CustomElements is not an expected use-case. // flags.push('wc-ce=true'); } // if native is available, make sure to test polyfill if (Element.prototype.attachShadow && Node.prototype.getRootNode) { flags.push('wc-shadydom=true'); } // Both sd and ce are supported, force both polyfills if (flags.length === 2) { // Note: Disabled to speed up testing, may be reenabled at a later date when the test timing is less of an issue. // ce + sd becomes a single test iteration. // flags.push('wc-ce=true&wc-shadydom=true'); } // economize testing by testing css shimming // only against 1 environment (native or polyfill). if (window.CSS && CSS.supports && CSS.supports('box-shadow', '0 0 0 var(--foo)')) { // Note: Disabled to speed up testing, may be reenabled at a later date when the test timing is less of an issue. // let last = flags.length === 1 ? '' : flags[flags.length - 1]; // flags.push(addUrlOption(last, 'wc-shimcssproperties=true')); } suites = combinations(suites, flags); console.log('Testing suites:\n\t' + suites.join('\n\t')); WCT.loadSuites(suites); </script> </body> </html>