Commit Graph

77 Commits

Author SHA1 Message Date
Brian Birtles
eecc3b000d Bug 1382841 - Rename test_XXX_to_rename.html files in dom/animation/test to test_XXX.html; r=hiro
See the description in this changeset's parent which describes why we do this in
two steps.

MozReview-Commit-ID: GtO0SCb0UOF
2018-03-12 16:08:35 +09:00
Brian Birtles
22d46ac693 Bug 1382841 - Remove old test_XXX openers from dom/animation/test/**; r=hiro
We rename the file_XXX contents to test_XXX_to_rename so that these tests keep
running (so long as they begin with file_ and not test_ the test harness will
refuse to run them). If we rename these files to test_XXX in the same patch
Mercurial will not treat this as a rename and so we will lose the history
associated with file_XXX.

Instead, we rename test_XXX_to_rename to test_XXX in the next patch in this
series and by doing this Mercurial will treat this as two rename operations and
`hg log -f test_XXX` will show the history file_XXX as well.

One minor exception to this occurs due to the fact that we have two naming
conventions:

  (a) For tests in css-animations, css-transitions, style etc.

      Most of these tests should eventually land in web-platform-tests. However,
      in many cases that's not yet possible because, for example, CSS
      Animations 2 does not yet specify the behavior tested by the
      css-animations tests.

      For tests in web-platform-tests we generally separate words using -.
      However, our mochitest running machinery requires that tests begin with
      test_. Hence we name tests: test_abc-def-ghi.html.

  (b) For tests in mozilla

      These tests are never intended to be part of web-platform-tests and
      generally for mochitests we use _ to separate words (hence the test_
      prefix). Hence we name these tests test_abc_def_ghi.html

Now, there are some tests in the 'mozilla' directory that use the (a) naming
scheme instead of (b). In this case, instead of renaming file_xxx-xxx.html to
test_xxx-xxx_to_rename.html in this patch, and then renaming
test_xxx-xxx_to_rename.html to test_xxx-xxx.html in a second patch, we can just
delete test_xxx-xxx.html and rename file_xxx-xxx.html to test_xxx_xxx.html in
the one patch and Mercurial will recognize this as a rename because the file
names don't overlap.

MozReview-Commit-ID: Etcdmyfx0zf
2018-03-12 16:08:35 +09:00
Tom Ritter
b414702f22 Bug 1435296 Address test failures caused by bumping timer precision to 2 ms r=baku
There are a few different reasons why tests needed updating (not an exhaustive list):

- Tests assume that successive operations take place at different times.
- Tests assume that an operation took a minimum amount of time.
- Tests hardcodes a specific delay.

In most cases we hardcode the preference off. In some cases this is the best approach,
in others, we would like to improve. The bug for tracking those improvements is Bug 1429648

An improvement that is present in some tests is to hardcode a specific precision reduction
that is acceptable based on the confides of the test. (Obviously this needs to be a fix for
the test framework and not a requirement on the feature being tested.)

In a few places, the test itself can be fixed, for example to no longer require the end
time of an operation to be strictly greater than the start time, and allows it to be equal
to it.

MozReview-Commit-ID: J59c7xQtZZJ
2018-02-12 11:39:41 -06:00
Hiroyuki Ikezoe
c02a773da8 Bug 1430654 - Use assert_times_equal for comparing timing values. r=birtles
MozReview-Commit-ID: CUn1f8M0jo5
2018-01-22 14:57:57 +09:00
Brian Birtles
28b2c902bd Bug 1429671 - Make composite member of Keyframe dictionary objects accept null values; r=bz
This patch reflects the following change to the Web Animations spec:

  abf76745b5

MozReview-Commit-ID: A2GD1igUf5f
2018-01-11 16:20:49 +09:00
Tom Ritter
d40ca86fcd Bug 1424341 Turn the pref off for existing tests that perform fine-grained timing comparisons r=mrbkap
MozReview-Commit-ID: 4ZyE4ebaCaB
2018-01-10 14:46:34 -06:00
Brian Birtles
0c6901d581 Bug 1425548 - Update references to Web Animations spec in dom/animation; r=hiro
MozReview-Commit-ID: 1f2Mz0VhnBm
2017-12-15 14:55:08 -06:00
Hiroyuki Ikezoe
08f4eca20d Bug 1424948 - Check iteration progress value instead of animating computed style value. r=birtles
It is possible that animating computed style becomes the same value as the
value in the previous tick if Animation.mPendingReadyTime is pretty close
to the timeline current time.

MozReview-Commit-ID: COuur4Wlufx
2017-12-15 01:10:11 +09:00
Hiroyuki Ikezoe
dbdc267d8d Bug 1424948 - Use waitForNextFrame instead of waitForFrame. r=birtles
MozReview-Commit-ID: AZJ7LyeIKq2
2017-12-15 00:06:26 +09:00
Hiroyuki Ikezoe
db51bdca7c Bug 1423078 - Use waitForNextFrame() instead of waitForFrame() to make sure the next frame. r=birtles
This change is the same as bug 1422995.  With the conformant Promise handling
and performing micro task checkpoint in Animation tick, waitForFrame() inside
the callback for Animation.ready does not make sure that the next frame happens.

MozReview-Commit-ID: KEz4xmHpGlk
2017-12-06 09:19:40 +09:00
Hiroyuki Ikezoe
1de40ad3ff Bug 1423078 - Use waitForNextFrame() instead of waitForFrame() to make sure the second restyle happen after the initial paint. r=birtles
We clamp animation start time on the second restyling when the initial paint
for the animation took over vsync refresh rate (16.6ms normally as of today).
The clamping leads the animation progress to the same value as the initial one.
Once this clamping happens, the animation value does not change even after
waiting for Animation.ready and a reqeustAnimationFrame.  To make the animation
value change happen we should wait for one more requestAnimationFrame.

MozReview-Commit-ID: 8OTC0xkKBrr
2017-12-06 09:19:38 +09:00
Hiroyuki Ikezoe
611682c7e0 Bug 1423078 - Use assert_greater_than instead of assert_true. r=birtles
MozReview-Commit-ID: C4LZQni43wp
2017-12-06 09:19:35 +09:00
Brian Birtles
e2c42d6623 Bug 1412765 - Update tests in dom/animation/tests to use new pending member; r=hiro
MozReview-Commit-ID: 2PDm9NaXChg
2017-11-22 14:13:36 +09:00
Hiroyuki Ikezoe
11f412c5de Bug 1415346 - Bind onxx event handler before creating EventWatcher. r=birtles
MozReview-Commit-ID: 83KwkxBq7pK
2017-11-08 12:45:15 +09:00
Hiroyuki Ikezoe
8f470dcc96 Bug 1415346 - Use const instead of var in file_event-dispatch.html. r=birtles
MozReview-Commit-ID: Al9lYAMDVNZ
2017-11-08 12:15:00 +09:00
Hiroyuki Ikezoe
026743f7b1 Bug 1415346 - Use arrow function in file_event-dispatch.html. r=birtles
MozReview-Commit-ID: 7bYYDIOLqv6
2017-11-08 12:14:59 +09:00
Florian Queze
6cc0b6e992 Bug 1355056 - replace (function(args) { /* do stuff using this */ }).bind(this) with arrow functions, r=jaws. 2017-04-27 00:25:45 +02:00
Mantaroh Yoshinaga
0e41e4c469 Bug 1338069 - Don't use 'window' object when using getComputedStyle in tests. r=birtles
MozReview-Commit-ID: KWUNCIaF183
2017-04-06 12:43:47 +09:00
Mantaroh Yoshinaga
deb1e99281 Bug 1336899 - Should not fire the transitioncancel after ending CSS Transition. r=birtles
MozReview-Commit-ID: IrqNNjVg0xg
2017-02-06 16:21:01 +09:00
Mantaroh Yoshinaga
f8299735d6 Bug 1264125 part 9 - Rename variable name of CSS-Transition tests. r=birtles
MozReview-Commit-ID: 2ulhgG4aBQs
2016-12-20 16:40:30 +09:00
Mantaroh Yoshinaga
842ad814b7 Bug 1264125 part 8 - Add transitioncancel tests. r=birtles
MozReview-Commit-ID: 3iq57bQjEVd
2016-12-20 16:39:46 +09:00
Mantaroh Yoshinaga
adfbe96d38 Bug 1287983 part 7 - Add negative delay tests for CSS-Transitions event. r=birtles
MozReview-Commit-ID: KOVljOtRqFt
2016-10-21 11:37:53 +09:00
Mantaroh Yoshinaga
dc65287589 Bug 1287983 part 4 - Add transition event handler test for checking elapsed time. r=birtles
MozReview-Commit-ID: KwtsVbII95v
2016-10-19 15:16:52 +09:00
Mantaroh Yoshinaga
1af2b5876b Bug 1302007 part 3 - Add test of changing an ancestor's display property. r=hiro
MozReview-Commit-ID: BZHW77ECfrZ
2016-09-28 16:16:12 +09:00
Mantaroh Yoshinaga
1980453182 Bug 1302007 part 2 - Add the test of cancelling the transition when setting display='none'. r=birtles
MozReview-Commit-ID: B6avXxpEpDw
2016-09-13 16:59:52 +09:00
Mantaroh Yoshinaga
d7d32a6152 Bug 1302007 part 1 - Use the promise_test in transition cancel tests. r=birtles
MozReview-Commit-ID: 7cXfwkT7kaH
2016-09-12 12:11:15 +09:00
Boris Chiou
309c677c57 Bug 1049975 - Part 10: Test for writable effect. r=birtles
MozReview-Commit-ID: 2hMY2barRb9
2016-07-14 17:16:18 +08:00
Daisuke Akatsuka
d1e6204f9d Bug 1264865 - Part 1: steps(3, end) should serialize using the shorter steps(3) syntax. r=birtles
MozReview-Commit-ID: HBukw3qjyrr
2016-07-27 10:12:43 +09:00
Mantaroh Yoshinaga
9b517ca1d8 Bug 1134163 - Part3. Modify the currentTime and startTime tests. r=birtles
I modified several tests which related animationstart event delay.

