mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Tests: Don't load non-basic tests when basic module is selected
When loading basic tests don't load any others to not overload Android 2.3. The drawback is that most tests are not selectable in the module dropdown when the basic module is seelcted. (cherry-picked from855b0c8c28
) Refs2c7e9c9349
This commit is contained in:
parent
c7d458fb9e
commit
06454d118f
@ -270,20 +270,28 @@ this.iframeCallback = undefined;
|
|||||||
QUnit.config.autostart = false;
|
QUnit.config.autostart = false;
|
||||||
this.loadTests = function() {
|
this.loadTests = function() {
|
||||||
var loadSwarm,
|
var loadSwarm,
|
||||||
url = window.location.search;
|
url = window.location.search,
|
||||||
|
basicTests = url.substring( 1 ).split( "&" ).indexOf( "module=basic" ) > -1;
|
||||||
|
|
||||||
url = decodeURIComponent( url.slice( url.indexOf( "swarmURL=" ) + "swarmURL=".length ) );
|
url = decodeURIComponent( url.slice( url.indexOf( "swarmURL=" ) + "swarmURL=".length ) );
|
||||||
loadSwarm = url && url.indexOf( "http" ) === 0;
|
loadSwarm = url && url.indexOf( "http" ) === 0;
|
||||||
|
|
||||||
// Get testSubproject from testrunner first
|
// Get testSubproject from testrunner first
|
||||||
require( [ "data/testrunner.js" ], function() {
|
require( [ "data/testrunner.js" ], function() {
|
||||||
var tests = [
|
var tests = []
|
||||||
|
.concat( [
|
||||||
|
|
||||||
// A special module with basic tests, meant for
|
// A special module with basic tests, meant for
|
||||||
// not fully supported environments like Android 2.3,
|
// not fully supported environments like Android 2.3,
|
||||||
// jsdom or PhantomJS. We run it everywhere, though,
|
// jsdom or PhantomJS. We run it everywhere, though,
|
||||||
// to make sure tests are not broken.
|
// to make sure tests are not broken.
|
||||||
"unit/basic.js",
|
//
|
||||||
|
// Support: Android 2.3 only
|
||||||
|
// When loading basic tests don't load any others to not
|
||||||
|
// overload Android 2.3.
|
||||||
|
"unit/basic.js"
|
||||||
|
] )
|
||||||
|
.concat( basicTests ? [] : [
|
||||||
"unit/core.js",
|
"unit/core.js",
|
||||||
"unit/callbacks.js",
|
"unit/callbacks.js",
|
||||||
"unit/deferred.js",
|
"unit/deferred.js",
|
||||||
@ -304,7 +312,7 @@ this.loadTests = function() {
|
|||||||
"unit/dimensions.js",
|
"unit/dimensions.js",
|
||||||
"unit/animation.js",
|
"unit/animation.js",
|
||||||
"unit/tween.js"
|
"unit/tween.js"
|
||||||
];
|
] );
|
||||||
|
|
||||||
// Ensure load order (to preserve test numbers)
|
// Ensure load order (to preserve test numbers)
|
||||||
( function loadDep() {
|
( function loadDep() {
|
||||||
|
Loading…
Reference in New Issue
Block a user