Commit Graph

2248 Commits

Author SHA1 Message Date
Michał Gołębiowski
dec9ab9d3f Tests: Add iOS 9 support tests results 2015-10-30 19:18:20 +01:00
Timmy Willison
689270e9d8 Attributes: remove flakey test for selected attribute
- The change is already covered by the "checked" test.
  Since this test is redundant, just drop it.

(cherry picked from commit 87bd130289)
2015-10-26 16:08:59 -04:00
Timmy Willison
5c086c3782 Attributes: do not set properties to false when removing booleans
Fixes gh-1759

(cherry picked from commit 47ccf3daad)

Conflicts:
	src/attributes/attr.js
2015-10-26 16:08:49 -04:00
Richard Gibson
a93d1d7d78 Tests: Post-Summit cleanup
Ref 67d7a2eefe
Ref c752a5030b

(cherry picked from commit f931786018)
2015-10-25 15:33:31 -04:00
Timmy Willison
ada073e9ac Core: make isNumeric limited to strings and numbers
Fixes gh-2662

(cherry picked from commit 15ac848868)
2015-10-25 15:15:59 -04:00
Joelle Fleurantin
cf4092eeea Attributes: fix tabIndex on <img> in IE11
Fixes gh-2647
Closes gh-2664

(cherry picked from commit c752a5030b)

Conflicts:
	src/attributes/prop.js
2015-10-25 15:15:55 -04:00
Julian Alexander Murillo
52491ae3f0 Tests: Change quotes according to style guidelines
Close gh-2339

(cherry picked from commit c577928d45)
2015-10-25 15:07:50 -04:00
Dave Methvin
657c2f8180 Event: Fix delegated radio events when arrow keys are used
Fixes gh-2343, gh-2410
Close gh-2617

(cherry picked from commit c82a6685bb)
2015-10-25 15:07:50 -04:00
Dave Methvin
c003cd6bc8 Attributes: Use simpler boolean check vs a function call
Ref gh-2491

(cherry picked from commit 4bf1a09522)
2015-10-25 15:00:51 -04:00
Dave Methvin
f24726daa3 Attributes: Remove undocumented .toggleClass( boolean ) signature
Fixes gh-2491
Close gh-2618

(cherry picked from commit 53f798cf4d)

Conflicts:
	src/attributes/classes.js
2015-10-25 15:00:48 -04:00
Dave Methvin
3842246024 CSS: Make show/hide/toggle methods a module
Unit test changes some uses of .show() and .hide() to .css( "display", ... ),
there was already an implicit assumption in several of the existing tests.

Fixes gh-2193
Close gh-2648

(cherry picked from commit 67d7a2eefe)

Conflicts:
	Gruntfile.js
	src/css.js
	src/css/showHide.js
	test/unit/css.js
2015-10-25 14:54:55 -04:00
Richard Gibson
06128a9d77 Tests: Keep test iframes around for assertions
Ref 44f8239d3f
Ref gh-2644
Ref gh-2390

(cherry picked from commit 0fb84fa8cc)
2015-10-25 14:12:53 -04:00
Liza Ramo
d846c25dca Core: make isNumeric test work on Symbol
Ref #2645
Closes #2657

