mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Revert "Manipulation: improve test for data-URI"
This reverts commit dd596ccf72
.
This commit is contained in:
parent
276282146a
commit
f1fb094d8e
@ -2679,28 +2679,11 @@ QUnit.test( "Make sure col element is appended correctly", function( assert ) {
|
|||||||
assert.strictEqual( table.find( "td" ).width(), 150 );
|
assert.strictEqual( table.find( "td" ).width(), 150 );
|
||||||
} );
|
} );
|
||||||
|
|
||||||
QUnit.test( "Insert script with data-URI (gh-1887)", 1, function( assert ) {
|
asyncTest( "Insert script with data-URI (gh-1887)", 1, function() {
|
||||||
Globals.register( "testFoo" );
|
Globals.register( "testFoo" );
|
||||||
Globals.register( "testSrcFoo" );
|
jQuery( "#qunit-fixture" ).append( "<script src=\"data:text/javascript,testFoo = 'foo';\"></script>" );
|
||||||
|
setTimeout(function() {
|
||||||
var script = document.createElement( "script" ),
|
strictEqual( window[ "testFoo" ], "foo", "data-URI script executed" );
|
||||||
fixture = document.getElementById( "qunit-fixture" ),
|
start();
|
||||||
done = assert.async();
|
}, 100 );
|
||||||
|
|
||||||
script.src = "data:text/javascript,testSrcFoo = 'foo';";
|
|
||||||
|
|
||||||
fixture.appendChild( script );
|
|
||||||
|
|
||||||
jQuery( fixture ).append( "<script src=\"data:text/javascript,testFoo = 'foo';\"></script>" );
|
|
||||||
|
|
||||||
setTimeout( function() {
|
|
||||||
if ( window[ "testSrcFoo" ] === "foo" ) {
|
|
||||||
assert.strictEqual( window[ "testFoo" ], window[ "testSrcFoo" ], "data-URI script executed" );
|
|
||||||
|
|
||||||
} else {
|
|
||||||
assert.ok( true, "data-URI script is not supported by this environment" );
|
|
||||||
}
|
|
||||||
|
|
||||||
done();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user