Commit Graph

279 Commits

Author SHA1 Message Date
Michał Gołębiowski-Owczarek
9cb162f6b6
Tests: Exclude Android 4.x from repeated header names test
Android Browser only returns the last value for each header so there's no way
for jQuery get all parts.

Closes gh-4259
Ref gh-3403
Ref gh-4173
2018-12-14 22:06:44 +01:00
Andrei Fangli
e0d9411569 Ajax: Fix getResponseHeader(key) for IE11
- getResponseHeader(key) combines all header values for the provided key into a
single result where values are concatenated by ', '. This does not happen for
IE11 since multiple values for the same header are returned on separate lines.
This makes the function only return the last value of the header for IE11.
- Updated ajax headers test to better cover Object.prototype collisions

Close gh-4173
Fixes gh-3403
2018-11-26 12:00:41 -05:00
Richard Gibson
dfa92ccead
Tests: Allow Karma to load unminfied source
Closes gh-4128
2018-09-07 10:14:01 -04:00
Dave Methvin
dc48b11e0c squash! Set attributes all at once, src last 2018-05-14 14:09:43 -04:00
Dave Methvin
1f4375a342 Ajax: Allow custom attributes when script transport is used
Fixes gh-3028
Ref gh-2612

Useful, for example, to add `nonce`, `integrity`, or `crossorigin`.
2018-05-14 14:09:43 -04:00
Michał Gołębiowski-Owczarek
56742491bd
Tests: Disable native abort test in Android 4.0
The test works on its own when checked manually but mysteriously fails in
TestSwarm only in Android 4.0. Let's just disable it there.

Closes gh-3968
2018-02-12 19:08:36 +01:00
Jason Bedard
1ea092a54b
Core: deprecate jQuery.type
Fixes gh-3605
Close gh-3895
2018-01-16 10:39:08 -05:00
Dave Methvin
d7237896c7 Ajax: Don't process non-string data property on no-entity-body requests
Fixes gh-3438
Closes gh-3781
2018-01-15 21:48:54 -05:00
Timmy Willison
e2f192887c
Tests: only run ontimeout test if ontimeout exists
Fixes gh-3742
Close gh-3919
2018-01-08 11:46:43 -05:00
Timmy Willison
7be448d41f
Ajax: add unit test for getScript(Object)
Fixes gh-3736
Close gh-3918
2018-01-08 11:45:21 -05:00
Timo Tijhof
ecd8ddea33
Tests: Add support for running unit tests via grunt with karma
- Update QUnit to 1.23.1
- Remove unused dl#dl from test/index.html
- Remove unused map#imgmap from test/index.html
- Ensure all urls to data use baseURI
- Add the 'grunt karma:main' task
  - customContextFile & customDebugFile
- Add 'npm run jenkins' script

Close gh-3744
Fixes gh-1999
2017-12-18 12:27:38 -05:00
Erik Lax
262acc6f1e
Ajax: add an ontimeout handler to all requests
Fixes gh-3586
Close gh-3590
2017-07-24 11:44:09 -04:00
Michał Gołębiowski
731c501155 Docs:Tests: Update IE/Edge-related support comments & tests
Closes gh-3661
2017-05-15 20:37:14 +02:00
Timmy Willison
3bbcce68d7
Core: rnotwhite -> rhtmlnotwhite and jQuery.trim -> stripAndCollapse
- Renames and changes rnotwhite to focus on HTML whitespace chars
- Change internal use of jQuery.trim to more accurate strip and collapse
- Adds tests to ensure HTML space characters are retained where valid
- Doesn't add tests where the difference is inconsequential and
  existing tests are adequate.

Fixes gh-3003
Fixes gh-3072
Close gh-3316
2016-09-15 10:40:27 -04:00
Dave Methvin
cd4ad00478 Ajax: Don't mangle the URL when removing the anti-cache param
Fixes gh-3229
Closes gh-3253
2016-08-08 12:13:22 -04:00
Oleg Gaidarenko
58c6ca9822 Build: ESLint details
Use eslint pragmas, fix new errors, etc

Closes gh-3148
2016-06-11 10:41:33 +03:00
Dave Methvin
df2051cf59 Ajax: Ensure ajaxSettings.traditional is still honored
Fixes gh-3023
Closes gh-3081

Since .param() no longer looks at this setting we need unit tests
to ensure it is still honored by $.ajax().
2016-04-27 09:06:43 -04:00
Dave Methvin
e5ffcb0838 Tests: Refactor testIframe() to make it DRYer and more consistent
Ref gh-3040
Closes gh-3049
2016-04-11 13:32:51 -04:00
Oleg Gaidarenko
5d20a3c3f1 Ajax: execute jQuery#load callback with correct context
Thanks @blq (Fredrik Blomqvist)

Fixes gh-3035
Close gh-3039
2016-04-04 16:22:35 -04:00
Michał Gołębiowski
9b086888b8 Docs:Tests: Remove obsolete code from tests, update support comments
Support comments that were lacking the final IE/Edge version that exhibits
the bug were checked & updated. Links to the Chromium bug tracker were updated.
Code in tests related to unsupported browsers (like Android 2.3 in non-basic
tests) has been removed.

Fixes gh-2868
Closes gh-2949
2016-03-08 23:26:46 +01:00
Michał Gołębiowski
93a8fa6bfc Core: Deprecate jQuery.parseJSON
Fixes gh-2800
Closes gh-2948
2016-03-02 13:12:35 +01:00
Josh Soref
aae44111e2 Docs: Fix various spelling errors
Closes gh-2761
2016-01-13 13:11:11 -05:00
Dave Methvin
e077ffb083 Ajax: Preserve URL hash on requests
Fixes gh-1732
Closes gh-2721
2015-11-30 19:55:50 -05:00
Dave Methvin
769446c697 Ajax: Don't throw exceptions on binary data response
Fixes gh-2498
Closes gh-2682

