Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Unified Diff: third_party/polymer/components/iron-behaviors/test/focused-state.html

Issue 2113853002: Run bower update (Closed) Base URL: https://github.com/catapult-project/catapult@polymer10-migration
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698