Commit Graph

266 Commits

Author SHA1 Message Date
John Resig
ba9e0fc177 Use a different workaround for detecting when Opera finds a status 304 page. Fixes #6060. 2010-09-21 15:22:34 -04:00
jeresig
c90d609c0d Fixing request data param issue. Thanks to mislav for the patch. Fixes #5123. 2010-06-14 23:08:28 -04:00
malsup
d1931a8241 Fix for http://dev.jquery.com/ticket/6451 2010-06-15 11:02:26 +08:00
jeresig
273822c138 Update other remote test URLs as well. 2010-03-23 16:24:51 -04:00
jeresig
0fbac16dbe Strip off filename and query string for JSONP Remote test. 2010-03-23 16:22:09 -04:00
jeresig
dcf0fa5048 More changes to get jQuery in line with JSLint. 2010-03-01 21:24:49 -05:00
Ben Alman
3c5b1ca03b Ok, this should actually fix #6041 :) 2010-02-06 11:46:44 +08:00
jeresig
54bd004e53 Make sure that we don't try to double-encode params using the traditional style. Fixes #6041. 2010-02-05 19:43:31 -05:00
Mike Alup
ca90ffb332 Provided detailed message for JSON parse errors. Fixes #4435. 2010-01-25 18:48:52 -05:00
John Resig
1a14a38ff7 Make sure original context is maintained and not the deep extended one. Fixes #5924. 2010-01-25 01:08:24 -05:00
John Resig
f91b944cab Objects with length properties weren't getting serialized properly by jQuery.param(). Fixes #5862. 2010-01-25 00:46:03 -05:00
John Resig
c639405c4d Don't set the context in .load() as it stops the global ajax events from firing. Fixes #5922. 2010-01-24 21:58:32 -05:00
John Resig
155ecf42a0 Make sure regular settings object is set as context for all Ajax requests, if none is specified. Fixes #5838. 2010-01-16 10:11:01 -05:00
jeresig
05aaa33957 Make sure that null params aren't traversed. Fixes #5794. 2010-01-13 09:29:01 -05:00
jeresig
308d6cdad0 Make sure that a parsererror is thrown whenever malformed JSON comes back from a server (so that the Ajax error handler is called). Makes it uniform across browsers that do and don't have JSON.parse support. 2010-01-07 12:21:58 -05:00
jeresig
84dd82eb1a Add some abort() Ajax tests. Verifies that #3984 works. 2010-01-06 12:13:56 -05:00
jeresig
6861b5d4eb Added in support for content-type sniffing for scripts. Fixes #5718. 2010-01-06 10:19:38 -05:00
Rick Waldron
787f271052 Detect JSON Ajax requests by the response content-type (like is done with XML). Fixes #5709. 2010-01-05 19:48:16 -05:00
Ben Alman
3951894504 Moved jQuery.param "traditional" flag into jQuery.ajaxSettings, can now be overridden via 2nd argument to jQuery.param 2009-12-23 01:49:53 +08:00
Dave Methvin
b31b9bd756 Add new html5 input types to list of serializable types. Older browers handle these as type="text" so they should be consistently serialized on both old and new browsers. Fixes #5667. 2009-12-18 04:05:45 +08:00
Ben Alman
927e1966de Further modified jQuery 1.4 .param() method to serialize arrays containing non-scalar values. PHP and jQuery BBQ can both deserialize these structures, while rack (as of 1.0.0) cannot. 2009-12-18 04:01:05 +08:00
John Resig
fbc73d45b4 Added in support for $.ajax jsonpCallback (allowing you to specify the name of the callback method - and allowing you to avoid skipping the cache). Fixes #4206. 2009-12-06 17:17:14 -08:00
jeresig
f0c32278b4 Just restore window.JSON in the getJSON test, don't try to delete the value. 2009-12-03 11:28:49 -05:00
John Resig
c08474580c Re-wrote context Ajax test to use an element instead of an object (a more realistic test and works with the new jQuery.extend logic for cloning object literals). 2009-11-17 14:36:10 -05:00
John Resig
6a722e251d jQuery.ajax modified the passed-in object only to help test the code - this shouldn't occur. Fixes #5439. 2009-11-07 16:08:07 +01:00
Yehuda Katz
67089eedf6 Getting $.param working well; Patch by ben_alman 2009-09-17 22:37:19 +00:00
Jörn Zaefferer
f55fb36e54 remove globals in tests for compability with ?noglobals, to be enabled by default 2009-09-15 17:51:38 +00:00
Ariel Flesler
cf8c1249d1 jquery ajax: addition for #2452. Wasn't working correctly in some cases. 2009-09-15 16:45:37 +00:00
Ariel Flesler
183f37e4b4 jquery ajax: closes #4994. Adding 'context' setting to $.ajax 2009-09-15 15:19:58 +00:00
Yehuda Katz
50d78e7658 Adds nested param serialization; Closes #4201 (by merbjedi) 2009-09-02 05:16:21 +00:00
John Resig
a64ad8b4e9 Temporarily disabled some tests for Opera 10 - a variety of problems with input elements and selectors exist. 2009-08-26 16:29:46 +00:00
John Resig
6649ae2903 Exaggerate the times for the localtimeout ajax test. 2009-07-21 20:24:12 +00:00
John Resig
ad5ba1a72e Fixed spelling mistake in Ajax tests. 2009-07-14 21:20:16 +00:00
John Resig
c3c94823f2 Fixed the handling of .status == 304 in Opera (it always returns 0). Also silently "pass" in Opera 9.6 (which is unable to send the correct headers with setRequestHeader). Follow-up to bug #4764. 2009-07-14 21:13:23 +00:00
John Resig
739644dce5 Minor tab-spacing tweak. 2009-06-15 13:40:10 +00:00
John Resig
28ab4d3224 Adding support for etags in $.ajax() - and simplified the if-modified-since implementation. Thanks to Lawrence for the patch! Closes ticket #4764. 2009-06-15 13:36:12 +00:00
John Resig
90a87c03b4 Switched to using new Function instead of eval for handling JSON parsing (Fixes bug #4680). Added support for JSON.parse, if it exists (Fixes bug #4429). 2009-05-20 21:28:48 +00:00
Brandon Aaron
29411a4405 error case for an ajax test 2009-05-16 20:22:47 +00:00
Brandon Aaron
cbda6c541b fix global event triggering that i broke in r6323 2009-05-01 00:59:27 +00:00
John Resig
ca79d866fe Made it so that search input elements are now serialized. Fixes bug #4107. 2009-02-18 19:43:14 +00:00
John Resig
aa29b8e3bc Had to remove the global variable tricks (especially the delete window calls) as they cause
exceptions in IE. Also fixed a faulty test that assumed the order of Ajax function callbacks 
would be consistent.
2009-01-12 01:12:58 +00:00
Ariel Flesler
afb05081c0 testrunner: Putting back the global variables used for ajax tests. I added many calls to delete though. The global namespace must be cleaned up before calling start() again. 2009-01-10 00:16:48 +00:00
Ariel Flesler
d62875fb01 testrunner: Removing every global variable leaked within (and outside) tests. Some were deleted and some saved within the jQuery namespace. 2009-01-09 23:49:18 +00:00
John Resig
45b3a884d5 Timeout test appears to be flaky - disabling, for now. 2009-01-05 22:14:26 +00:00
John Resig
60226c8a30 The timeout test was waiting for 10 seconds - unnecessary, lowered it to 1 second. 2009-01-05 22:05:59 +00:00
Jörn Zaefferer
12bb969411 core: tests cleanup for compability with qunit updates: stop() now actually accepts an argument (ajax.js); selectors should be confined to fixture(event.js) 2008-10-24 14:40:58 +00:00
Ariel Flesler
9e48649729 test runner: the changes are:
- Replaced all the $ for jQuery in the tests and suite.
- Added a noConflict to testrunner.js.
- Modified the test for noConflict() so that it still work.
- Added jQuery 1.2.1 and 1.2.3 to otherlibs.
2008-05-28 23:18:25 +00:00
Ariel Flesler
c6e88b16e9 test runner: a test for load() with a hash of data, and another for load() with a string of data (#1516).
It includes a php that dumps all the GET and POST vars to html elements, where the key makes the id, and the value the text.
2008-05-27 22:46:28 +00:00
Scott González
5311565223 ajax test: Removed test for extending with null. 2008-05-07 01:16:54 +00:00
Jörn Zaefferer
46931d3146 jquery ajax: support for dynamic data arguments, see #2806; added test/data/echoQuery.php for easier testing of sent query strings 2008-05-06 22:21:43 +00:00
Ariel Flesler
ba48be3ada test runner: translated all the ok() with '==' to equals(), as it gives more information on failures. 2008-05-06 18:56:02 +00:00
Jörn Zaefferer
e454e8305d jquery.ajax: improvement for #2688, added test 2008-04-22 22:07:17 +00:00
David Serduke
0635df4391 Fixed #2174 by removing the s.dataType == "json" check for possible cross domain since it causes absolute urls to use a <script> tag ajax retrieval even though absolute urls work fine for retrieving local data. Cross-domain jsonp will still work since the $.ajax() function actually changes the s.dataType to "script" before it reaches this check in cases where it is s.dataType == "jsonp" or s.dataType == "json" and a parameter has =? in it. 2008-01-17 21:38:58 +00:00
John Resig
b721a2f472 Added a fix for bug #2020 - if you want to do data: {callback: "?"}, do jsonp: "callback" instead. 2007-12-17 00:44:00 +00:00
David Serduke
06c2f06a21 Fixed #2046 by forcing the dataType to 'html' in the .load() function. 2007-12-14 17:06:41 +00:00
David Serduke
e1af5faf80 Fixed #1750 by adding a url that starts with "//" and is a dataType "script" will now use a cross domain load the same as urls that start with "http". 2007-12-12 20:54:44 +00:00
David Serduke
c6a44c7943 Fix #1987 by only doing remote <script> type ajax with GET requests. All other types will be passed on to XMLHttpRequest. 2007-12-11 20:16:19 +00:00
David Serduke
12ef255ffd Added ajax error messages in the unit test suite because Safari was sometimes tossing errors that were being ignored and that caused a freeze in the test suite. 2007-12-06 23:23:10 +00:00
David Serduke
be4a8c32ac Safari sometimes stops in the test suite on the ajax section when I run the whole suite and its running on my local machine. I went ahead and put better error detection in for the test that is the culprit so it will keep going. It seems to do fine if I run it from a server. It gives xml.status as 0. Maybe this is the reason http://www.pearweb.com/javascript/XMLHttpRequest.html 2007-12-05 23:03:58 +00:00
David Serduke
aee221d33c Fixed #1999 by replacing the 'no-cache' parameter if it is there instead of just appending. 2007-12-04 04:43:45 +00:00
David Serduke
701b072e1a There was a disabled test in the ajax test suite which said there were too many simultainous requests. I re-enabled it when I found a bug that might have been the cause of the failure instead and it seems to work fine. We can disable it again if that ends up not being the case. 2007-12-04 01:51:07 +00:00
David Serduke
4b8f6cdc86 Fixed #1557, although it doesn't appear to be just an FF3 problem. In this case, $.getJSON() wasn't working from a remote host. I went ahead and added a unit test then added the s.dataType == "json" test for a remote <script> load. The said that json was allowed but the dataType check was missing. This appears to have fixed the bug across all browsers. 2007-11-29 19:07:20 +00:00
John Resig
b453257653 Disabled the Ajax tests from running locally. 2007-09-23 15:58:49 +00:00
John Resig
62d84e44ac Added a fix for bug #1580, where the query string was appended to the POST data, instead of being left alone. 2007-09-15 01:18:30 +00:00
John Resig
6d71a10ed2 Fix for bug #1600 - multiple selects were being serialized incorrectly. 2007-09-15 00:23:21 +00:00
John Resig
6728e3cf74 Finished up some of the reorganization. 2007-09-08 12:46:01 +00:00