mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Autocomplete and button unit tests: Same remove-role-attr fix as for accordion in destroy-method test
This commit is contained in:
parent
46b6a298cf
commit
094ab5a5d9
@ -13,6 +13,10 @@ module("autocomplete: methods", {
|
|||||||
test("destroy", function() {
|
test("destroy", function() {
|
||||||
var beforeHtml = $("#autocomplete").parent().html();
|
var beforeHtml = $("#autocomplete").parent().html();
|
||||||
var afterHtml = $("#autocomplete").autocomplete().autocomplete("destroy").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" );
|
equal( afterHtml, beforeHtml, "before/after html should be the same" );
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -9,6 +9,10 @@ module("button: methods");
|
|||||||
test("destroy", function() {
|
test("destroy", function() {
|
||||||
var beforeHtml = $("#button").parent().html();
|
var beforeHtml = $("#button").parent().html();
|
||||||
var afterHtml = $("#button").button().button("destroy").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 );
|
equal( afterHtml, beforeHtml );
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user