Permalink
Browse files

bind/unbind changed to on/off in unit tests; refs #13554

  • Loading branch information...
1 parent f2cb536 commit 8ca9f931ec311b6f73990eac7665451a28bceac3 @mgol mgol committed with dmethvin Mar 4, 2013
Showing with 171 additions and 173 deletions.
  1. +3 −3 test/unit/ajax.js
  2. +2 −2 test/unit/data.js
  3. +159 −161 test/unit/event.js
  4. +7 −7 test/unit/manipulation.js
View
@@ -1585,13 +1585,13 @@ module( "ajax", {
type: "POST"
});
- jQuery( document ).bind( "ajaxStart ajaxStop", function() {
+ jQuery( document ).on( "ajaxStart ajaxStop", function() {
ok( false, "Global event triggered" );
});
jQuery("#qunit-fixture").append("<script src='data/evalScript.php'></script>");
- jQuery( document ).unbind("ajaxStart ajaxStop");
+ jQuery( document ).off("ajaxStart ajaxStop");
});
asyncTest( "#11402 - jQuery.domManip() - script in comments are properly evaluated", 2, function() {
@@ -1845,7 +1845,7 @@ module( "ajax", {
});
jQuery( document ).ajaxComplete(function( e, xml, s ) {
strictEqual( s.dataType, "html", "Verify the load() dataType was html" );
- jQuery( document ).unbind("ajaxComplete");
+ jQuery( document ).off("ajaxComplete");
start();
});
jQuery("#first").load("data/test3.html");
View
@@ -133,7 +133,7 @@ test("jQuery.data({})", 25, function() {
test("jQuery.data(window)", 25, function() {
// remove bound handlers from window object to stop potential false positives caused by fix for #5280 in
// transports/xhr.js
- jQuery(window).unbind("unload");
+ jQuery(window).off("unload");
dataTests(window);
});
@@ -635,7 +635,7 @@ test(".removeData should not throw exceptions. (#10080)", function() {
expect(1);
stop();
var frame = jQuery("#loadediframe");
- jQuery(frame[0].contentWindow).bind("unload", function() {
+ jQuery(frame[0].contentWindow).on("unload", function() {
ok(true, "called unload");
start();
});
Oops, something went wrong.

0 comments on commit 8ca9f93

Please sign in to comment.