aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/ajax.js
diff options
context:
space:
mode:
authorJohn Resig <jeresig@gmail.com>2010-01-24 21:58:32 -0500
committerJohn Resig <jeresig@gmail.com>2010-01-24 21:58:32 -0500
commitc639405c4d1ec462b032ccfb571a6c73212ba101 (patch)
tree41dd9dc07c65e2ed023f3daa72fc6fbc919ebc68 /test/unit/ajax.js
parent6a3d0996edf2f8ba69f62c8c7c3eda07b674d81f (diff)
downloadjquery-c639405c4d1ec462b032ccfb571a6c73212ba101.tar.gz
jquery-c639405c4d1ec462b032ccfb571a6c73212ba101.zip
Don't set the context in .load() as it stops the global ajax events from firing. Fixes #5922.
Diffstat (limited to 'test/unit/ajax.js')
-rw-r--r--test/unit/ajax.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/unit/ajax.js b/test/unit/ajax.js
index 4f901265e..cd3aba0a4 100644
--- a/test/unit/ajax.js
+++ b/test/unit/ajax.js
@@ -70,6 +70,30 @@ test("jQuery.ajax() - error callbacks", function() {
});
});
+test(".load()) - 404 error callbacks", function() {
+ expect( 6 );
+ stop();
+
+ jQuery('#foo').ajaxStart(function(){
+ ok( true, "ajaxStart" );
+ }).ajaxStop(function(){
+ ok( true, "ajaxStop" );
+ start();
+ }).ajaxSend(function(){
+ ok( true, "ajaxSend" );
+ }).ajaxComplete(function(){
+ ok( true, "ajaxComplete" );
+ }).ajaxError(function(){
+ ok( true, "ajaxError" );
+ }).ajaxSuccess(function(){
+ ok( false, "ajaxSuccess" );
+ });
+
+ jQuery("<div/>").load("data/404.html", function(){
+ ok(true, "complete");
+ });
+});
+
test("jQuery.ajax() - abort", function() {
expect( 6 );
stop();