Skip to content

Commit

Permalink
Mark the persistent modifier key test failure as expected on FF10. There
Browse files Browse the repository at this point in the history
is a standing bug with the selection range not being updated while
moving left/right with the shift key pressed.
  • Loading branch information
jleyba committed Feb 18, 2013
1 parent e9728bf commit dc1ef9c
Showing 1 changed file with 27 additions and 7 deletions.
34 changes: 27 additions & 7 deletions javascript/atoms/test/type_test.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
goog.require('goog.events.EventType');
goog.require('goog.events.KeyCodes');
goog.require('goog.testing.AsyncTestCase');
goog.require('goog.testing.ExpectedFailures');
goog.require('goog.testing.jsunit');
goog.require('goog.userAgent');
</script>
Expand Down Expand Up @@ -48,6 +49,17 @@
}
}

var expectedFailures;

function setUp() {
expectedFailures = new goog.testing.ExpectedFailures();
}


function tearDown() {
expectedFailures.handleTearDown();
}

/**
* Increments the value of the input count box by one.
*/
Expand Down Expand Up @@ -189,7 +201,7 @@

function testShiftNavigation() {
// This test will fail on GECKO <= 10 because of irregularities with
// the KEYPRESS event. This needs to be investigated, and fixed in
// the KEYPRESS event. This needs to be investigated, and fixed in
// the atoms.
if (goog.userAgent.GECKO && !bot.userAgent.isEngineVersion(11)) {
return;
Expand All @@ -215,7 +227,7 @@

function testShiftDelete() {
// This test will fail on GECKO <= 10 because of irregularities with
// the KEYPRESS event. This needs to be investigated, and fixed in
// the KEYPRESS event. This needs to be investigated, and fixed in
// the atoms.
if (goog.userAgent.GECKO && !bot.userAgent.isEngineVersion(11)) {
return;
Expand Down Expand Up @@ -446,11 +458,19 @@

bot.action.type(textBox, [LEFT, 'ghi', SHIFT, 'j'], keyboard,
persitModifierKeys);
assertEquals('abcdEGHIj', textBox.value);
assertFalse(keyboard.isPressed(ALT));
assertFalse(keyboard.isPressed(CONTROL));
assertFalse(keyboard.isPressed(META));
assertFalse(keyboard.isPressed(SHIFT));

expectedFailures.expectFailureFor(
goog.userAgent.GECKO &&
bot.userAgent.isProductVersion(10) &&
!bot.userAgent.isProductVersion(17),
'Selection is not updated on LEFT while shift is pressed');
expectedFailures.run(function() {
assertEquals('abcdEGHIj', textBox.value);
assertFalse(keyboard.isPressed(ALT));
assertFalse(keyboard.isPressed(CONTROL));
assertFalse(keyboard.isPressed(META));
assertFalse(keyboard.isPressed(SHIFT));
});
}
</script>
</head>
Expand Down

0 comments on commit dc1ef9c

Please sign in to comment.