Commit 8ca9f931 authored by Michał Gołębiowski's avatar Michał Gołębiowski Committed by Dave Methvin

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

parent f2cb5361
......@@ -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");
......
......@@ -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();
});
......
This diff is collapsed.
......@@ -172,8 +172,8 @@ var testWrap = function( val ) {
ok( true, "Event triggered." );
// Remove handlers on detached elements
result.unbind();
jQuery(this).unbind();
result.off();
jQuery(this).off();
});
j = jQuery("<span/>").wrap( result );
......@@ -1960,7 +1960,7 @@ test( "Cloned, detached HTML5 elems (#10667,10670)", function() {
}
// Bind an event
$section.bind( "click", function( event ) {
$section.on( "click", function( event ) {
ok( true, "clone fired event" );
});
......@@ -1969,7 +1969,7 @@ test( "Cloned, detached HTML5 elems (#10667,10670)", function() {
// Trigger an event from the first clone
$clone.trigger("click");
$clone.unbind("click");
$clone.off("click");
// Add a child node with text to the original
$section.append("<p>Hello</p>");
......@@ -1981,7 +1981,7 @@ test( "Cloned, detached HTML5 elems (#10667,10670)", function() {
// Trigger an event from the third clone
$clone.trigger("click");
$clone.unbind("click");
$clone.off("click");
// Add attributes to copy
$section.attr({
......@@ -2008,8 +2008,8 @@ test( "Cloned, detached HTML5 elems (#10667,10670)", function() {
$section.trigger("click");
// Unbind any remaining events
$section.unbind("click");
$clone.unbind("click");
$section.off("click");
$clone.off("click");
});
test( "Guard against exceptions when clearing safeChildNodes", function() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment