Skip to content

Commit

Permalink
Merge pull request #5287 from Polymer/5286-kschaaf-shady-tests
Browse files Browse the repository at this point in the history
Fix shady test regressions (2.x)
  • Loading branch information
kevinpschaaf authored Jul 18, 2018
2 parents 2a7c43f + e24f4f7 commit 654f904
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion test/runner.html
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/unit/custom-style.html
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
3 changes: 2 additions & 1 deletion test/unit/shady.html
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion test/unit/styling-cross-scope-apply.html
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion test/unit/styling-cross-scope-var.html
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion test/unit/styling-scoped.html
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 654f904

Please sign in to comment.