Commit Graph

182 Commits

Author SHA1 Message Date
Oleg
a2250b0f4c Tests: Fix code style issues 2014-01-16 07:04:14 +04:00
Oleg
659ac9c155 Tests: Add assertion for the jQuery#val method 2014-01-16 06:58:54 +04:00
Oleg
fdd78fad19 Attrs: Remove outdated valHook for option element
This hook was relevant for BlackBerry 4.7 which is no longer supported.

But this code path now raises error in IE10-11 (#14686) in 1.x-master branch.
So to just to be safe, also add test for IE issue to this branch too.
2014-01-16 04:47:44 +04:00
cjqed
537e9ced61 Tests: Avoid use of QUnit.reset() in tests by splitting them
Fix #14040
Close gh-1457
2013-12-23 17:21:22 -05:00
Michał Gołębiowski
4b39a82890 Fix #14340. Remove remnants of oldIE from unit tests. Close gh-1425. 2013-11-11 00:43:27 +01:00
Michał Gołębiowski
35b2b94979 Add tests for class manipulation on jQuery object containing more than one element. Close gh-1404. 2013-10-25 00:48:54 +02:00
Richard Gibson
0c18520923 No ticket: Hide the testing-support jQuery from tests 2013-09-03 10:43:32 -04:00
Timmy Willison
01d5a1a1c9 Fix for custom attr handles duck-punching the boolean attr handle
Conflicts:
	src/attributes/attr.js
2013-08-28 12:23:54 -04:00
Richard Gibson
d8a35011ec Fix #13835: classes separated by form feed 2013-05-13 21:55:00 -04:00
Timmy Willison
0fa52c11cb Update jshintrc to conform to new style guide. Conform to onevar and unused in tests. Fixes #13755. 2013-04-09 11:59:31 -04:00
Oleg Gaidarenko
f1ba486ee3 Adjust tabIndex propHook for modern browsers and return -1 where appropriate. Close gh-1228. 2013-04-08 21:33:17 -04:00
Michał Gołębiowski
52394ba986 Move size() test to deprecated.js and avoid in other tests. Close gh-1237. 2013-04-08 20:38:20 -04:00
Michał Gołębiowski
1205103a72 Update grunt-contrib-jshint to 0.3.0, close gh-1204.
(cherry picked from 4adde5d145)

Conflicts:
	src/data.js
	src/effects.js
2013-04-03 20:51:30 -04:00
ruado1987
c9ca9bf509 Fix #13514: Set selectedIndex to -1 when non-matching value is set on a select. Close gh-1191.
(cherry picked from commit 48d71d0c3e)
2013-03-22 12:47:01 -04:00
Michał Z. Gołębiowski
79992d7523 Edited comments and minor adjustments. Fixes #13553. Closes gh-1195. 2013-03-12 21:06:25 -04:00
dmitrygusev
eee2eaf1d7 Fix typos. Close gh-1186. 2013-02-28 15:45:10 -05:00
Richard Gibson
59f5adb622 No ticket: Revise unit tests in anticipation of Sizzle-free builds 2013-02-22 20:13:36 -05:00
Dave Methvin
6f7b6915bf Fix #12656. Make event shorthands excludable. 2013-01-27 09:07:00 -05:00
Timmy Willison
d96fa37666 2.0: Remove style->cssText attroproties fallback 2012-12-31 13:21:47 -05:00
Mike Sherov
abead1c86b Fixes #13088: under IE8, $(selector).attr('style') always return lowercase string 2012-12-31 12:30:02 -05:00
Richard Gibson
06f46dad93 let .attr(checked|selected, true) update the property 2012-12-16 10:39:19 -05:00
Richard Gibson
a763ae7277 Fix #11115: Normalize boolean attributes/properties. Close gh-1066. 2012-12-15 23:16:48 -05:00
Richard Gibson
2c40fdd4a8 Fix #12600: don't use value property in place of value attribute. Close gh-1063. 2012-12-14 10:37:20 -05:00
Oleg
13651f296d Fix #9646. Cloned nodes shouldn't affect original in IE7. Close gh-947. 2012-12-13 09:29:40 -05:00
Dave Methvin
40e08f81bd Missed a var declaration in aad235b325. 2012-12-11 23:35:51 -05:00
Dave Methvin
aad235b325 Fix #13011. Let 'type' attribute be set if the browser allows. 2012-12-11 23:16:08 -05:00
Timo Tijhof
55313d32a2 Test: Update index.html to new QUnit format. Close gh-1061.
Depends on jquery/sizzle#177, included with the Sizzle submodule in this commit.
2012-12-10 21:48:20 -05:00
Oleg
9ae6b1a019 Fix #12957. Simplify wrapMap, it doesn't need end tags. Close gh-1044. 2012-11-27 21:32:59 -05:00
Richard Gibson
243d4cc83c Don't let removeClass create attributes 2012-11-27 09:46:06 -05:00
aFarkas
ca5e06a15c Fix #12915, add propHook for scrip src property on oldIE. Close gh-1035. 2012-11-18 21:20:12 -05:00
Richard Gibson
48bd8b509b No ticket: speedup effects tests 2012-11-12 21:06:16 -05:00
Richard Gibson
81b094b2c1 No ticket: update test suite to pass QUnit globals check in most environments. Close gh-1016. 2012-11-05 17:24:03 -05:00
Richard Gibson
80d45a69ea Fix #12840: remove undocumented parameter "pass" from .attr. Close gh-1017. 2012-11-05 17:21:24 -05:00
Dave Methvin
240b141a22 Fix #10299. Add a propHook for oldIE link href. 2012-11-01 20:50:45 -04:00
Richard Gibson
3f51504580 No ticket: remove test suite external dependencies 2012-11-01 17:32:08 -04:00
Timo Tijhof
36c9ecb0f5 Implement expectation test instead of using _removeData. Close gh-997.
* Removed inline usage of QUnit.reset() because it is messing with the
  expectation model as reset does .empty() which does a recursive cleanData
  on everything in #qunit-fixture, so any expectJqData above .reset() would
  fail negatively.

  Instead of calling reset inline, either updated the following assertions to
  take previous assertions' state into account, or broke the test() up into
  2 tests at the point where it would call QUnit.reset.

* After introducing the new memory leak discovery a whole bunch of tests were
  failing as they didn't clean up everything. However I didn't (yet) add
  QUnit.expectJqData calls all over the place because in most if not all of
  these cases it is valid data storage. For example in test "data()", there
  will be an internal data key for "parsedAttrs". This particular test isn't
  intending to test for memory leaks, so therefor I made the new discovery
  system only push failures when the test contains at least 1 call to
  QUnit.expectJqData.

  When not, we'll assume that whatever data is being stored is acceptable
  because the relevant elements still exist in the DOM anyway (QUnit.reset
  will remove the elements and clean up the data automatically).

  I did add a "Always check jQuery.data" mode in the test suite that will
  trigger it everywhere. Maybe one day we'll include a call to everywhere,
  but for now I'm keeping the status quo: Only consider data left in storage
  to be a problem if the test says so ("opt-in").

* Had to move #fx-tests inside the fixture because ".remove()" test would
  otherwise remove stuff permanently and cause random other tests to fail
  as "#hide div" would yield an empty collection.
  (Why wasn't this in the fixture in the first place?)

  As a result moving fx-tests into the fixture a whole bunch of tests failed
  that relied on arbitrary stuff about the document-wide or fixture-wide
  state (e.g. number of divs etc.). So I had to adjust various tests to
  limit their sample data to not be so variable and unlimited...

* Moved out tests for expando cleanup into a separate test.

* Fixed implied global variable 'pass' in effects.js that was causing
  "TypeError: boolean is not a function" in *UNRELATED* dimensions.js that
  uses a global variable "pass = function () {};" ...

* Removed spurious calls to _removeData. The new test exposed various failures
  e.g. where div[0] isn't being assigned any data anyway.
  (queue.js and attributes.js toggleClass).

* Removed spurious clean up at the bottom of test() functions that are
  already covered by the teardown (calling QUnit.reset or removeClass to
  supposedly undo any changes).

* Documented the parentheses-less magic line in toggleClass. It appeared that
  it would always keep the current class name if there was any (since the
  assignment started with "this.className || ...".

  Adding parentheses + spacing is 8 bytes (though only 1 in gzip apparently).
  Only added the comment for now, though I prefer clarity with logical
  operators, I'd rather not face the yayMinPD[1] in this test-related commit.

* Updated QUnit urlConfig to the new format (raw string is deprecated).

* Clean up odd htmlentities in test titles, QUnit escapes this.
  (^\s+test\(.*)(&gt\;) → $1>
  (^\s+test\(.*)(&lt\;) → $1<

[1] jQuery MinJsGz Release Police Department (do the same, download less)
2012-10-28 22:44:57 -04:00
Matthias Jäggli
227c49a459 Fix #12411, .removeClass(undefined) is a chaining no-op. Close gh-913.
.removeClass() //removes all classes, as documented
.removeClass(window.nonExistentVariable) // removes nothing
2012-10-21 21:06:41 -04:00
Sai Wong
2b0e720406 Fix #12048. Set attributes for XML fragments. Close gh-965. 2012-10-20 15:27:43 -04:00
Jonathan Sampson
144b8bfead Fix attribute names in aliased form property test. Close gh-951.
Test expects input elements having name='id', name='name', and name='target'. Additionally, these should have id='id', id='name', and id='target' respectively. No element was provided with id='id' or name='id', but rather one element had two name attributes (illegal) with the values 'id' and 'name' respectively.
2012-10-20 14:58:19 -04:00
Rick Waldron
fd5facf1d1 Convert all jQuery.removeData(foo, bar, true) calls to jQuery._remove(foo, bar)
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2012-10-16 14:14:37 -04:00
Erick Ruiz de Chavez
69ce829dfe Enforce style guide in test/unit/attributes.js. Closes gh-985 2012-10-16 12:29:21 -04:00
Mike Sherov
ed9e34482a enforce double quotes via JSHint. Closes gh-975 2012-10-16 10:17:14 -04:00
Richard Gibson
425d17de83 Fix #12583: Don't ignore disabled property of select-one, close gh-932. 2012-10-03 21:14:08 -04:00
Dave Methvin
631fbc769c Since .getAttribute() returns strings, we should check for them. 2012-09-30 22:19:31 -04:00
Mike Sherov
f9ef91d6d6 Fix #10943, tabindex not set properly on clone in IE7. Close gh-937.
This is only a unit test fix because the bug was tangentially fixed by a different commit
2012-09-30 20:40:45 -04:00
Dave Methvin
f4e5c1729a Fix #11547. toLowerCase not work good on XML attributes.
This was fixed to some extent in gh-724 but there were insufficient test cases. Removing the lowercase completely allows IE 6/7 to work properly since there you need an exact case match for attributes, even in HTML docs. More discussion and test cases in the comments on gh-724.
2012-07-11 23:09:07 -04:00
Chad Killingsworth
de9bed319e Make unit tests friendly to Closure Compiler. Closes gh-845.
Conflicts:
    	test/unit/effects.js
    	test/unit/offset.js
2012-07-05 15:52:42 -04:00
Rick Waldron
3206be8772 Make removeClass smart enough to remove duplicates. Fixes #11923 2012-06-23 19:38:27 -04:00
Rick Waldron
7ff3da186c Unit tests are linted and passing. 2012-06-21 15:30:24 -04:00
jaubourg
ac48a19b92 Some work to modularize ajax later on. 2012-06-11 14:00:16 +02:00