From f1fb094d8efffb2f69bafd5b44873b266aace7ac Mon Sep 17 00:00:00 2001 From: Oleg Gaidarenko Date: Fri, 13 Nov 2015 16:44:35 +0300 Subject: [PATCH] Revert "Manipulation: improve test for data-URI" This reverts commit dd596ccf729b2f39d44b73bc54b53bd41c880146. --- test/unit/manipulation.js | 29 ++++++----------------------- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js index 3000a8393..492390adf 100644 --- a/test/unit/manipulation.js +++ b/test/unit/manipulation.js @@ -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( "" ); - - 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( "" ); + setTimeout(function() { + strictEqual( window[ "testFoo" ], "foo", "data-URI script executed" ); + start(); + }, 100 ); }); -- 2.39.5