From: jzaefferer Date: Wed, 28 Jul 2010 15:19:01 +0000 (+0200) Subject: Replace usage of the removed global reset() method with QUnit.reset(). X-Git-Tag: 1.4.3rc1~150 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6f031c10157a2ca2265e0dbf684ef527d79afb56;p=jquery.git Replace usage of the removed global reset() method with QUnit.reset(). --- diff --git a/test/unit/attributes.js b/test/unit/attributes.js index 21d3d94bc..c125ec7b5 100644 --- a/test/unit/attributes.js +++ b/test/unit/attributes.js @@ -150,7 +150,7 @@ test("attr(String, Object)", function() { equals( j.attr("name"), "attrvalue", "Check node,textnode,comment for attr" ); j.removeAttr("name"); - reset(); + QUnit.reset(); var type = jQuery("#check2").attr('type'); var thrown = false; @@ -306,7 +306,7 @@ test("val()", function() { document.getElementById('text1').value = "bla"; equals( jQuery("#text1").val(), "bla", "Check for modified value of input element" ); - reset(); + QUnit.reset(); equals( jQuery("#text1").val(), "Test", "Check for value of input element" ); // ticket #1714 this caused a JS error in IE @@ -504,7 +504,7 @@ var testRemoveClass = function(valueObj) { ok( !$divs.is('.test'), "Remove Class" ); - reset(); + QUnit.reset(); $divs = jQuery('div'); $divs.addClass("test").addClass("foo").addClass("bar"); @@ -512,7 +512,7 @@ var testRemoveClass = function(valueObj) { ok( !$divs.is('.test,.bar,.foo'), "Remove multiple classes" ); - reset(); + QUnit.reset(); $divs = jQuery('div'); // Make sure that a null value doesn't cause problems @@ -563,7 +563,7 @@ test("removeClass(Function) with incoming value", function() { ok( !$divs.is('.test'), "Remove Class" ); - reset(); + QUnit.reset(); }); var testToggleClass = function(valueObj) { diff --git a/test/unit/core.js b/test/unit/core.js index 590bb0c86..5d6b9fe68 100644 --- a/test/unit/core.js +++ b/test/unit/core.js @@ -398,7 +398,7 @@ test("isXMLDoc - XML", function() { test("jQuery('html')", function() { expect(15); - reset(); + QUnit.reset(); jQuery.foo = false; var s = jQuery("")[0]; ok( s, "Creating a script" ); @@ -414,7 +414,7 @@ test("jQuery('html')", function() { equals( div.childNodes[1].nodeType, 1, "Paragraph." ); equals( div.childNodes[1].firstChild.nodeType, 3, "Paragraph text." ); - reset(); + QUnit.reset(); ok( jQuery("")[0], "Creating a link" ); ok( !jQuery("
')); @@ -969,7 +969,7 @@ test("html(Function) with incoming value", function() { }) ok( pass, "Set HTML" ); - reset(); + QUnit.reset(); // using contents will get comments regular, text, and comment nodes var j = jQuery("#nonnodes").contents(); old = j.map(function(){ return jQuery(this).html(); }); @@ -1023,7 +1023,7 @@ var testRemove = function(method) { equals( first.data("foo"), method == "remove" ? null : "bar" ); - reset(); + QUnit.reset(); jQuery("#ap").children()[method]("a"); ok( jQuery("#ap").text().length > 10, "Check text is not removed" ); equals( jQuery("#ap").children().length, 1, "Check filtered remove" ); @@ -1036,7 +1036,7 @@ var testRemove = function(method) { jQuery("#nonnodes").contents()[method](); equals( jQuery("#nonnodes").contents().length, 0, "Check node,textnode,comment remove works" ); - reset(); + QUnit.reset(); var count = 0; var first = jQuery("#ap").children(":first"); diff --git a/test/unit/selector.js b/test/unit/selector.js index 498ac567b..ac0641870 100644 --- a/test/unit/selector.js +++ b/test/unit/selector.js @@ -2,7 +2,7 @@ module("selector"); test("element", function() { expect(19); - reset(); + QUnit.reset(); ok( jQuery("*").size() >= 30, "Select all" ); var all = jQuery("*"), good = true; @@ -292,7 +292,7 @@ test("pseudo - child", function() { t( "First Child", "p:first-child", [] ); - reset(); + QUnit.reset(); t( "Last Child", "p:last-child", ["sap"] ); t( "Last Child", "a:last-child", ["simon1","anchor1","mark","yahoo","anchor2","simon","liveLink1","liveLink2"] );