Skip to content

Commit 094ab5a

Browse files
committed
Autocomplete and button unit tests: Same remove-role-attr fix as for accordion in destroy-method test
1 parent 46b6a29 commit 094ab5a

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

tests/unit/autocomplete/autocomplete_methods.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ module("autocomplete: methods", {
1313
test("destroy", function() {
1414
var beforeHtml = $("#autocomplete").parent().html();
1515
var afterHtml = $("#autocomplete").autocomplete().autocomplete("destroy").parent().html();
16+
// Opera 9 outputs role="" instead of removing the attribute like everyone else
17+
if ($.browser.opera) {
18+
afterHtml = afterHtml.replace(/ role=""/g, "");
19+
}
1620
equal( afterHtml, beforeHtml, "before/after html should be the same" );
1721
})
1822

tests/unit/button/button_methods.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ module("button: methods");
99
test("destroy", function() {
1010
var beforeHtml = $("#button").parent().html();
1111
var afterHtml = $("#button").button().button("destroy").parent().html();
12+
// Opera 9 outputs role="" instead of removing the attribute like everyone else
13+
if ($.browser.opera) {
14+
afterHtml = afterHtml.replace(/ role=""/g, "");
15+
}
1216
equal( afterHtml, beforeHtml );
1317
});
1418

0 commit comments

Comments
 (0)