Commit Graph

77 Commits

Author SHA1 Message Date
Richard Gibson
3fcddd6e72 Dimensions: Detect and account for content-box dimension mishandling
Fixes gh-3699
Closes gh-3700
2017-07-10 12:35:03 -04:00
Richard Gibson
80f1c8239e Dimensions: Include scroll gutter in "padding" box
Fixes gh-3589
Closes gh-3656
2017-06-19 15:42:55 -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
473d2ea7d5
Dimensions: fall back to offsetWidth/Height for inline elems
Close gh-3577
Fixes gh-3571
2017-03-20 12:16:12 -04:00
Timmy Willison
c920ff6e32
Dimensions: ignore transforms when retrieving width/height
Close gh-3561
Fixes gh-3193
2017-03-13 13:32:16 -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
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
Dave Methvin
08d73d7f9c Tests: Make iframe tests wait after checking isReady
Ref gh-3040
2016-04-11 13:29:11 -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
Vitaliy Terziev
f00dd0f0b2 Dimensions: Add tests for negative borders & paddings
Closes gh-2869
2016-02-24 14:27:19 +01:00
Oleg Gaidarenko
fc50791469 Tests: use jQuery variable instead of $
For some reason that works with `amd` but not with builded version

Fixes gh-2909
2016-02-13 21:22:15 +03:00
Oleg Gaidarenko
a2f63ffd96 Tests: test element position outside view
Ref 49833f7795
Ref gh-2828
Ref gh-2836
Fixes gh-2909
2016-02-11 22:59:09 +03:00
Dave Methvin
97d79ecf6b Dimensions: Empty sets should return undefined
Ref gh-2319
Closes gh-2701
2015-11-10 09:59:48 -05:00
Timmy Willison
75b3cdd509 Dimensions: properly manipulate non-px values
Fixes gh-1712
Close gh-2695
2015-11-09 17:38:00 -05:00
Dave Methvin
7d44d7f9e7 Dimensions: outerWidth/Height include scrollbar
Fixes gh-1729
Closes gh-2694
2015-11-07 15:13:31 -05:00
Richard Gibson
f931786018 Tests: Post-Summit cleanup
Ref 67d7a2eefe
Ref c752a5030b
2015-10-25 15:25:56 -04:00
Dave Methvin
67d7a2eefe 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
2015-10-18 12:30:00 -04: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
b60b26e184 CSS: Make .css("width") & .css("height") return fractional values
Fixes gh-1724
Closes gh-2439
2015-07-07 18:09:45 +02:00
Michał Gołębiowski
62ae2d0fb7 Offset: Round offset value for the sake of floating errors
IE10+ may return not exactly the offset.top value set in an offset callback
if parent has fractional top offset itself. Checking for being close to the
desired result fixes the test error.

Fixes gh-2147
2015-03-23 18:14:37 +01:00
Richard Gibson
906caebb3f Tests: Tilt at a few style guide windmills
Ref 3c13f4c629
2014-12-06 13:30:31 -05:00
Richard Gibson
3c13f4c629 Tests: Accommodate page changes from the QUnit HTML reporter
Ref 6748ba3496
2014-12-06 13:23:40 -05:00
Richard Gibson
26276a307c Tests: Minor updates for QUnit 1.16 compatibility
More to come later.

(cherry picked from commit f6f8848fbe)
2014-12-05 12:34:17 -05:00
Oleg Gaidarenko
f7e60dc83d Dimensions: allow modification of coordinates argument
Fixes gh-1848
Closes gh-1853
2014-11-16 18:05:29 +03: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
Michał Gołębiowski
79f59c2144 Support: Document box-sizing was unprefixed in Firefox 29 2014-02-05 15:57:11 +01:00
Michał Gołębiowski
bbbdd94725 Fix #10814. Make support tests lazy and broken out to components. 2013-09-06 03:38:22 +02: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
Michał Gołębiowski
dca7681284 Improve CSS and Support: comments. Close gh-1220.
1) corrected box-sizing rules order - the unprefixed value should always be the last one
2) removed last semi-colons in CSS rules
3) updated support comments

code review changes + more consistent comment spacing
2013-04-06 17:09:52 -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
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
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
Mike Sherov
670e3ff040 Fix #12243, $("col").width() should return the column's width. Close gh-916. 2012-08-29 12:34:12 -04:00
Mike Sherov
ad040181dc Fix #12283. Return null for dimension getters on non elements. Fix gh-900. 2012-08-19 22:58:05 -04:00
Richard Gibson
ba6372d968 No ticket: fix failure from zero-assertion test generating a second empty OL element. Closes gh-888 2012-08-09 10:42:09 -04:00
Mike Sherov
aa3fabce46 Fix #12088, Safari 5 and more percentages in getComputedStyle
In particular, min-width and max-width are taunting the awesome hack. Closes gh-865.
2012-07-22 22:03:27 -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
7ff3da186c Unit tests are linted and passing. 2012-06-21 15:30:24 -04:00
Mike Sherov
c80bc22728 Don't swap to measure dimensions unless the element is display:none. #807 Fixes #11293 2012-06-07 11:08:31 -04:00
Rick Waldron
79af1b457b Remove unnecessary haunted house guards.
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2012-06-06 23:10:06 -04:00
Rick Waldron
d487b06d93 Fixes two typos 2012-06-06 22:59:55 -04:00
Rick Waldron
5d25f78291 Conditionally run height/width in iframeTest 2012-06-06 18:13:59 -04:00
Rick Waldron
f5d2bc4db1 Ensure both height and width port functions exist before attempting to run dimensions tests.
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2012-06-06 17:38:52 -04:00
Mike Sherov
4dcd7dd324 Fixe dimensions tests. No core code changes. Supplements #11856 2012-06-06 17:06:03 -04:00
Mike Sherov
3225d61496 Make dimensions modular, adds optional build flag. Fixes #11856 2012-06-05 15:29:46 -04:00
Mike Sherov
ba70f8aeb6 Fix #11724, $(document).height() in Firefox 12. Closes gh-802.
This reopens #3838 for IE6 which is a regression on a fix in 1.7.2, but we'd rather break a really old IE than a really recent Firefox.
2012-05-31 09:24:44 -07:00