Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fix #13655. Add test for jQuery.ready.promise fallback load. Close gh…
- Loading branch information
Showing
3 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?php | ||
sleep(10000); | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<script src="../../jquery.js"></script> | ||
<script>var $j = jQuery.noConflict();</script> | ||
</head> | ||
<body> | ||
<iframe id="dont_return" src="dont_return.php"></iframe> | ||
<script> | ||
var timeoutId, $, | ||
timeoutFired = false; | ||
|
||
setTimeout(function () { | ||
// Load another jQuery copy using the first one. | ||
$j.getScript( "../../../dist/jquery.js", function () { | ||
$j( "#dont_return" ).attr( "src", "about:blank" ); | ||
|
||
// document ready handled by the just-loaded jQuery copy. | ||
$(function () { | ||
clearTimeout( timeoutId ); | ||
if ( !timeoutFired ) { | ||
window.parent.iframeCallback( true ); | ||
} | ||
}); | ||
}); | ||
|
||
timeoutId = setTimeout(function () { | ||
timeoutFired = true; | ||
window.parent.iframeCallback( false ); | ||
}, 3000); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters