diff options
author | Mike Sherov <mike.sherov@gmail.com> | 2012-02-14 18:19:32 -0500 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2012-02-16 23:17:57 -0500 |
commit | 7226cf2800315e90b671db63f2b5f51150ad7e8e (patch) | |
tree | 7ae721d10ecf13231e475559a16b07c5c0a8b0ac /test/data | |
parent | 6c2b64dfa5e1d6f90c74f0f1719e9f11f52de7a4 (diff) | |
download | jquery-7226cf2800315e90b671db63f2b5f51150ad7e8e.tar.gz jquery-7226cf2800315e90b671db63f2b5f51150ad7e8e.zip |
fixes #10901, PHP required for unit tests, but still allow the tests to run
Diffstat (limited to 'test/data')
-rw-r--r-- | test/data/include_js.php | 11 | ||||
-rw-r--r-- | test/data/testinit.js | 3 |
2 files changed, 10 insertions, 4 deletions
diff --git a/test/data/include_js.php b/test/data/include_js.php index 9390ca33c..23207a9d9 100644 --- a/test/data/include_js.php +++ b/test/data/include_js.php @@ -69,8 +69,13 @@ die(); ?> */ +hasPHP = false; + // javascript fallback using src files in case this is not run on a PHP server! -var files = [ +// please note that this fallback is for convenience only, and is not fully supported +// i.e. don't expect all of the tests to work properly +var baseURL = document.location.href.replace( /\/test\/.+/, "/"), + files = [ "core", "callbacks", "deferred", @@ -97,5 +102,5 @@ var files = [ i = 0; for ( ; i < len; i++ ) { - document.write("<script src=\"../src/" + files[ i ] + ".js\"><"+"/script>"); -} + document.write("<script src=\"" + baseURL + "src/" + files[ i ] + ".js\"><"+"/script>"); +}
\ No newline at end of file diff --git a/test/data/testinit.js b/test/data/testinit.js index aeda2433b..83d9db1f6 100644 --- a/test/data/testinit.js +++ b/test/data/testinit.js @@ -2,6 +2,7 @@ var jQuery = this.jQuery || "jQuery", // For testing .noConflict() $ = this.$ || "$", originaljQuery = jQuery, original$ = $, + hasPHP = true, amdDefined; /** @@ -117,5 +118,5 @@ function url(value) { equal( jQuery.active, 0, "No AJAX requests are still active" ); oldActive = jQuery.active; } - } + }; }());
\ No newline at end of file |