(cherry picked from commit 0703fd52ef)
2015-10-25 14:12:53 -04:00
Richard Gibson
3680689165 Tests: Use standard external domain name
Ref 01c360f963
2015-10-23 11:55:52 -04:00
Michał Gołębiowski
99f41c23fd Tests: Add Safari 9 support tests results
Refs e99a3ac706
2015-10-18 17:31:50 -04:00
Joelle Fleurantin
d047073d2b Offset: allow small differences in offset.top
Fixes gh-2590
(cherry picked from commit 9f9e204bba)
2015-10-18 16:07:29 -04:00
Liza Ramo
d3a2fdce97 Core: add unit test for isPlainObject(Symbol)
Fixes #2645
Closes #2661
(cherry picked from commit 9090d98439)
2015-10-18 16:06:04 -04:00
Richard Gibson
214e1634ab CSS: Correct misrepresentation of "auto" horizontal margins as 0
Fixes gh-2237
Closes gh-2276
2015-10-18 15:35:18 -04:00
Aurelio De Rosa
6e466af010 Tests: Account for array-like objects in jQuery.grep
Cherry-picked from 67b76f5986
Closes gh-2605
2015-10-13 03:48:55 +03:00
Oleg Gaidarenko
8cac6da55d Tests: fix code style issues
Cherry-picked from 625bd303d9
Follow-up for c7cf28681e
2015-10-13 01:23:30 +03:00
Christian Grete
c7cf28681e Core: Support Symbol wrapper objects in jQuery.type
In ECMAScript 2015 (ES6), the native typeof operator returns "symbol"
for Symbol primitives. As it is possible to wrap symbols using the
Object constructor, symbols can be objects as well as any other
primitive type in JavaScript and should be determined by jQuery.type.

Cherry-picked from 8a734344f2
Closes gh-2627
2015-10-13 01:18:39 +03:00
Oleg Gaidarenko
905ab09afc Ajax: don't expect cross-origin tests run in envs which not support it
Cherry-picked from 39cdb8c9aa
Follow-up to b078a62013
2015-10-13 00:02:17 +03:00
Oleg Gaidarenko
3ced5abe5c Ajax: improve content-type detection
Cherry-picked from 239169bb2e
Fixes gh-2584
Closes gh-2643
2015-10-12 22:38:59 +03:00
Oleg Gaidarenko
e73a67f2e2 Event: fix incorrect test
Which was revealed by 03eaadb131 commit,
also do not try to fix typos in data/jquery version

Cherry-picked from d92310050c
2015-10-12 18:38:41 +03:00
Gary Ye
ef6cd83ab0 Tests:Docs: Fix various typos
* Changes "baar" to "bar" when used with "foo" in readme
  and comments of js files

* mousenter -> mouseenter

Thanks @garysye, @KimTaehee

Cherry-picked from 03eaadb131
Closes gh-2613
Closes gh-2601
2015-10-12 18:09:37 +03:00
Dave Methvin
7e78c2ec81 Event: Move .bind() and .delegate() to deprecated
Cherry-picked from ee0854f85b
Fixes gh-2288
Closes gh-2624
2015-10-12 17:34:20 +03:00
Oleg Gaidarenko
15f79201c4 Tests: Add .extend test for defined accessor properties
Ref 9748e436ad
Closes gh-2615
2015-10-12 17:28:48 +03:00
Oleg Gaidarenko
f60729f390 Ajax: Mitigate possible XSS vulnerability
Proposed by @jaubourg

Cherry-picked from b078a62013
Fixes gh-2432
Closes gh-2588
2015-10-12 17:05:49 +03:00
Richard Gibson
fb98ea49b6 Tests: Use QUnit URL parameter parsing
(cherry picked from commit f23a64d745)
2015-10-08 23:32:05 -04:00
Richard Gibson
5fb689debc Tests: Add dummy modules when running basic tests
Without this, other modules don't appear in the QUnit module picker.

Ref 855b0c8c28
Closes gh-2582

(cherry picked from commit f9af896bb8)
2015-10-08 23:32:05 -04:00
Michał Gołębiowski
4c3e63b47c Tests: Account for Edge in originalEvent UA-sniffs
All other cases where Edge user agent needed to be taken into account
in tests have already been resolved.

(cherry-picked from 64fd7ef3d0)

Fixes gh-2357
2015-09-14 21:14:23 +02:00
Michał Gołębiowski
4b1cff65ce Tests: Fix the expando-removal test failure in IE 8
IE 8 gets the expando removed via removeAttribute so the second assertion
won't be reached. The expected assertion count had to be updated.

Fixes gh-2596
2015-09-14 20:22:19 +02:00
Richard Gibson
4503a61ff1 Tests: Provide equal() arguments in correct order (actual, expected)
Ref 224271982e
Ref f5bf9bc488

