diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/data/core/onready.html | 24 | ||||
-rw-r--r-- | test/unit/core.js | 7 |
2 files changed, 31 insertions, 0 deletions
diff --git a/test/data/core/onready.html b/test/data/core/onready.html new file mode 100644 index 000000000..1e8f127e7 --- /dev/null +++ b/test/data/core/onready.html @@ -0,0 +1,24 @@ +<!doctype html> +<html> +<head> + <meta http-equiv="Content-type" content="text/html; charset=utf-8"/> + <title>alias-masked DOM properties (#14074)</title> + <script> + var error = false; + window.onready = function() { error = "Called window.onready"; }; + </script> + <script src="../../jquery.js"></script> +</head> +<body> + <form> + <input type="text" id="nodeName"/> + </form> + <script> + jQuery(function() { + setTimeout( function() { + window.parent.iframeCallback( error ); + }); + }); + </script> +</body> +</html>
\ No newline at end of file diff --git a/test/unit/core.js b/test/unit/core.js index 6801c7c0d..d1b221ce8 100644 --- a/test/unit/core.js +++ b/test/unit/core.js @@ -1516,3 +1516,10 @@ testIframeWithCallback( "Tolerating alias-masked DOM properties (#14074)", "core deepEqual( errors, [], "jQuery loaded" ); } ); + +testIframeWithCallback( "Don't call window.onready (#14802)", "core/onready.html", + function( error ) { + expect( 1 ); + equal( error, false, "no call to user-defined onready" ); + } +); |