From 2729662be0192d5a9b8a9cc94a161cd2025899af Mon Sep 17 00:00:00 2001 From: Kevin Schaaf Date: Wed, 11 Jul 2018 12:17:58 -0700 Subject: [PATCH 1/4] Ignore shady CSS scoping in getComposedHTML --- test/unit/shady.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/unit/shady.html b/test/unit/shady.html index f5c881420e..c2f76dc7ed 100644 --- a/test/unit/shady.html +++ b/test/unit/shady.html @@ -459,7 +459,8 @@ } function getComposedHTML(node) { - return ShadyDOM.nativeTree.innerHTML(node); + // Ignore shady CSS scoping + return ShadyDOM.nativeTree.innerHTML(node).replace(/ class="[^"]*"/g, ''); } function getComposedChildAtIndex(node, index) { From 2ac2c6e4bdea4a65c7fb52c851c40fa672dc7549 Mon Sep 17 00:00:00 2001 From: Kevin Schaaf Date: Wed, 11 Jul 2018 12:18:12 -0700 Subject: [PATCH 2/4] Extend Edge exceptions beyond Edge 16 --- test/unit/custom-style.html | 4 ++-- test/unit/styling-cross-scope-apply.html | 2 +- test/unit/styling-scoped.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/unit/custom-style.html b/test/unit/custom-style.html index 97ff8ac21a..983fa8d8e2 100644 --- a/test/unit/custom-style.html +++ b/test/unit/custom-style.html @@ -483,8 +483,8 @@ assertComputed(el, '11px', 'right'); assertComputed(el, '12px', 'top'); - // Avoid Edge 16 bug with CSS Custom Properties and Fonts. - if (navigator.userAgent.match('Edge/16') && (!window.ShadyCSS || window.ShadyCSS.nativeCss)) { + // Avoid Edge bug with CSS Custom Properties and Fonts. + if (navigator.userAgent.match('Edge') && (!window.ShadyCSS || window.ShadyCSS.nativeCss)) { return; } diff --git a/test/unit/styling-cross-scope-apply.html b/test/unit/styling-cross-scope-apply.html index 8cd5d27906..e36ebd2457 100644 --- a/test/unit/styling-cross-scope-apply.html +++ b/test/unit/styling-cross-scope-apply.html @@ -588,7 +588,7 @@ }); test('mixins apply to @keyframe rules', function(done) { - if (navigator.userAgent.match('Edge/16') && (!window.ShadyCSS || window.ShadyCSS.nativeCss)) { + if (navigator.userAgent.match('Edge') && (!window.ShadyCSS || window.ShadyCSS.nativeCss)) { // skip test due to missing variable support in keyframes // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12084341/ this.skip(); diff --git a/test/unit/styling-scoped.html b/test/unit/styling-scoped.html index 47b63d85e7..e5dcddb64f 100644 --- a/test/unit/styling-scoped.html +++ b/test/unit/styling-scoped.html @@ -890,7 +890,7 @@ }); test('keyframes change scope', function(done) { - if (navigator.userAgent.match('Edge/16') && (!window.ShadyCSS || window.ShadyCSS.nativeCss)) { + if (navigator.userAgent.match('Edge') && (!window.ShadyCSS || window.ShadyCSS.nativeCss)) { // skip test due to missing variable support in keyframes // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12084341/ this.skip(); From fac5f27febc7169fb24b1817eacb39a4133804a3 Mon Sep 17 00:00:00 2001 From: Kevin Schaaf Date: Thu, 12 Jul 2018 16:59:15 -0700 Subject: [PATCH 3/4] Extend Safari exceptions beyond 10.1 --- test/unit/styling-cross-scope-var.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/styling-cross-scope-var.html b/test/unit/styling-cross-scope-var.html index be4786ea08..c15cac3fad 100644 --- a/test/unit/styling-cross-scope-var.html +++ b/test/unit/styling-cross-scope-var.html @@ -790,7 +790,7 @@ }); test('instances of scoped @keyframes', function(done) { - if (navigator.userAgent.match(/Safari\/60(3|4)/) && ShadyCSS.nativeCss && ShadyCSS.nativeShadow) { + if (navigator.userAgent.match(/Safari/) && ShadyCSS.nativeCss && ShadyCSS.nativeShadow) { // `:nth-of-type` is broken in shadow roots on Safari 10.1 // https://bugs.webkit.org/show_bug.cgi?id=166748 this.skip(); From e24f4f7ece585ceb3f233f3d771c1d273be0a0ac Mon Sep 17 00:00:00 2001 From: Kevin Schaaf Date: Fri, 13 Jul 2018 14:53:47 -0700 Subject: [PATCH 4/4] Disable combined CE+SD polyfill testing on browsers with native support, for test economy. --- test/runner.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/runner.html b/test/runner.html index 633fed9080..2752e1afb1 100644 --- a/test/runner.html +++ b/test/runner.html @@ -106,8 +106,9 @@ } // 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'); + // flags.push('wc-ce=true&wc-shadydom=true'); } // economize testing by testing css shimming