Commit Graph

207 Commits

Author SHA1 Message Date
Richard Gibson
a96aa9e270 Fix #13233: re-allow .replaceWith of text nodes. Close gh-1137.
(cherry picked from commit 6b1b0a26b4)
2013-01-16 13:57:00 -05:00
Richard Gibson
306b698813 No ticket: improve replaceWith testing
(cherry picked from commit 13468abaeb)
2013-01-16 12:31:23 -05:00
Oleg
8e6c1ba92f Ref gh-1117: Don't stop on a falsy value in buildFragment. Close gh-1124. 2013-01-09 09:52:01 -05:00
jaubourg
18c376a5bd Adjusts unit test regarding exception in injected scripts so that it accounts for the exception being thrown in an event loop for remote scripts 2013-01-08 14:04:00 +01:00
Oleg
c9bf5c5e90 Bring back jQuery.buildFragment and remove jQuery.clean 2013-01-08 02:41:15 +00:00
Dave Methvin
cef3450228 Remove noCloneEvent detects and white-box unit test. 2013-01-03 20:55:59 -05:00
Oleg
72e9e91612 Add tests for th element 2012-12-28 20:27:59 +04:00
Oleg
4862eb43e3 Add more tests for wrapMap 2012-12-28 20:16:28 +04:00
Oleg
acb206a488 Add test for td append 2012-12-28 20:06:04 +04:00
Oleg
9dbfbe5b9a wrapMap.thead = wrapMap.tr
Add support comments
2012-12-28 19:50:22 +04:00
Oleg
b3e546c4eb Rewrite tests for colgroup, caption
Add tests for thead, tbody, tfoot
2012-12-28 19:43:01 +04:00
Oleg
d3d8ed443c Add comments for optgroup and option elements in wrapMap
Add tests for optgroup element
2012-12-28 18:56:29 +04:00
Oleg
f193acf3a1 Remove fix for #4484, add more tests 2012-12-28 18:54:47 +04:00
Oleg
f7528916a2 Use tabs instead of spaces 2012-12-24 04:47:13 +04:00
Oleg
2dd2e4886b Use tabs instead of spaces
"$" => "jQuery"
2012-12-24 03:04:19 +04:00
Oleg
a3ddcc5fce Add additional test 2012-12-24 03:04:19 +04:00
Oleg
32cfbd6d67 Add additional test 2012-12-24 03:04:18 +04:00
Oleg
5afc93c436 Fix #13094. Pass index to .before(fn) fn as documented. Close gh-1093. 2012-12-20 20:55:30 -05:00
Richard Gibson
30e2ffbeb8 Resolve a763ae72 test failures 2012-12-15 23:42:24 -05:00
Oleg
643ecf9d63 Ref #8908, gh-886. Avoid clone identity crisis in IE9/10. Close gh-1036. 2012-12-13 10:42:43 -05:00
Dave Methvin
0018f7700b Fix #11230. .appendTo and pals should always stack. 2012-12-13 09:19:41 -05:00
Paul Ramos
f12611feb4 Fix #4087. insertAfter, insertBefore, etc do not work if origin and destination are same element. Close gh-1068. 2012-12-11 23:35:22 -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
Dave Methvin
f8f52cfcf4 Fix #13019. Disconnected nodes with .replaceWith are a noop. Close gh-1062. 2012-12-09 14:10:38 -05:00
jaubourg
b7ece8c620 Revert "Organizes the php scripts used for testing better, so that the whole logic of a unit, server-side and client-side, is contained within the unit itself. Nearly all ajax unit tests take advantage of the new 'framework'. Lots of files got deleted because they became redundant or weren't used anymore."
This reverts commit 228ab3ddae.
2012-12-05 14:54:14 +01:00
Dave Methvin
4437002771 Radical idea: Calculate expect() value before fn call. 💜 2012-12-04 22:14:08 -05:00
Rod Vagg
551c2c9f4a Fixes #12449. make replaceWith() clone elements where required. Closes gh-920 2012-12-04 21:50:22 -05:00
Paul Ramos
13449a99b2 Fix #11989. Remove fragment cache, moving to jquery-compat. Close gh-1052. 2012-12-04 21:30:37 -05:00
Paul Ramos
ec72d9f4db Fix #12756. Restyle manipulation unit tests. Close gh-1053.
https://github.com/jquery/2012-dev-summit/issues/56
2012-12-04 20:42:52 -05:00
jaubourg
228ab3ddae Organizes the php scripts used for testing better, so that the whole logic of a unit, server-side and client-side, is contained within the unit itself. Nearly all ajax unit tests take advantage of the new 'framework'. Lots of files got deleted because they became redundant or weren't used anymore. 2012-12-04 07:40:12 +01:00
Richard Gibson
5b9bf13439 No ticket: improve global variable/ajax request tracking 2012-12-02 23:32:16 -05:00
Richard Gibson
b382af685a keep manipulation.js assertions consistent 2012-11-30 16:11:51 -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
dcooper
78c1560065 Fix #9960, allow manipulation for parent document nodes. Close gh-924. 2012-11-24 16:53:27 -05:00
Dave Methvin
1fb2f92c35 Fix #3827. Get the correct checkbox status for a click handler. 2012-11-24 14:08:51 -05:00
Richard Gibson
bb570fc373 Fix #12920: remove addMandatoryAttributes. Close gh-1037. 2012-11-20 22:57:41 -05:00
Richard Gibson
e889134058 Fix #11795, #10470: keep scripts in DOM; execute only on first insertion. Close gh-864. 2012-11-19 09:50:19 -05:00
Elijah Manor
5904468b9c Fix #8908. Don't let change to originals affect clones in IE9/10. Close gh-886. 2012-11-18 14:49:36 -05:00
Richard Gibson
e78cfb1a37 Fix #12858: don't expose jQuery/Sizzle expandos 2012-11-09 23:43:46 -05:00
Richard Gibson
517846aad2 No ticket: speedup test suite. Close gh-1020. 2012-11-08 10:10:43 -05:00
Timo Tijhof
e2cdf527d6 Followup to gh-997, decode entities in test names. Close gh-1013. 2012-11-01 16:39:45 -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
Oleg
18e7a53d15 Elements created from html strings have a parentnode. Fixes #12392 2012-10-25 20:41:47 -04:00
Sai Wong
0c1cea3761 Refactored before/after/replaceWith to not pushStack. Fixes #12664, closes gh-987 2012-10-16 16:50:40 -04:00
Daniel Galvez
ef7bce7e5c Fix #11280. IE6-8 need name attribute to parse param. Close gh-914. 2012-10-16 15:07:44 -04:00
Mike Sherov
ed9e34482a enforce double quotes via JSHint. Closes gh-975 2012-10-16 10:17:14 -04:00
James Huston
0c44743496 Enforce expects in manipulation.js (https://github.com/jquery/2012-dev-summit/issues/53) Closes gh-963 2012-10-15 12:19:20 -04:00
Dave Methvin
b6a7d022ee Fix #12347 and #12384. Use a fresh div in jQuery.clean each time.
Regression was introduced in 22ad8723ce most likely because the clown who fixed http://bugs.jquery.com/ticket/4011 didn't add a unit test.
2012-08-28 17:02:01 -04:00
Dave Methvin
a5be986206 Revert "Fix #12120. Always stack .before/.after, and fix disconnected nodes."
This reverts commit e2eac3f4d2.

There is a 1.7 regression with isDisconnected() that we should fix before tackling this.
2012-08-24 11:57:48 -04:00
Dave Methvin
e2eac3f4d2 Fix #12120. Always stack .before/.after, and fix disconnected nodes. 2012-08-23 23:25:57 -04:00