testrunner: fixing tests that were broken due to recent updates to qunit.
This commit is contained in:
parent
0865b073f8
commit
96e8f355da
|
@ -1361,25 +1361,24 @@ test("addClass(String)", function() {
|
||||||
|
|
||||||
test("removeClass(String) - simple", function() {
|
test("removeClass(String) - simple", function() {
|
||||||
expect(4);
|
expect(4);
|
||||||
var div = jQuery("div").addClass("test").removeClass("test"),
|
|
||||||
pass = true;
|
var $divs = jQuery('div');
|
||||||
for ( var i = 0; i < div.size(); i++ ) {
|
|
||||||
if ( div.get(i).className.indexOf("test") != -1 ) pass = false;
|
$divs.addClass("test").removeClass("test");
|
||||||
}
|
|
||||||
ok( pass, "Remove Class" );
|
ok( !$divs.is('.test'), "Remove Class" );
|
||||||
|
|
||||||
reset();
|
reset();
|
||||||
var div = jQuery("div").addClass("test").addClass("foo").addClass("bar");
|
|
||||||
div.removeClass("test").removeClass("bar").removeClass("foo");
|
$divs.addClass("test").addClass("foo").addClass("bar");
|
||||||
var pass = true;
|
$divs.removeClass("test").removeClass("bar").removeClass("foo");
|
||||||
for ( var i = 0; i < div.size(); i++ ) {
|
|
||||||
if ( div.get(i).className.match(/test|bar|foo/) ) pass = false;
|
ok( !$divs.is('.test,.bar,.foo'), "Remove multiple classes" );
|
||||||
}
|
|
||||||
ok( pass, "Remove multiple classes" );
|
|
||||||
|
|
||||||
reset();
|
reset();
|
||||||
var div = jQuery("div:eq(0)").addClass("test").removeClass("");
|
|
||||||
ok( div.is('.test'), "Empty string passed to removeClass" );
|
$divs.eq(0).addClass("test").removeClass("");
|
||||||
|
ok( $divs.eq(0).is('.test'), "Empty string passed to removeClass" );
|
||||||
|
|
||||||
// using contents will get regular, text, and comment nodes
|
// using contents will get regular, text, and comment nodes
|
||||||
var j = jQuery("#nonnodes").contents();
|
var j = jQuery("#nonnodes").contents();
|
||||||
|
|
Loading…
Reference in a new issue