Skip to content

Commit

Permalink
test more permutations
Browse files Browse the repository at this point in the history
  • Loading branch information
valdrinkoshi authored and TimvdLippe committed Nov 16, 2017
1 parent 41616c6 commit f03e8d1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test/runner.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,26 +101,26 @@
// test shadowdom/custom elements polyfills together
// preferring both if possible.
var matrix = [''];
var webcomponents = '';
if (window.customElements) {
webcomponents = 'wc-ce=true';
matrix.push('wc-ce=true');
}
// if native is available, make sure to test polyfill
if (Element.prototype.attachShadow && Node.prototype.getRootNode) {
webcomponents = addUrlOption(webcomponents, 'wc-shadydom=true');
matrix.push('wc-shadydom=true');
}
// ce + sd becomes a single test iteration.
if (webcomponents) {
matrix.push(webcomponents);
// Both sd and ce are supported, force both polyfills
if (matrix.length === 3) {
// ce + sd becomes a single test iteration.
matrix.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)')) {
var last = matrix[matrix.length-1];
var last = matrix.length === 1 ? '' : matrix[matrix.length - 1];
matrix.push(addUrlOption(last, 'wc-shimcssproperties=true'));
}
suites = combinations(suites, [matrix]);

console.log('Testing suites:\n\t' + suites.join('\n\t'));

WCT.loadSuites(suites);
Expand Down

0 comments on commit f03e8d1

Please sign in to comment.