(cherry picked from commit d3d8d9751f)

Conflicts:
	test/unit/data.js
2015-09-08 16:30:17 -04:00
Jason Bedard
5a7674d635 Data: test that delete is not used on DOM nodes
(test cherry-picked from 0e982433eb)

Closes gh-2479
2015-09-08 20:31:06 +02:00
Michał Gołębiowski
1b48eef4ca Tests: Really fix tests in IE 8 this time
IE 8 doesn't have indexOf on arrays. Also, one toLowerCase() was missing. Oops.
2015-09-08 18:59:01 +02:00
Michał Gołębiowski
f709a284e2 Tests: Make basic tests work in IE 8
IE 8 prints tag names in upper case which was breaking some tests.

This commit is not necessary on master but has been brought here to keep
tests similar in both branches.

(cherry-picked from 5914b10362)
2015-09-08 18:46:15 +02:00
Michał Gołębiowski
06454d118f Tests: Don't load non-basic tests when basic module is selected
When loading basic tests don't load any others to not overload Android 2.3.
The drawback is that most tests are not selectable in the module dropdown
when the basic module is seelcted.

(cherry-picked from 855b0c8c28)

Refs 2c7e9c9349
2015-09-08 18:45:58 +02:00
Michał Gołębiowski
c7d458fb9e Tests: Backport basic tests from master
Commit 2c7e9c9 added the basic test suite; these are the only tests that
are now run on Android 2.3 on master. On compat we're keeping full Android 2.3
support for now but the tests and the testswarm basic run mode have been
cherry-picked anyway to reduce the divergence between branches.

(cherry-picked from 2c7e9c9349)

Fixes gh-2505
Closes gh-2509
Refs gh-2483
2015-09-08 18:10:51 +02:00
Oleg Gaidarenko
d8b7e7b0bd Tests: more style corrections
Provocated by jscs-dev/node-jscs@2de68c0

Ref c161eecce0
2015-09-08 04:26:33 +03:00
Oleg Gaidarenko
2f0cedc997 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
Ref c8d15a2f9f
2015-09-08 04:15:54 +03:00
Thomas Tortorini
f71e32d4b4 Effects: Finish should call progress
(cherry-picked from 3dd3d1357d)

Fixes gh-2283
Closes gh-2292
2015-09-08 02:42:47 +02:00
Jason Bedard
0874096797 Tests: do not create data cache when fetching single property
(test cherry-picked from f5bf9bc488)
Refs gh-2554
2015-09-08 02:02:51 +02:00
Jason Bedard
bec2ba2312 Data: Don't expose jQuery.acceptData
jQuery.acceptData is an undocumented internal API that shouldn't be exposed.

(cherry-picked from 224271982e)

Fixes gh-2555
2015-09-08 01:32:46 +02:00
Michał Gołębiowski
eac265ccdd Tests: lower the PHP sleep time in unreleasedXHR.html
The AJAX test performed in unreleasedXHR.html was scheduling PHP processes
sleeping for 10 minutes. When a lot of commits are tested in short intervals
this was causing build failures due to the drained php-fpm pool.

The 10 seconds sleep time should be enough for this test.

(cherry-picked from 02e10082b2)

Refs 62acda819f
2015-09-08 00:46:25 +02:00
Daniel Nill
f0b86ec050 Serialize: Handle arrays with null values
(cherry-picked from 3d7ce0a65f)

Closes gh-2436
2015-09-07 23:00:47 +02:00
Thomas Tortorini
41a04e59df Effects: Remove additional parameters of easings
(cherry-picked from b7a7dea95f)

Fixes gh-2367
Closes gh-2376
2015-09-07 22:15:09 +02:00
Oleg Gaidarenko
85aed35cb5 Tests: Do not define two modules with the same name
Ref 7aa46e0df8
Fixes gh-2437
2015-09-07 20:14:59 +03:00
Oleg Gaidarenko
4543815eed 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

