From 4e08fa1b7e02d5c79cc0118bb780ee70d80ce725 Mon Sep 17 00:00:00 2001 From: Steven Orvell Date: Mon, 27 Jun 2016 18:47:49 -0700 Subject: [PATCH] Add test for not matching `x-foox-bar` given `:host(x-bar)` used inside `x-foo` --- test/unit/styling-scoped.html | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/unit/styling-scoped.html b/test/unit/styling-scoped.html index d502d5905a..d7547740fe 100644 --- a/test/unit/styling-scoped.html +++ b/test/unit/styling-scoped.html @@ -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'); + }); + });