@@ -2882,39 +2882,17 @@ test("fixHooks extensions", function() {
2882
2882
jQuery . event . fixHooks . click = saved ;
2883
2883
} ) ;
2884
2884
2885
+ testIframeWithCallback ( "jQuery.ready promise" , "event/promiseReady.html" , function ( isOk ) {
2886
+ expect ( 1 ) ;
2887
+ ok ( isOk , "$.when( $.ready ) works" ) ;
2888
+ } ) ;
2885
2889
2886
- // async loaded tests expect jQuery to be loaded as a single file
2887
- // if we're not doing PHP concat, then we fall back to document.write
2888
- // which breaks order of execution on async loaded files
2889
- // also need PHP to make the incepted IFRAME hang
2890
+ // need PHP here to make the incepted IFRAME hang
2890
2891
if ( hasPHP ) {
2891
- testIframeWithCallback ( "jQuery.ready promise" , "event/promiseReady.html" , function ( isOk ) {
2892
- expect ( 1 ) ;
2893
- ok ( isOk , "$.when( $.ready ) works" ) ;
2894
- } ) ;
2895
-
2896
2892
testIframeWithCallback ( "jQuery.ready synchronous load with long loading subresources" , "event/syncReady.html" , function ( isOk ) {
2897
2893
expect ( 1 ) ;
2898
2894
ok ( isOk , "jQuery loaded synchronously fires ready when the DOM can truly be interacted with" ) ;
2899
2895
} ) ;
2900
-
2901
- testIframeWithCallback ( "jQuery.ready synchronous load with partially loaded page" , "event/partialLoadReady.php" , function ( isOk ) {
2902
- expect ( 1 ) ;
2903
- ok ( isOk , "jQuery loaded synchronously fires ready when the DOM can truly be interacted with" ) ;
2904
- } ) ;
2905
-
2906
- // allIE needs all subresources and full page to be loaded before it can gaurantee the document is truly ready to be interacted with
2907
- if ( ! document . attachEvent ) {
2908
- testIframeWithCallback ( "jQuery.ready synchronous load with long loading iframe" , "event/syncReadyLongLoad.html" , function ( isOk ) {
2909
- expect ( 1 ) ;
2910
- ok ( isOk , "jQuery loaded synchronously fires ready before all sub-resources are loaded" ) ;
2911
- } ) ;
2912
-
2913
- testIframeWithCallback ( "jQuery.ready asynchronous load with long loading iframe" , "event/asyncReady.html" , function ( isOk ) {
2914
- expect ( 1 ) ;
2915
- ok ( isOk , "jQuery loaded asynchronously fires ready before all sub-resources are loaded" ) ;
2916
- } ) ;
2917
- }
2918
2896
}
2919
2897
2920
2898
( function ( ) {
@@ -2994,22 +2972,22 @@ test("change handler should be detached from element", function() {
2994
2972
expect ( 2 ) ;
2995
2973
2996
2974
var $fixture = jQuery ( "<input type='text' id='change-ie-leak' />" ) . appendTo ( "body" ) ;
2997
-
2975
+
2998
2976
var originRemoveEvent = jQuery . removeEvent ;
2999
-
2977
+
3000
2978
var wrapperRemoveEvent = function ( elem , type , handle ) {
3001
2979
equal ( "change" , type , "Event handler for 'change' event should be removed" ) ;
3002
2980
equal ( "change-ie-leak" , jQuery ( elem ) . attr ( "id" ) , "Event handler for 'change' event should be removed from appropriate element" ) ;
3003
2981
originRemoveEvent ( elem , type , handle ) ;
3004
2982
} ;
3005
-
2983
+
3006
2984
jQuery . removeEvent = wrapperRemoveEvent ;
3007
-
2985
+
3008
2986
$fixture . bind ( "change" , function ( event ) { } ) ;
3009
2987
$fixture . unbind ( "change" ) ;
3010
-
2988
+
3011
2989
$fixture . remove ( ) ;
3012
-
2990
+
3013
2991
jQuery . removeEvent = originRemoveEvent ;
3014
2992
} ) ;
3015
2993
0 commit comments