diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/data/data/dataAttrs.html | 16 | ||||
-rw-r--r-- | test/unit/data.js | 6 |
2 files changed, 22 insertions, 0 deletions
diff --git a/test/data/data/dataAttrs.html b/test/data/data/dataAttrs.html new file mode 100644 index 000000000..5e6e442a6 --- /dev/null +++ b/test/data/data/dataAttrs.html @@ -0,0 +1,16 @@ +<!DOCTYPE html> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <title>IE11 onpageshow strangeness (#14894)</title> + <script src="../../jquery.js"></script> + <script> + $(function(){ + window.parent.iframeCallback( $( "body" ).data().result ); + }); + </script> +</head> +<body x-what="test" data-result="ok" onload="x=1" onpageshow="x=1"> + Test for #14894 +</body> +</html> diff --git a/test/unit/data.js b/test/unit/data.js index 05fc5f193..14acd427e 100644 --- a/test/unit/data.js +++ b/test/unit/data.js @@ -677,3 +677,9 @@ test( "JSON data- attributes can have newlines", function() { equal( x.data("some").foo, "bar", "got a JSON data- attribute with spaces" ); x.remove(); }); + +testIframeWithCallback( "enumerate data attrs on body (#14894)", "data/dataAttrs.html", function( result ) { + expect(1); + + equal(result, "ok", "enumeration of data- attrs on body" ); +});
\ No newline at end of file |