Ref b930d14ce6
Fixes gh-2540
2015-09-07 20:14:59 +03:00
Oleg Gaidarenko
20ddbe4f59 Build: Update jscs and lint files
Ref 10fdad742a
Fixes gh-2056
2015-09-07 20:14:50 +03:00
Michał Gołębiowski
04ec688e80 Core: Support non-browser environments
Fixes gh-2133
Fixes gh-2501
Closes gh-2504
Refs gh-1950
Refs gh-1949
Refs gh-2397
Refs gh-1537
Refs gh-2504
Refs 842958e7ae
2015-08-16 22:29:42 +02:00
Richard Gibson
3923bb8400 Event: Reduce differences from master 2015-08-10 10:30:03 -04:00
Oleg Gaidarenko
b8b111e337 Tests: don't use deprecated argument in test declaration
Ref aabe94edb4
2015-07-30 20:48:26 +03:00
Bruno Pérel
6af92cafca Docs: Fix various spelling mistakes
(cherry-picked from 360a478033)

Closes gh-2487
2015-07-30 15:51:44 +02:00
Jason Bedard
624d6a8580 Data: backport cleanData tests from gh-2480
The tests needed a slight change as on compat we're not removing the
value for expando but setting it to undefined.

Refs gh-2480
2015-07-28 14:38:36 +02:00
Michał Gołębiowski
b3eb2a13cd 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.

(cherry-picked from 6044fb6a73)

Refs gh-1573
Refs gh-1786
Refs jquery/jquery.com#108
Closes gh-2458
2015-07-28 13:24:32 +02:00
Michał Gołębiowski
5fce498e42 Core: Adjust comments & tests after dropping Safari 6 support
Support comments that mentioned only Safari < 7 were checked & updated
to account for bugs existing in newer versions as well; Safari 6 support
test results were removed.

(cherry-picked from 93bee4701d)

Refs gh-2482
2015-07-27 22:19:57 +02:00
Thomas Tortorini
15f48047bc Core: .each/.map should accept an undefined/null value
(cherry-picked from bf48c21d22)

Fixes gh-2267
Closes gh-2363
2015-07-27 20:02:54 +02:00
Oleg Gaidarenko
3d850edb13 Ajax: Remove jsonp callbacks through "jQuery#removeProp" method
Fixes gh-2323
Closes gh-2464
Ref a2ae215d99
2015-07-13 04:09:31 +03:00
Timmy Willison
fe6afa8268 Effects: fix failing tests in IE8 2015-07-08 13:31:09 -04:00
Michał Gołębiowski
7ee0feaca6 CSS: Add an integration test for issue gh-1764
(cherry-picked from 8887106702)

Refs gh-1764
Refs gh-2401
Closes gh-2425
2015-07-08 12:59:49 +02:00
Michał Gołębiowski
23212b34e6 CSS: Make .css("width") & .css("height") return fractional values
Fixes gh-1724
Closes gh-2454
Refs gh-2439
2015-07-07 18:14:04 +02:00
Timmy Willison
203979d153 Deferred: pass lint in new catch tests 2015-07-06 17:10:26 -04:00
Timmy Willison
ef77f83db8 Deferred: add .catch handler
Fixes gh-2102
2015-07-06 17:08:42 -04:00
Michał Gołębiowski
29561bca8f Effects: Fix tests
Refs 6b10f9d7e9
Refs gh-2340
2015-06-28 22:42:03 +02:00
Corey Frang
d07774ae06 Tests: Fix merge conflict
Introduced in 6b10f9d7e9 originally.

Had a rebase conflict that I fixed but forgot to ⌘-s. ☹
2015-06-26 20:30:56 -04:00
Corey Frang
1390d0736f Tests: Lower the checks rounding error
The CSS value rounding error was causig failures on FF and IE.
2015-06-26 20:21:32 -04:00
Corey Frang
0ff805772a Effects: Adding unit tests for jQuery.Animation
Closes gh-2340

(cherry picked from commit b3b2d6c3dd)

Conflicts:
	src/effects.js
