update image encoding
This commit is contained in:
parent
6d016e0db9
commit
0320ad7256
20 changed files with 205 additions and 68 deletions
|
@ -70,6 +70,9 @@ suite('Polymer.IronA11yKeysBehavior', function() {
|
|||
_keyHandler: function(event) {
|
||||
this.keyCount++;
|
||||
this.lastEvent = event;
|
||||
},
|
||||
_preventDefaultHandler: function(event) {
|
||||
event.preventDefault();
|
||||
}
|
||||
}];
|
||||
|
||||
|
@ -124,7 +127,8 @@ suite('Polymer.IronA11yKeysBehavior', function() {
|
|||
],
|
||||
|
||||
keyBindings: {
|
||||
'space': '_keyHandler'
|
||||
'space': '_keyHandler',
|
||||
'enter': '_preventDefaultHandler'
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -273,6 +277,21 @@ suite('Polymer.IronA11yKeysBehavior', function() {
|
|||
});
|
||||
});
|
||||
|
||||
suite('prevent default behavior of event', function() {
|
||||
setup(function() {
|
||||
keys = fixture('BehaviorKeys');
|
||||
});
|
||||
test('defaultPrevented is correctly set', function() {
|
||||
var keySpy = sinon.spy();
|
||||
|
||||
document.addEventListener('keydown', keySpy);
|
||||
|
||||
MockInteractions.pressEnter(keys);
|
||||
|
||||
expect(keySpy.getCall(0).args[0].defaultPrevented).to.be.equal(true);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue