--- /dev/null
+<!doctype html>
+<html>
+<head>
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
+ <title>alias-masked DOM properties (#14074)</title>
+ <script>
+ var errors = [];
+ window.onerror = function( errorMessage, filePath, lineNumber ) {
+ errors.push( errorMessage );
+ };
+ </script>
+ <script src="../../jquery.js"></script>
+</head>
+<body>
+ <form>
+ <input type="text" id="nodeName"/>
+ </form>
+ <script>
+ jQuery(function() {
+ window.parent.iframeCallback( errors );
+ });
+ </script>
+</body>
+</html>
expect( 1 );
equal( true, ready, "document ready correctly fired when jQuery is loaded after DOMContentLoaded" );
});
+
+testIframeWithCallback( "Tolerating alias-masked DOM properties (#14074)", "core/aliased.html",
+ function( errors ) {
+ expect( 1 );
+ deepEqual( errors, [], "jQuery loaded" );
+ }
+);
}
});
-test("jQuery.acceptData", 6, function() {
+test("jQuery.acceptData", 11, function() {
+ var flash, applet;
+
ok( jQuery.acceptData( document ), "document" );
ok( jQuery.acceptData( document.documentElement ), "documentElement" );
ok( jQuery.acceptData( {} ), "object" );
+ ok( jQuery.acceptData( document.createElement( "embed" ) ), "embed" );
+ ok( jQuery.acceptData( document.createElement( "applet" ) ), "applet" );
+
+ flash = document.createElement( "object" );
+ flash.setAttribute( "classid", "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" );
+ ok( jQuery.acceptData( flash ), "flash" );
- ok( !jQuery.acceptData( document.createComment("") ), "comment" );
- ok( !jQuery.acceptData( document.createTextNode("") ), "text" );
+ applet = document.createElement( "object" );
+ applet.setAttribute( "classid", "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" );
+ ok( jQuery.acceptData( applet ), "applet" );
+
+ ok( !jQuery.acceptData( document.createComment( "" ) ), "comment" );
+ ok( !jQuery.acceptData( document.createTextNode( "" ) ), "text" );
ok( !jQuery.acceptData( document.createDocumentFragment() ), "documentFragment" );
+
+ ok( jQuery.acceptData(
+ jQuery( "#form" ).append( "<input id='nodeType'/><input id='nodeName'/>" )[ 0 ] ),
+ "form with aliased DOM properties" );
});
test("Check proper data removal of non-element descendants nodes (#8335)", 1, function() {