animation-starttime and animation-currenttime tests:
 - Moved the getComputedStyle tests to test/style.
 - Removed the animation.playState tests. This tests contained by playState tests of web-platform-tests.
 - Lining common function. (e.g. calculating current/start time. etc)

MozReview-Commit-ID: 9kD9ZR1KxGv
2016-05-16 15:29:09 +09:00
Brian Birtles
e95a0a2548 Bug 1268858 part 4 - Add tests that getKeyframes() returns the correct result when CSS variables are used; r=heycam
MozReview-Commit-ID: BZrd3FAhrrf
2016-05-13 11:56:10 +09:00
Brian Birtles
43944667cb Bug 1271904 - Rename KeyframeEffectReadOnly.getFrames() and KeyframeEffect.setFrames() to getKeyframes()/setKeyframes(); r=hiro, r=smaug
MozReview-Commit-ID: GwLLY39l1KE
2016-05-13 09:40:52 +09:00
Brian Birtles
9dad11b881 Bug 1245748 - Update handling of 'composite' dictionary members to match changes to the spec; r=heycam, r=bz
Specifically, for the 'composite' member on keyframes, we now indicate "use the
composite value specified on the effect" using a missing/undefined 'composite'
member as opposed to a null value.

MozReview-Commit-ID: ZH45GvCTlP
2016-03-22 16:18:22 +09:00
Boris Chiou
ac0f3834ed Bug 1234403 - Part 5: Test for CSSPseudoElement.getAnimations. r=birtles 2016-02-24 19:12:00 +01:00
Boris Chiou
4e687b80a7 Bug 1234403 - Part 4: Test for the animation order returned by document.getAnimations(). r=birtles 2016-02-24 03:13:00 +01:00
Boris Chiou
fc55223fcb Bug 1234403 - Part 3: Test for the CSSPseudoElement objects returned by effect.target. r=birtles 2016-02-24 03:12:00 +01:00
Hiroyuki Ikezoe
c8add9d619 Bug 1212720 - Part 2: Tests for document.getAnimations. r=heycam 2016-01-06 14:22:00 -05:00
Boris Chiou
a510cc1544 Bug 1108055 - Part 4: Add ComputedTiming mochitests. r=birtles
Add test_animation-computed-timing.html in css-animations and
css-transitions.
2015-11-02 00:37:00 +01:00
Cameron McCormack
405e45c445 Bug 1216872 - Make 100% Keyframe returned by getFrames() have easing:linear. r=birtles 2015-10-22 19:22:38 +11:00
Cameron McCormack
231391b906 Bug 1198708 - Part 7: Tests. r=birtles 2015-09-29 12:20:14 +10:00
Brian Birtles
283479d5e6 Bug 1150810 part 16 - Add tests for AnimationTimeline.getAnimations(); r=jwatt 2015-06-15 11:05:43 +09:00
Brian Birtles
08b54f6f2c Bug 1171817 part 14 - Add AnimationPtrComparator class; r=dbaron
Having created composite ordering methods for the different kinds of animations
this patch adds a Comparator class so that they can be used to sort an
array of such animations.