2015-06-26 20:12:42 -04:00
Corey Frang
6b10f9d7e9 Effects: Add tests for jQuery.Tween
Conflicts:
	src/selector-native.js
	test/index.html
	test/unit/effects.js
2015-06-26 20:11:55 -04:00
Michał Gołębiowski
453738ab85 Core: Change support.ownLast to support.ownFirst
jQuery.support.ownLast was the only support test that was supposed
to be false when it succeeded. It was confusing.

Fixes gh-2406
Closes gh-2408
2015-06-23 00:33:51 +02:00
Timmy Willison
a0a5c0be2d Offset: add tests for hidden elements + scroll
- Also add comments to hidden/disconnected tests noting
  this is to ensure consistency between branches
2015-06-16 13:24:12 -04:00
Timmy Willison
63f19a95b9 Offset: return zeros for disconnected/hidden elements
Fixes gh-2310
Close gh-2396
2015-06-16 10:55:51 -04:00
Timmy Willison
ee69e9c8b8 Revert "Offset: allow offset setter to throw for disconnected elements"
This reverts commit 0d11c1182f.
2015-06-16 10:55:48 -04:00
Michał Gołębiowski
d8037c6d52 Tests: Remove test/data/ua.txt
The file was used by $.browser tests but $.browser now doesn't exists
in Core and this file hasn't been updated for a few years.

(cherry-picked from e831856490)

Fixes gh-2398
2015-06-16 16:26:12 +02:00
Michał Gołębiowski
1d052bdbe6 Tests: Remove Edge version from the user agent
The version will change in the future, matching by /edge\//i is enough

(cherry-picked from 5a1217e401)

Refs 8e111df641
2015-06-16 14:45:30 +02:00
Michał Gołębiowski
546593bdd2 Tests: Add Microsoft Edge results (from Windows 10 build 10130)
The Microsoft Edge user agent contains "Chrome" so it needs to be checked
before Chrome.

Refs 8e111df641
2015-06-14 02:09:34 +02:00
Michał Gołębiowski
ef332c7c7b Tests: Correct a typo in the regex matching Safari 8
(cherry-picked from c17543fd3c)
2015-06-14 02:05:05 +02:00
Michał Gołębiowski
2fa3bac7eb Core: Make jQuery objects iterable
Make iterating over jQuery objects possible using ES 2015 for-of:

    for ( node of $( "<div id=narwhal>" ) ) {
        console.log( node.id ); // "narwhal"
    }

(partially cherry-picked from bb026fc12c)

Fixes gh-1693
2015-06-13 23:31:27 +02:00
Michał Gołębiowski
a022da7056 Build: Update grunt-contrib-jshint
JSON needed to be added to JSHint globals as it's not implied by the es3
setting and yet all our supported browsers have it implemented.

(cherry-picked from 1556c4661a)
2015-06-13 23:24:01 +02:00
Michał Gołębiowski
42ea746825 CSS: Don't cache unrecognized CSS property names
This prevents jQuery from caching a prefixed property name if provided
directly by the user, e.g. the following code:

	elem.css( "msTransform", "translate(5px, 2px)" );

should not prevent one from from later setting the transition directly:

	elem.css( "transform", "translate(5px, 2px)" );

on a browser not understanding the unprefixed version which is the case
for Safari 8 & transform.

(cherry-picked from d471842b3e)

Fixes gh-2015
Closes gh-2298
2015-06-01 14:25:14 +02:00
Oleg Gaidarenko
37c3d08782 Event: improve originalEvent hack
Ref 6df669f0fb
Ref gh-2336
2015-05-29 20:33:08 +03:00
Oleg Gaidarenko
ef30bdf4f1 Event: remove deprecated event aliases
(Cherry-picked from 0705be4750)
Fixes gh-2286
Closes gh-2287
Ref trac-11733
2015-05-19 13:47:17 +03:00
Oleg Gaidarenko
57fb2dc02e Attributes: don't test SVG CSS-class manipulation in IE8
Ref 20aaed367f
2015-05-19 13:47:11 +03:00
Oleg Gaidarenko
401a351bd2 Event: provide verbose info for focus(in | out) & rename support props
Ref c074006a69
Ref gh-2312
2015-05-19 13:46:34 +03:00
Michał Gołębiowski
61f812b7e7 Ajax: Use the native XHR for all non-local requests in IE9+
IE throws an error on cross-domain PATCH requests if issued via the ActiveX
interface. This commit switches the logic to use the native XHR in all
non-local requests.

