aboutsummaryrefslogtreecommitdiffstats
path: root/test/data
diff options
context:
space:
mode:
authorjeresig <jeresig@gmail.com>2010-03-23 12:19:47 -0400
committerjeresig <jeresig@gmail.com>2010-03-23 12:19:47 -0400
commitf6a50cacd8cd7663650d3ff5557cc20bfcdcd765 (patch)
tree564b687ee62a404cc2afe07d0276a84900025a6d /test/data
parent8effe3a7dee91c833cc1774646da9d743600c64c (diff)
downloadjquery-f6a50cacd8cd7663650d3ff5557cc20bfcdcd765.tar.gz
jquery-f6a50cacd8cd7663650d3ff5557cc20bfcdcd765.zip
Handle auto-running of the TestSwarm injection script in the test suite.
Diffstat (limited to 'test/data')
-rw-r--r--test/data/testrunner.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/data/testrunner.js b/test/data/testrunner.js
index 95a1b6eec..a45934075 100644
--- a/test/data/testrunner.js
+++ b/test/data/testrunner.js
@@ -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>");
+})();