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 );
|
||||
} );
|
||||
|
||||
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( "testSrcFoo" );
|
||||
|
||||
var script = document.createElement( "script" ),
|
||||
fixture = document.getElementById( "qunit-fixture" ),
|
||||
done = assert.async();
|
||||
|
||||
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();
|
||||
});
|
||||
jQuery( "#qunit-fixture" ).append( "<script src=\"data:text/javascript,testFoo = 'foo';\"></script>" );
|
||||
setTimeout(function() {
|
||||
strictEqual( window[ "testFoo" ], "foo", "data-URI script executed" );
|
||||
start();
|
||||
}, 100 );
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user