Fixes gh-1684
Closes gh-2183
2015-05-18 22:26:00 +02:00
Richard McDaniel
0654711e0d Offset: account for scroll when calculating position
Fixes gh-1708
Close gh-1714
2015-05-12 10:36:45 -04:00
Timmy Willison
b35bea14a9 Core: remove custom ready event
Fixes gh-2264
Close gh-2265
2015-05-12 10:29:07 -04:00
Timmy Willison
b5b0d72774 Attributes: add SVG class manipulation
- Note: support for SVG is limited in jQuery,
  but this is one area where the cost vs benefit ratio
  was acceptable.

Fixes gh-2199
Close gh-2268
2015-05-12 10:24:42 -04:00
Timmy Willison
cbd51c50b3 Tests: fix tests in accordance with new :visible behavior 2015-05-12 10:06:42 -04:00
Timmy Willison
dd816dbac1 CSS: fix :visible/:hidden selectors for inline element w/ content
- Reverts behavior from 10399dd, which we never released.
  BR and inline elements are considered visible.
- The possibility of dropping .offsetWidth and .offsetHeight
  was debunked by this perf:
  http://jsperf.com/visible-hidden-and-getclientrects

Fixes gh-2227
Close gh-2281
2015-05-12 10:06:42 -04:00
Richard Gibson
9df8bd205a CSS: Ignore the CSS cascade in show()/hide()/etc.
Fixes gh-1767
Fixes gh-2071
Closes gh-2180

(cherry picked from commit 86419b10bf)

Conflicts:
	src/css.js
	src/css/defaultDisplay.js
	src/effects.js
	test/data/testsuite.css
	test/unit/css.js
	test/unit/effects.js
2015-05-11 13:01:13 -04:00
Timmy Willison
b9b5c23fd7 Effects: add tests for jQuery.easing._default in Animation and Tween
Ref gh-2219
2015-05-05 11:26:14 -07:00
Timmy Willison
b7f9e62642 Effects: set default easing using jQuery.easing._default
Fixes gh-2219
Close gh-2218
2015-05-05 10:26:02 -07:00
Timmy Willison
dc49f62f22 Offset: allow offset setter to throw for disconnected elements
Fixes gh-2114
2015-05-05 09:00:41 -07:00
Timmy Willison
a2386a8250 Offset: remove ownerDocument check in offset getter
Fixes gh-2115
2015-05-05 09:00:37 -07:00
Arthur Stolyar
d4dd548aca Offset: Fix .offset() to correctly work with ShadowDOM
Fixes gh-1784
Close gh-2043
2015-05-05 09:00:27 -07:00
Timmy Willison
17ce9edf1e Selector: add test for jQuery.unique() alias 2015-05-05 07:59:26 -07:00
Timmy Willison
d9d930f79e Selector: add jQuery.uniqueSort; deprecate jQuery.unique
Fixes gh-2228
2015-05-04 15:28:44 -07:00
Timmy Willison
cf16f860b0 Data: camelCasing should not ignore case
Fixes gh-2070
2015-05-04 10:49:52 -04:00
Timmy Willison
0204c3089e Data: always camelCase keys in .data()
- This effectively implements our "Embrace HTML5" option
- Related: http://goo.gl/GcQAtn

Fixes gh-2257
2015-05-04 10:41:44 -04:00
Timmy Willison
a254f22d7b Data: do not include digits when camelCasing
Fixes gh-1751
2015-05-04 10:41:43 -04:00