Skip to content

Commit 2b3b6c6

Browse files
committed
Add more information for the disabled tests on Chrome.
https://code.google.com/p/chromedriver/issues/detail?id=1073
1 parent 831f861 commit 2b3b6c6

File tree

1 file changed

+20
-40
lines changed

1 file changed

+20
-40
lines changed

Diff for: javascript/atoms/test/select_test.html

+20-40
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,11 @@
1313
goog.require('goog.events');
1414
goog.require('goog.testing.jsunit');
1515
goog.require('goog.userAgent');
16-
goog.require('goog.testing.ExpectedFailures');
1716
</script>
1817
<script type="text/javascript">
1918
var singleSelect, multiSelect, radioButtons, checkboxes, changeCount;
2019
var gotPointerCaptureCount, lostPointerCaptureCount;
2120

22-
var expectedFailures;
23-
2421
function setUpPage() {
2522
singleSelect = bot.locators.findElement({id: 'singleSelect'});
2623
multiSelect = bot.locators.findElement({id: 'multiSelect'});
@@ -47,11 +44,6 @@
4744
goog.array.forEach(radioButtons, function(e) {
4845
e.checked = false;
4946
});
50-
expectedFailures = new goog.testing.ExpectedFailures();
51-
}
52-
53-
function tearDown() {
54-
expectedFailures.handleTearDown();
5547
}
5648

5749
function checkActionCompatibility(action) {
@@ -196,23 +188,17 @@
196188
assertTrue(bot.dom.isSelected(multiSelect.options[2]));
197189
}
198190

199-
function testClickCanToggleOptionsInAMultiSelect() {
200-
expectedFailures.expectFailureFor(
201-
goog.userAgent.WEBKIT, 'Chrome fails this test, have not figured it out yet...');
202-
// TODO: Figure it out
203-
expectedFailures.run(function() {
204-
canToggleOptionsInAMultiSelect(bot.action.click)
205-
});
206-
}
191+
var testClickCanToggleOptionsInAMultiSelect =
192+
// Disabled on Chrome due to
193+
// https://code.google.com/p/chromedriver/issues/detail?id=1073
194+
goog.userAgent.product.CHROME ? goog.nullFunction :
195+
goog.partial(canToggleOptionsInAMultiSelect, bot.action.click);
207196

208-
function testTapCanToggleOptionsInAMultiSelect() {
209-
expectedFailures.expectFailureFor(
210-
goog.userAgent.WEBKIT, 'Chrome fails this test, have not figured it out yet...');
211-
// TODO: Figure it out
212-
expectedFailures.run(function() {
213-
canToggleOptionsInAMultiSelect(bot.action.tap)
214-
});
215-
}
197+
var testTapCanToggleOptionsInAMultiSelect =
198+
// Disabled on Chrome due to
199+
// https://code.google.com/p/chromedriver/issues/detail?id=1073
200+
goog.userAgent.product.CHROME ? goog.nullFunction :
201+
goog.partial(canToggleOptionsInAMultiSelect, bot.action.tap);
216202

217203
function canToggleCheckboxes(action) {
218204
if (!checkActionCompatibility(action)) {
@@ -344,14 +330,11 @@
344330
var testClickCanSelectOptionWhenDefaultPrevented =
345331
goog.partial(canSelectOptionWhenDefaultPrevented, bot.action.click);
346332

347-
function testTapCanSelectOptionWhenDefaultPrevented() {
348-
expectedFailures.expectFailureFor(
349-
goog.userAgent.WEBKIT, 'Chrome fails this test, have not figured it out yet...');
350-
// TODO: Figure it out
351-
expectedFailures.run(function() {
352-
canSelectOptionWhenDefaultPrevented(bot.action.tap)
353-
});
354-
}
333+
var testTapCanSelectOptionWhenDefaultPrevented =
334+
// Disabled on Chrome due to
335+
// https://code.google.com/p/chromedriver/issues/detail?id=1073
336+
goog.userAgent.product.CHROME ? goog.nullFunction :
337+
goog.partial(canSelectOptionWhenDefaultPrevented, bot.action.tap);
355338

356339
function cannotSelectCheckboxWhenDefaultPrevented(action) {
357340
if (!checkActionCompatibility(action)) {
@@ -547,14 +530,11 @@
547530
var testClickTogglesByTheTimeChangeEventFires =
548531
goog.partial(togglesByTheTimeChangeEventFires, bot.action.click);
549532

550-
function testTapTogglesByTheTimeChangeEventFires() {
551-
expectedFailures.expectFailureFor(
552-
goog.userAgent.WEBKIT, 'Chrome fails this test, have not figured it out yet...');
553-
// TODO: Figure it out
554-
expectedFailures.run(function() {
555-
togglesByTheTimeChangeEventFires(bot.action.tap)
556-
});
557-
}
533+
var testTapTogglesByTheTimeChangeEventFires =
534+
// Disabled on Chrome due to
535+
// https://code.google.com/p/chromedriver/issues/detail?id=1073
536+
goog.userAgent.product.CHROME ? goog.nullFunction :
537+
goog.partial(togglesByTheTimeChangeEventFires, bot.action.tap);
558538
</script>
559539
</head>
560540
<body>

0 commit comments

Comments
 (0)