git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0e93b2e
)
Fixed the ajax test regarding the jsonp option set to false and added a test to contr...
author
jaubourg
<j@ubourg.net>
Sun, 16 Jan 2011 04:36:20 +0000
(
05:36
+0100)
committer
jaubourg
<j@ubourg.net>
Sun, 16 Jan 2011 04:36:20 +0000
(
05:36
+0100)
test/unit/ajax.js
patch
|
blob
|
history
diff --git
a/test/unit/ajax.js
b/test/unit/ajax.js
index
2e8a455
..
f26ebad
100644
(file)
--- a/
test/unit/ajax.js
+++ b/
test/unit/ajax.js
@@
-1117,10
+1117,10
@@
test("jQuery.getScript(String, Function) - no callback", function() {
jQuery.each( [ "Same Domain", "Cross Domain" ] , function( crossDomain , label ) {
test("jQuery.ajax() - JSONP, " + label, function() {
jQuery.each( [ "Same Domain", "Cross Domain" ] , function( crossDomain , label ) {
test("jQuery.ajax() - JSONP, " + label, function() {
- expect(16);
+ expect(17);
var count = 0;
var count = 0;
- function plus(){ if ( ++count == 16 ) start(); }
+ function plus(){ if ( ++count == 17 ) start(); }
stop();
stop();
@@
-1343,15
+1343,15
@@
jQuery.each( [ "Same Domain", "Cross Domain" ] , function( crossDomain , label )
jsonpCallback: "XXX",
crossDomain: crossDomain,
beforeSend: function() {
jsonpCallback: "XXX",
crossDomain: crossDomain,
beforeSend: function() {
- console.log( this.url );
+ ok( /^data\/jsonp.php\?callback=XXX&_=\d+$/.test( this.url ) ,
+ "The URL wasn't messed with (GET, custom callback name with no url manipulation)" );
+ plus();
},
success: function(data){
},
success: function(data){
- console.log(data);
ok( data.data, "JSON results returned (GET, custom callback name with no url manipulation)" );
plus();
},
error: function(data){
ok( data.data, "JSON results returned (GET, custom callback name with no url manipulation)" );
plus();
},
error: function(data){
- console.log(data);
ok( false, "Ajax error JSON (GET, custom callback name with no url manipulation)" );
plus();
}
ok( false, "Ajax error JSON (GET, custom callback name with no url manipulation)" );
plus();
}