Permalink
Browse files

Adding modifier key test for fancy ctrl (⌃)

  • Loading branch information...
TrevorBurnham committed Sep 5, 2011
1 parent ae43fff commit feb658ff3b21c8d3e931be30230d480d536bb6f2
Showing with 7 additions and 5 deletions.
  1. +7 −5 test/keymaster.html
View
@@ -106,15 +106,17 @@ <h1>Keymaster unit tests</h1>
testFancyModifierKeys: function(t){
var sequence = '';
- key('+a', function(){ sequence += 'a' });
+ key('+a', function(){ sequence += 'a' });
key('⌥+b', function(){ sequence += 'b' });
- key('⌘+c', function(){ sequence += 'c' });
+ key('⇧+c', function(){ sequence += 'c' });
+ key('⌘+d', function(){ sequence += 'd' });
- keydown(KEYS.shift); keydown(65); keyup(65); keyup(KEYS.shift);
+ keydown(KEYS.ctrl); keydown(65); keyup(65); keyup(KEYS.ctrl);
keydown(KEYS.option); keydown(66); keyup(66); keyup(KEYS.option);
- keydown(KEYS.command); keydown(67); keyup(67); keyup(KEYS.command);
+ keydown(KEYS.shift); keydown(67); keyup(67); keyup(KEYS.shift);
+ keydown(KEYS.command); keydown(68); keyup(68); keyup(KEYS.command);
- t.assertEqual('abc', sequence);
+ t.assertEqual('abcd', sequence);
},
testNonAlphanumericKeys: function(t){

0 comments on commit feb658f

Please sign in to comment.