You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/unit/ajax.js
+15-5Lines changed: 15 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,9 @@ module( "ajax", {
20
20
});
21
21
22
22
(function(){
23
-
test("Unit Testing Environment",2,function(){
23
+
test("Unit Testing Environment",function(){
24
+
expect(2);
25
+
24
26
ok(hasPHP,"Running in an environment with PHP support. The AJAX tests only run if the environment supports PHP!");
25
27
ok(!isLocal,"Unit tests are not ran from file:// (especially in Chrome. If you must test from file:// with Chrome, run it with the --allow-file-access-from-files flag!)");
26
28
});
@@ -1318,7 +1320,9 @@ module( "ajax", {
1318
1320
}
1319
1321
});
1320
1322
1321
-
test("#7531 - jQuery.ajax() - Location object as url",1,function(){
1323
+
test("#7531 - jQuery.ajax() - Location object as url",function(){
1324
+
expect(1);
1325
+
1322
1326
varxhr,
1323
1327
success=false;
1324
1328
try{
@@ -1424,7 +1428,9 @@ module( "ajax", {
1424
1428
});
1425
1429
});
1426
1430
1427
-
test("#9887 - jQuery.ajax() - Context with circular references (#9887)",2,function(){
1431
+
test("#9887 - jQuery.ajax() - Context with circular references (#9887)",function(){
1432
+
expect(2);
1433
+
1428
1434
varsuccess=false,
1429
1435
context={};
1430
1436
context.field=context;
@@ -1720,7 +1726,9 @@ module( "ajax", {
1720
1726
1721
1727
//----------- jQuery.domManip()
1722
1728
1723
-
test("#11264 - jQuery.domManip() - no side effect because of ajaxSetup or global events",1,function(){
1729
+
test("#11264 - jQuery.domManip() - no side effect because of ajaxSetup or global events",function(){
1730
+
expect(1);
1731
+
1724
1732
jQuery.ajaxSetup({
1725
1733
type: "POST"
1726
1734
});
@@ -2126,7 +2134,9 @@ module( "ajax", {
2126
2134
2127
2135
//----------- jQuery.active
2128
2136
2129
-
test("jQuery.active",1,function(){
2137
+
test("jQuery.active",function(){
2138
+
expect(1);
2139
+
2130
2140
ok(jQuery.active===0,"ajax active counter should be zero: "+jQuery.active);
@@ -962,7 +968,9 @@ test("certain css values of 'normal' should be convertable to a number, see #862
962
968
963
969
// only run this test in IE9
964
970
if(document.documentMode===9){
965
-
test(".css('filter') returns a string in IE9, see #12537",1,function(){
971
+
test(".css('filter') returns a string in IE9, see #12537",function(){
972
+
expect(1);
973
+
966
974
equal(jQuery("<div style='-ms-filter:\"progid:DXImageTransform.Microsoft.gradient(startColorstr=#FFFFFF, endColorstr=#ECECEC)\";'></div>").css("filter"),"progid:DXImageTransform.Microsoft.gradient(startColorstr=#FFFFFF, endColorstr=#ECECEC)","IE9 returns the correct value from css('filter').");
967
975
});
968
976
}
@@ -1170,7 +1178,9 @@ asyncTest( "Clearing a Cloned Element's Style Shouldn't Clear the Original Eleme
1170
1178
window.setTimeout(start,1000);
1171
1179
});
1172
1180
1173
-
test("show() after hide() should always set display to initial value (#14750)",1,function(){
1181
+
test("show() after hide() should always set display to initial value (#14750)",function(){
1182
+
expect(1);
1183
+
1174
1184
vardiv=jQuery("<div />"),
1175
1185
fixture=jQuery("#qunit-fixture");
1176
1186
@@ -1189,7 +1199,9 @@ test( "show() after hide() should always set display to initial value (#14750)",
1189
1199
exist="order"instyle||"WebkitOrder"instyle;
1190
1200
1191
1201
if(exist){
1192
-
test("Don't append px to CSS \"order\" value (#14049)",1,function(){
1202
+
test("Don't append px to CSS \"order\" value (#14049)",function(){
1203
+
expect(1);
1204
+
1193
1205
var$elem=jQuery("<div/>");
1194
1206
1195
1207
$elem.css("order",2);
@@ -1198,7 +1210,9 @@ test( "show() after hide() should always set display to initial value (#14750)",
1198
1210
}
1199
1211
})();
1200
1212
1201
-
test("Do not throw on frame elements from css method (#15098)",1,function(){
1213
+
test("Do not throw on frame elements from css method (#15098)",function(){
1214
+
expect(1);
1215
+
1202
1216
varframeWin,frameDoc,
1203
1217
frameElement=document.createElement("iframe"),
1204
1218
frameWrapDiv=document.createElement("div");
@@ -1221,7 +1235,9 @@ test( "Do not throw on frame elements from css method (#15098)", 1, function() {
1221
1235
}
1222
1236
});
1223
1237
1224
-
test("get upper case alpha opacity in IE8",1,function(){
1238
+
test("get upper case alpha opacity in IE8",function(){
0 commit comments