The added unit test shows how this could be used to support an
ArrayBuffer return, but $.ajax does not support it natively.
The goal with this change was to avoid the exception.
2015-11-04 12:47:16 -05:00
Timmy Willison
76e9a95dbe Ajax: trigger error callback on native abort
- IE9 does not have onabort. Use onreadystatechange instead.

Fixes gh-2079
Close gh-2684
2015-11-03 12:34:04 -05:00
Dave Methvin
70605c8e56 Ajax: Only form-encode requests with a body
Fixes #2658
Closes #2671
2015-11-02 13:14:46 -05:00
Richard Gibson
5b554cf04e Tests: Use standard external domain name
Ref 01c360f963

(cherry picked from commit 3680689165)
2015-10-23 11:56:29 -04:00
Oleg Gaidarenko
39cdb8c9aa Ajax: don't expect cross-origin tests run in envs which not support it
Follow-up to b078a62013
2015-10-13 00:00:38 +03:00
Oleg Gaidarenko
239169bb2e Ajax: improve content-type detection
Fixes gh-2584
Closes gh-2643
2015-10-12 22:38:15 +03:00
Oleg Gaidarenko
b078a62013 Ajax: Mitigate possible XSS vulnerability
Proposed by @jaubourg

Fixes gh-2432
Closes gh-2588
2015-10-12 17:05:18 +03:00
Oleg Gaidarenko
c8d15a2f9f Tests: further improvements QUnit 2.0 migration
* Remove QUnit jshint globals
* Extend QUnit.assert methods
* Use assert.async instead of start/stop/done

Ref b930d14ce6
2015-09-08 04:06:20 +03:00
Oleg Gaidarenko
10fdad742a Build: Update jscs and lint files
Fixes gh-2056
2015-09-07 20:03:50 +03:00
Oleg Gaidarenko
b930d14ce6 Tests: partially use new qunit interface
http://qunitjs.com/upgrade-guide-2.x/

For most of the boring work was used
https://github.com/apsdehal/qunit-migrate package

However, it can't update local qunit helpers, plus in some places
old QUnit.asyncTest signature is still used

Fixes gh-2540
2015-08-16 09:02:01 +03:00
Oleg Gaidarenko
aabe94edb4 Tests: don't use deprecated argument in test declaration
Closes gh-2507
2015-07-30 20:46:31 +03:00
Michał Gołębiowski
6044fb6a73 Ajax: Account for Android 2.3 not firing window.onerror on script errors
Android 2.3 doesn't fire the window.onerror handler, just accept the reality
there and skip the test.

Refs gh-1573
Refs gh-1786
Refs jquery/jquery.com#108
Closes gh-2458
2015-07-28 13:20:20 +02:00
Oleg Gaidarenko
a2ae215d99 Ajax: Remove jsonp callbacks through "jQuery#removeProp" method
Fixes gh-2323
Closes gh-2464
2015-07-13 01:34:09 +03:00
Oleg Gaidarenko
9d1b989f20 Ajax: remove deprecated extensions from ajax promise
Fixes gh-2084
Closes gh-2092
2015-02-17 09:58:45 +03:00
Oleg Gaidarenko
4ef120d3f2 Ajax: make jQuery#load "type" field explicit
* Move "evalScript.php" file to appropriate place

* Make jQuery#load "type" field explicit and add test for it

Ref trac-11264
2015-02-15 02:01:59 +03:00
George Mauer
89ce0af2cf Ajax: $.post and $.get can now take an options object
Fixes gh-1986
Closes gh-1995
2015-01-11 20:32:38 -05:00
Victor Homyakov
83b038fc81 Ajax: Fix cross-domain detection test for non-default port
Closes gh-1954
2015-01-06 21:12:33 -05:00
Ben Toews
b091fdbafa Ajax: use anchor tag for parsing urls
Fixes gh-1875
Closes gh-1880
2014-12-11 15:26:04 -05:00
Michał Gołębiowski
740e190223 Misc: Drop support for older browsers; update support comments
That includes Opera 12.x, Firefox<29, Safari<6.0 and some hacks
for old Blackberry.

Closes gh-1820
Refs gh-1815
2014-11-03 18:37:26 +01:00
Dan Hart
598ed050f6 Ajax: Fix for request aborted in ajaxSend
Fixes gh-1775
Close gh-1619
2014-11-01 12:44:43 -04:00
Oleg Gaidarenko
fbdbb6fd43 Build: Move test to appropriate module 2014-06-16 03:08:46 +04:00
Oleg Gaidarenko
bbdfbb4ee8 Ajax: Always use script injection in globalEval
Fixes #14757
Closes gh-1449
2014-06-16 03:08:46 +04:00
TJ VanToll
d41e81980e Ajax: Support usage without jQuery.event
Fixes #15118
Closes gh-1588
2014-06-02 15:08:40 -04:00
Michał Gołębiowski
787562247b Ajax, Manipulation: don't test cross-document manip in Android 2.3 2014-05-05 15:45:57 +02:00
Oleg Gaidarenko
f3b89ba082 Tests: Fix failing ajax tests in oldIE
(cherry-picked from the 7178096507)

Picked up so tests from the 1.x-master would be more similar to this branch
2014-04-15 17:46:00 +04:00
Oleg Gaidarenko
cd546aba74 Tests: Improve jsonp tests
Since global variable for callback always would be equal to undefined value
it better to check for boolean instead
2014-04-15 17:45:59 +04:00
Michał Gołębiowski
b19d4d3450 Ajax, Effects: Disable Chrome 31 workarounds 2014-03-10 14:57:40 +01:00