Skip to content

Commit

Permalink
Add test for not matching x-foox-bar given :host(x-bar) used insi…
Browse files Browse the repository at this point in the history
…de `x-foo`
  • Loading branch information
Steven Orvell committed Jun 28, 2016
1 parent ec111f1 commit 4e08fa1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/unit/styling-scoped.html
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,17 @@
assertComputed(t, 'auto', 'top');
});

test(':host(...) with non-matching type selector does not leak', function() {
var t = document.createElement('x-shared1x-shared2');
t.textContent = ':host(non-matching-type-selector)';
document.body.appendChild(t);
assertComputed(t, '0px');
var t = document.createElement('x-shared2x-shared1');
t.textContent = ':host(non-matching-type-selector)';
document.body.appendChild(t);
assertComputed(t, '0px');
});

});

</script>
Expand Down

0 comments on commit 4e08fa1

Please sign in to comment.