update components
This commit is contained in:
parent
25b5198fa7
commit
e5a4b3813f
21 changed files with 360 additions and 87 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue