]> source.dussan.org Git - jquery.git/commitdiff
Handle auto-running of the TestSwarm injection script in the test suite.
authorjeresig <jeresig@gmail.com>
Tue, 23 Mar 2010 16:19:47 +0000 (12:19 -0400)
committerjeresig <jeresig@gmail.com>
Tue, 23 Mar 2010 16:19:47 +0000 (12:19 -0400)
test/data/testrunner.js

index 95a1b6eec808a81aa00acdfb6fee86ac1d4d796e..a459340759b74a48f5cdc8d819041e206550e165 100644 (file)
@@ -1 +1,11 @@
 jQuery.noConflict(); // Allow the test to run with other libs or jQuery's.
+
+// load testswarm agent
+(function() {
+       var url = window.location.search;
+       url = decodeURIComponent( url.slice( url.indexOf("swarmURL=") + 9 ) );
+       if ( !url || url.indexOf("http") !== 0 ) {
+               return;
+       }
+       document.write("<scr" + "ipt src='http://testswarm.com/js/inject.js?" + (new Date).getTime() + "'></scr" + "ipt>");
+})();