Skip to content
Permalink
Browse files

Autocomplete and button unit tests: Same remove-role-attr fix as for …

…accordion in destroy-method test
  • Loading branch information
jzaefferer committed Apr 13, 2010
1 parent 46b6a29 commit 094ab5a5d9239c094b2f1af95669b9b0baaeee4a
Showing with 8 additions and 0 deletions.
  1. +4 −0 tests/unit/autocomplete/autocomplete_methods.js
  2. +4 −0 tests/unit/button/button_methods.js
@@ -13,6 +13,10 @@ module("autocomplete: methods", {
test("destroy", function() {
var beforeHtml = $("#autocomplete").parent().html();
var afterHtml = $("#autocomplete").autocomplete().autocomplete("destroy").parent().html();
// Opera 9 outputs role="" instead of removing the attribute like everyone else
if ($.browser.opera) {
afterHtml = afterHtml.replace(/ role=""/g, "");
}
equal( afterHtml, beforeHtml, "before/after html should be the same" );
})

@@ -9,6 +9,10 @@ module("button: methods");
test("destroy", function() {
var beforeHtml = $("#button").parent().html();
var afterHtml = $("#button").button().button("destroy").parent().html();
// Opera 9 outputs role="" instead of removing the attribute like everyone else
if ($.browser.opera) {
afterHtml = afterHtml.replace(/ role=""/g, "");
}
equal( afterHtml, beforeHtml );
});

0 comments on commit 094ab5a

Please sign in to comment.
You can’t perform that action at this time.