From f03e8d1b3e27f8c5fb642cb06776c15103a1b091 Mon Sep 17 00:00:00 2001 From: valdrinkoshi Date: Fri, 31 Mar 2017 18:53:52 -0700 Subject: [PATCH] test more permutations --- test/runner.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/runner.html b/test/runner.html index 8fe8b14f85..2a94c55b84 100644 --- a/test/runner.html +++ b/test/runner.html @@ -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);