diff --git a/test/unit/styling-scoped-elements.html b/test/unit/styling-scoped-elements.html index a138905e79..7791b8bd79 100644 --- a/test/unit/styling-scoped-elements.html +++ b/test/unit/styling-scoped-elements.html @@ -134,8 +134,7 @@ } :host(.wide)::after { - content: 'a'; - border: 4px solid blue; + content: '-content-'; }; #keyframes2.special { diff --git a/test/unit/styling-scoped.html b/test/unit/styling-scoped.html index 1b4dd260c0..6f821ea7f7 100644 --- a/test/unit/styling-scoped.html +++ b/test/unit/styling-scoped.html @@ -61,7 +61,11 @@ function assertComputed(element, value, property, pseudo) { var computed = getComputedStyle(element, pseudo); property = property || 'border-top-width'; - assert.equal(computed[property], value, 'computed style incorrect for ' + property); + if (Array.isArray(value)) { + assert.oneOf(computed[property], value, 'computed style incorrect for ' + property); + } else { + assert.equal(computed[property], value, 'computed style incorrect for ' + property); + } } var styled = document.querySelector('x-styled'); @@ -73,10 +77,8 @@ test(':host, :host(...)', function() { assertComputed(styled, '1px'); assertComputed(styledWide, '2px'); - assertComputed(styled, '0px', null, '::after'); - assertComputed(styledWide, '2px'); - assertComputed(styledWide, '4px', null, '::after'); - + assertComputed(styled, ['', 'none'], 'content', '::after'); + assertComputed(styledWide, ['"-content-"', '-content-'], 'content', '::after'); }); test(':host-context(...)', function() {