Autocomplete and button unit tests: Same remove-role-attr fix as for accordion in destroy-method test

This commit is contained in:
jzaefferer 2010-04-13 11:12:01 +02:00
parent 46b6a298cf
commit 094ab5a5d9
2 changed files with 8 additions and 0 deletions

View File

@ -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" );
})

View File

@ -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 );
});