This patch uses this Comparator object to sort the results returned by
Element.getAnimations. For this case, the order in which we create animations
and transitions happens to almost perfectly correspond with the composite
ordering defined so that no sorting is necessary.

One exception is that some -moz-* transitions may be created after transitions
that they should sort before when sorting by transition property. In this
case the sorting added in this patch should ensure they are returned in the
correct sequence.

Unfortunately, we can't easily test this since the test files we have are
intended to be cross-browser (where -moz-* properties won't be supported).

Once we implement AnimationTimeline.getAnimations (bug 1150810) we'll have
a better opportunity to test this sorting. For now, the added tests in this
patch just serve as a regression test that the sorting hasn't upset the
already correct order (and an interop test in future once we move them to
web-platform-tests).
2015-06-09 11:13:54 +09:00
Brian Birtles
ee3cc0b3f9 Bug 1179111 part 2 - Implement CSSTransition.transitionProperty; r=smaug, r=jwatt 2015-07-01 12:27:48 +09:00
Brian Birtles
1b15f2809c Bug 1178186 part 2 - Add tests for CSSAnimation and CSSTransition interfaces; r=jwatt 2015-06-30 10:00:56 +09:00
Carsten "Tomcat" Book
76b5b4f700 Backed out changeset 1027311cd1bb (bug 1178186) 2015-07-07 14:21:49 +02:00
Carsten "Tomcat" Book
4d535444ed Backed out changeset 4eb184faf92c (bug 1179111) 2015-07-07 14:21:42 +02:00
Brian Birtles
c21eae5012 Bug 1179111 part 2 - Implement CSSTransition.transitionProperty; r=smaug, r=jwatt 2015-07-01 12:27:48 +09:00
Brian Birtles
44079bfff9 Bug 1178186 part 2 - Add tests for CSSAnimation and CSSTransition interfaces; r=jwatt 2015-06-30 10:00:56 +09:00
Boris Zbarsky
83864e6984 Bug 1159743. Stop forcing the dom.animations-api.core.enabled preference on in the test harness. r=birtles 2015-04-30 14:25:03 -04:00
Wes Kocher
143b05ecba Backed out changeset 4d85a02e9c28 (bug 1159743) under suspicion of breaking animation tests CLOSED TREE 2015-04-30 15:25:58 -07:00
Boris Zbarsky
fa14fc0c65 Bug 1159743. Stop forcing the dom.animations-api.core.enabled preference on in the test harness. r=birtles 2015-04-30 14:25:03 -04:00