Index: third_party/polymer/components/iron-behaviors/test/focused-state.html |
diff --git a/third_party/polymer/components/iron-behaviors/test/focused-state.html b/third_party/polymer/components/iron-behaviors/test/focused-state.html |
index e34a55c12222feeff843dc4268f5eacb411c65b5..3b75c704e153558068d77adff7012463d8d6c148 100644 |
--- a/third_party/polymer/components/iron-behaviors/test/focused-state.html |
+++ b/third_party/polymer/components/iron-behaviors/test/focused-state.html |
@@ -31,10 +31,11 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN |
</template> |
</test-fixture> |
- <test-fixture id="LightDOM"> |
+ <test-fixture id="LightDOM"> |
<template> |
<test-light-dom> |
<input id="input"> |
+ <nested-focusable></nested-focusable> |
</test-light-dom> |
</template> |
</test-fixture> |
@@ -119,11 +120,13 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN |
suite('elements in the light dom', function() { |
- var lightDOM, input; |
+ var lightDOM, input, lightDescendantShadowInput; |
setup(function() { |
lightDOM = fixture('LightDOM'); |
input = document.querySelector('#input'); |
+ lightDescendantShadowInput = Polymer.dom(lightDOM) |
+ .querySelector('nested-focusable').$.input; |
}); |
test('should not fire the focus event', function() { |
@@ -138,6 +141,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN |
expect(nFocusEvents).to.be.equal(0); |
}); |
+ test('should not fire the focus event from shadow descendants', function() { |
+ var nFocusEvents = 0; |
+ |
+ lightDOM.addEventListener('focus', function() { |
+ nFocusEvents += 1; |
+ }); |
+ |
+ MockInteractions.focus(lightDescendantShadowInput); |
+ |
+ expect(nFocusEvents).to.be.equal(0); |
+ }); |
+ |
}); |
</script> |