Skip to content

Commit

Permalink
Update test for Chrome 44 stable release.
Browse files Browse the repository at this point in the history
The previous behavior was true for a release
from the beta channel, but the bug was reported
and fixed.

Signed-off-by: Seva Lotoshnikov <[email protected]>
  • Loading branch information
joshbruning authored and sevaseva committed Aug 3, 2015
1 parent 1431a26 commit c7c6c4a
Showing 1 changed file with 11 additions and 23 deletions.
34 changes: 11 additions & 23 deletions javascript/atoms/test/select_test.html
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,7 @@
expectChanges(radioButtons[0]);

action(radioButtons[0]);

// Chromium 44 seems to have a regression here:
// https://code.google.com/p/chromium/issues/detail?id=500084
if (!goog.userAgent.product.CHROME || !bot.userAgent.isProductVersion(44)) {
assertChanges(0);
}
assertChanges(0);
assertTrue(bot.dom.isSelected(radioButtons[0]));
}

Expand Down Expand Up @@ -365,17 +360,10 @@

action(elem);

// WebKit (except Chromium 44+) and IE9 standards mode fire change events when the
// WebKit and IE9 standards mode fire change events when the
// checkbox isn't toggled.
// TODO: Check if Chromium behavior changes after this issue is resolved:
// https://code.google.com/p/chromium/issues/detail?id=500084
if (bot.userAgent.IE_DOC_9 ||
(goog.userAgent.WEBKIT &&
!(goog.userAgent.product.CHROME && bot.userAgent.isProductVersion(44)))) {
assertChanges(1);
} else {
assertChanges(0);
}
assertChanges(
goog.userAgent.WEBKIT || bot.userAgent.IE_DOC_9 ? 1 : 0);
assertFalse(bot.dom.isSelected(elem));
}

Expand All @@ -398,16 +386,16 @@

action(elem);

// WebKit selects a radio button even when the handler prevents the default; others do not.
if (goog.userAgent.WEBKIT && !goog.userAgent.product.CHROME) {
// Chrome < 39 and WebKit select a radio button even when the handler
// prevents the default; IE does not.
if ((goog.userAgent.product.CHROME &&
!bot.userAgent.isProductVersion(39)) ||
(goog.userAgent.WEBKIT && !goog.userAgent.product.CHROME)) {
assertChanges(1);
assertTrue(bot.dom.isSelected(elem));
} else {
// IE9 standards mode, Chromium 43 and earlier versions still fire the change event.
// TODO: Check if Chromium behavior changes after this issue is resolved:
// https://code.google.com/p/chromium/issues/detail?id=500084
if (bot.userAgent.IE_DOC_9 ||
goog.userAgent.product.CHROME && !bot.userAgent.isProductVersion(44)) {
// IE9 standards mode and Chrome still fire the change event.
if (bot.userAgent.IE_DOC_9 || goog.userAgent.product.CHROME) {
assertChanges(1);
} else {
assertChanges(0);
Expand Down

0 comments on commit c7c6c4a

Please sign in to comment.