aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2015-04-17 12:13:38 -0400
committerScott González <scott.gonzalez@gmail.com>2015-04-17 12:13:38 -0400
commit6231b161b92d28bdb6657cdd1f7d11436e6b132d (patch)
treef5e4855b709195a920acedaed0fcfdfe74ad8596 /tests/lib
parent45797b9b4166a4d2e883cea9712e075bb484e337 (diff)
downloadjquery-ui-6231b161b92d28bdb6657cdd1f7d11436e6b132d.tar.gz
jquery-ui-6231b161b92d28bdb6657cdd1f7d11436e6b132d.zip
Tests: Fix AMD loading in IE8
It appears that we must load require.js via a standard script tag in order for it to work properly in IE8.
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib/bootstrap.js39
1 files changed, 16 insertions, 23 deletions
diff --git a/tests/lib/bootstrap.js b/tests/lib/bootstrap.js
index 7ca1bbda7..a381394a8 100644
--- a/tests/lib/bootstrap.js
+++ b/tests/lib/bootstrap.js
@@ -1,6 +1,6 @@
( function() {
-window.requirejs = {
+requirejs.config({
paths: {
"globalize": "../../../external/globalize/globalize",
"globalize/ja-JP": "../../../external/globalize/globalize.culture.ja-JP",
@@ -20,7 +20,19 @@ window.requirejs = {
"qunit-assert-classes": [ "qunit" ],
"qunit-assert-close": [ "qunit" ]
}
-};
+});
+
+// Create a module that disables back compat for UI modules
+define( "jquery-no-back-compat", [ "jquery" ], function( $ ) {
+ $.uiBackCompat = false;
+
+ return $;
+} );
+
+// Create a dummy bridge if we're not actually testing in PhantomJS
+if ( !/PhantomJS/.test( navigator.userAgent ) ) {
+ define( "phantom-bridge", function() {} );
+}
// Load all modules in series
function requireModules( dependencies, callback, modules ) {
@@ -83,7 +95,7 @@ function jqueryUrl() {
}
return url;
-};
+}
function swarmInject() {
var url = parseUrl().swarmURL;
@@ -134,26 +146,7 @@ function swarmInject() {
}
}
- // Load requirejs, then load the tests
- script = document.createElement( "script" );
- script.src = "../../../external/requirejs/require.js";
- script.onload = function() {
-
- // Create a module that disables back compat for UI modules
- define( "jquery-no-back-compat", [ "jquery" ], function( $ ) {
- $.uiBackCompat = false;
-
- return $;
- } );
-
- // Create a dummy bridge if we're not actually testing in PhantomJS
- if ( !/PhantomJS/.test( navigator.userAgent ) ) {
- define( "phantom-bridge", function() {} );
- }
-
- requireTests( modules, noBackCompat );
- };
- document.documentElement.appendChild( script );
+ requireTests( modules, noBackCompat );
} )();
} )();