mirror of
https://github.com/Polymer/polymer.git
synced 2025-02-25 18:55:30 -06:00
91 lines
2.8 KiB
HTML
91 lines
2.8 KiB
HTML
<!doctype html>
|
|
<!--
|
|
@license
|
|
Copyright (c) 2014 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 src="../../web-component-tester/browser.js"></script>
|
|
</head>
|
|
<body>
|
|
<script>
|
|
|
|
var suites = [
|
|
'unit/bind.html',
|
|
'unit/notify-path.html',
|
|
'unit/shady.html',
|
|
'unit/shady-events.html',
|
|
'unit/shady-content.html',
|
|
'unit/shady-dynamic.html',
|
|
'unit/styling-cross-scope-var.html',
|
|
'unit/styling-cross-scope-apply.html',
|
|
'unit/styling-cross-scope-unknown-host.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/template-whitespace.html',
|
|
'unit/resolveurl.html',
|
|
'unit/case-map.html',
|
|
'unit/configure.html',
|
|
'unit/ready-attached-order.html',
|
|
'unit/attributes.html',
|
|
'unit/async.html',
|
|
'unit/behaviors.html',
|
|
'unit/polymer.element.html',
|
|
'unit/polymer.legacyelement.html',
|
|
'unit/debounce.html',
|
|
'unit/inheritance.html',
|
|
'unit/path.html',
|
|
'unit/templatizer.html',
|
|
'unit/dom-repeat.html',
|
|
'unit/dom-if.html',
|
|
'unit/dom-bind.html',
|
|
'unit/polymer-dom.html',
|
|
'unit/polymer-dom-observeNodes.html',
|
|
'unit/importHref-element.html'
|
|
];
|
|
|
|
// http://eddmann.com/posts/cartesian-product-in-javascript/
|
|
function flatten(arr) { return [].concat.apply([], arr) }
|
|
function product(sets) {
|
|
return sets.reduce(function(acc, set) {
|
|
return flatten(acc.map(function(x) {
|
|
return set.map(function(y) { return x.concat(y); });
|
|
}));
|
|
}, [[]]);
|
|
}
|
|
function combinations(suites, flags) {
|
|
return product(flags).reduce(function(list, f) {
|
|
f = f.filter(function(i) { return i; }).join('&');
|
|
return list.concat(suites.map(function(s) { return s + (f ? '?' + f : '') }))
|
|
}, []);
|
|
}
|
|
|
|
var ce = [''];
|
|
// if native is available, make sure to test polyfill
|
|
if (window.customElements) {
|
|
ce.push('wc-register=true');
|
|
}
|
|
|
|
var shady = [''];
|
|
// if native is available, make sure to test polyfill
|
|
if (Element.prototype.attachShadow) {
|
|
shady.push('wc-shadydom=true');
|
|
}
|
|
|
|
suites = combinations(suites, [ce, shady]);
|
|
console.log('Testing suites:\n\t' + suites.join('\n\t'));
|
|
|
|
WCT.loadSuites(suites);
|
|
</script>
|
|
</body>
|
|
</html>
|