@@ -25,19 +25,20 @@ TestManager = {
25
25
// Order is important
26
26
file = [
27
27
"version" ,
28
- "data/test-utils" ,
29
- "unit/migrate" ,
30
- "unit/jquery/core" ,
31
- "unit/jquery/ajax" ,
32
- "unit/jquery/attributes" ,
33
- "unit/jquery/css" ,
34
- "unit/jquery/data" ,
35
- "unit/jquery/effects" ,
36
- "unit/jquery/event" ,
37
- "unit/jquery/offset" ,
38
- "unit/jquery/serialize" ,
39
- "unit/jquery/traversing" ,
40
- "unit/jquery/deferred"
28
+ "compareVersions" ,
29
+ "main" ,
30
+ "jquery/core" ,
31
+ "jquery/ajax" ,
32
+ "jquery/attributes" ,
33
+ "jquery/css" ,
34
+ "jquery/data" ,
35
+ "jquery/effects" ,
36
+ "jquery/event" ,
37
+ "jquery/manipulation" ,
38
+ "jquery/offset" ,
39
+ "jquery/serialize" ,
40
+ "jquery/traversing" ,
41
+ "jquery/deferred"
41
42
] ;
42
43
43
44
for ( i = 0 ; i < file . length ; i ++ ) {
@@ -81,19 +82,19 @@ TestManager = {
81
82
* as appropriate (for example by calling TestManager.loadProject)
82
83
*/
83
84
runIframeTest : function ( title , url , func ) {
84
- var self = this ;
85
+ var that = this ;
85
86
QUnit . test ( title , function ( assert ) {
86
87
var iframe ,
87
88
query = window . location . search . slice ( 1 ) ,
88
89
done = assert . async ( ) ;
89
90
90
- self . iframeCallback = function ( ) {
91
+ that . iframeCallback = function ( ) {
91
92
var args = Array . prototype . slice . call ( arguments ) ;
92
93
93
94
args . unshift ( assert ) ;
94
95
95
96
setTimeout ( function ( ) {
96
- self . iframeCallback = undefined ;
97
+ that . iframeCallback = undefined ;
97
98
98
99
func . apply ( this , args ) ;
99
100
func = function ( ) { } ;
@@ -104,22 +105,22 @@ TestManager = {
104
105
} ;
105
106
iframe = jQuery ( "<div/>" )
106
107
. css ( { position : "absolute" , width : "500px" , left : "-600px" } )
107
- . append ( jQuery ( "<iframe/>" ) . attr ( "src" , self . baseURL + "data/" + url +
108
+ . append ( jQuery ( "<iframe/>" ) . attr ( "src" , that . baseURL + url +
108
109
( query && ( / \? / . test ( url ) ? "&" : "?" ) ) + query ) )
109
110
. appendTo ( "#qunit-fixture" ) ;
110
111
} ) ;
111
112
} ,
112
113
iframeCallback : undefined ,
113
- baseURL : window . __karma__ ? "base/test/" : "./" ,
114
114
init : function ( projects ) {
115
115
var p , project , originalDeduplicateWarnings ,
116
116
disabledPatches , origMigrateDisablePatches ,
117
117
FILEPATH = "/test/data/testinit.js" ,
118
118
activeScript = [ ] . slice . call ( document . getElementsByTagName ( "script" ) , - 1 ) [ 0 ] ,
119
119
parentUrl = activeScript && activeScript . src ?
120
120
activeScript . src . replace ( / [ ? # ] .* / , "" ) + FILEPATH . replace ( / [ ^ / ] + / g, ".." ) + "/" :
121
- "../" ,
122
- baseURL = parentUrl + "test/data/" ;
121
+ "../" ;
122
+
123
+ this . baseURL = parentUrl + "test/data/" ;
123
124
124
125
this . projects = projects ;
125
126
this . loaded = [ ] ;
@@ -154,11 +155,11 @@ TestManager = {
154
155
* @example url("index.html")
155
156
* @result "data/index.html?10538358428943"
156
157
*
157
- * @example url("mock .php?foo=bar")
158
- * @result "data/mock .php?foo=bar&10538358345554"
158
+ * @example url("xyz .php?foo=bar")
159
+ * @result "data/xyz .php?foo=bar&10538358345554"
159
160
*/
160
161
window . url = function url ( value ) {
161
- return baseURL + value + ( / \? / . test ( value ) ? "&" : "?" ) +
162
+ return TestManager . baseURL + value + ( / \? / . test ( value ) ? "&" : "?" ) +
162
163
new Date ( ) . getTime ( ) + "" + parseInt ( Math . random ( ) * 100000 , 10 ) ;
163
164
} ;
164
165
0 commit comments