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 (from parent 1:
1a94a46
)
jQuery.ajax modified the passed-in object only to help test the code - this shouldn...
author
John Resig
<jeresig@gmail.com>
Sat, 7 Nov 2009 15:08:07 +0000
(16:08 +0100)
committer
John Resig
<jeresig@gmail.com>
Sat, 7 Nov 2009 15:08:07 +0000
(16:08 +0100)
src/ajax.js
patch
|
blob
|
history
test/unit/ajax.js
patch
|
blob
|
history
diff --git
a/src/ajax.js
b/src/ajax.js
index
353c824
..
a9f47dd
100644
(file)
--- a/
src/ajax.js
+++ b/
src/ajax.js
@@
-194,7
+194,7
@@
jQuery.extend({
ajax: function( s ) {
// Extend the settings, but re-extend 's' so that it can be
// checked again later (in the test suite, specifically)
ajax: function( s ) {
// Extend the settings, but re-extend 's' so that it can be
// checked again later (in the test suite, specifically)
- s = jQuery.extend(true, s, jQuery.extend(true, {}, jQuery.ajaxSettings, s));
+ s = jQuery.extend(true, {}, jQuery.ajaxSettings, s);
var jsonp, status, data,
callbackContext = s.context || window,
var jsonp, status, data,
callbackContext = s.context || window,
diff --git
a/test/unit/ajax.js
b/test/unit/ajax.js
index
5d791be
..
1fcf5ea
100644
(file)
--- a/
test/unit/ajax.js
+++ b/
test/unit/ajax.js
@@
-368,6
+368,10
@@
test("ajax cache", function () {
ok( jQuery.ajax({url: "data/text.php?name=David&_=tobereplaced555&washere=true", cache:false}), "test with 2 parameters surrounding _= one" );
});
ok( jQuery.ajax({url: "data/text.php?name=David&_=tobereplaced555&washere=true", cache:false}), "test with 2 parameters surrounding _= one" );
});
+/*
+ * Test disabled.
+ * The assertions expect that the passed-in object will be modified,
+ * which shouldn't be the case. Fixes #5439.
test("global ajaxSettings", function() {
expect(2);
test("global ajaxSettings", function() {
expect(2);
@@
-389,6
+393,7
@@
test("global ajaxSettings", function() {
jQuery.ajaxSettings = tmp;
});
jQuery.ajaxSettings = tmp;
});
+*/
test("load(String)", function() {
expect(1);
test("load(String)", function() {
expect(1);