aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorBin Xin <rhyzix@gmail.com>2014-11-28 14:09:29 +0800
committerOleg Gaidarenko <markelog@gmail.com>2014-12-03 05:35:20 +0300
commitbc1902ddc08502d60ee77e00ea95d454666d7e56 (patch)
tree0b3cea862f9518fbdbb955ce8fca579933e67366 /test/unit
parentfa70df692eff16ad5d64a65ec565542d0690f732 (diff)
downloadjquery-bc1902ddc08502d60ee77e00ea95d454666d7e56.tar.gz
jquery-bc1902ddc08502d60ee77e00ea95d454666d7e56.zip
Manipulation: support data-URI scripts insertion
Ref 15f4dec7894f1e00adbfb9bce4f870441a527bd6
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/manipulation.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js
index e2bfd75b1..f4918b59a 100644
--- a/test/unit/manipulation.js
+++ b/test/unit/manipulation.js
@@ -2461,3 +2461,12 @@ test( "Make sure jQuery.fn.remove can work on elements in documentFragment", 1,
equal( fragment.childNodes.length, 0, "div element was removed from documentFragment" );
});
+
+asyncTest( "Insert script with data-URI (gh-1887)", 1, function() {
+ Globals.register( "testFoo" );
+ jQuery( "#qunit-fixture" ).append( "<script src=\"data:text/javascript,testFoo = 'foo';\"></script>" );
+ setTimeout(function (){
+ strictEqual( window[ "testFoo" ], "foo", "data-URI script executed" );
+ start();
+ }, 100 );
+});