Closed
Bug 1310605
Opened 9 years ago
Closed 9 years ago
Split some test cases that can be rewritten to synchronous test in test_animation_observers.html
Categories
(Core :: DOM: Animation, defect, P3)
Tracking
()
RESOLVED
FIXED
mozilla52
People
(Reporter: hiro, Assigned: hiro)
References
()
Details
Attachments
(4 files)
+++ This bug was initially created as a clone of Bug #1283754 +++
Unfortunately MozReview can handle additional patches once some patches has been landed. This is a bug for what I commented in bug 1283754 comment 36.
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 5•9 years ago
|
||
These patches reduces elapsed time of test_animation_observers.html roughly 30%.
Assignee | ||
Comment 6•9 years ago
|
||
(In reply to Hiroyuki Ikezoe (:hiro) from comment #0)
> +++ This bug was initially created as a clone of Bug #1283754 +++
>
> Unfortunately MozReview can handle additional patches once some patches has
'can not handle'
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → hiikezoe
Status: NEW → ASSIGNED
Comment 7•9 years ago
|
||
mozreview-review |
Comment on attachment 8801648 [details]
Bug 1310605 - Part 1: Rname test_observers_for_script_animation.html to test_observers_for_sync_api.html.
https://reviewboard.mozilla.org/r/86318/#review85392
Attachment #8801648 -
Flags: review?(boris.chiou) → review+
Comment 8•9 years ago
|
||
mozreview-review |
Comment on attachment 8801649 [details]
Bug 1310605 - Part 2: Move test cases for CSS animation that can be rewriten to synchronus test. .
https://reviewboard.mozilla.org/r/86320/#review85432
The order of these tests is a little different from the original one, but I think it is still ok to me.
Thanks for rewriting these tests.
::: dom/animation/test/chrome/test_observers_for_sync_api.html:17
(Diff revision 1)
> +div {
> + width: 100px;
> + height: 100px;
> + background-color: yellow;
> +}
Is this necessary or for debugging?
Attachment #8801649 -
Flags: review?(boris.chiou) → review+
Comment 9•9 years ago
|
||
mozreview-review |
Comment on attachment 8801650 [details]
Bug 1310605 - Part 3: Move test case for pseudo element that can be rewritten to synchronous test.
https://reviewboard.mozilla.org/r/86322/#review85438
r=me with the following comments addressed.
::: dom/animation/test/chrome/test_observers_for_sync_api.html:63
(Diff revision 1)
> +function createStyle(test, rules, doc) {
> + if (!doc) {
> + doc = document;
> + }
> + var extraStyle = doc.createElement('style');
> + doc.head.appendChild(extraStyle);
> + if (rules) {
> + var sheet = extraStyle.sheet;
> + for (var selector in rules) {
> + sheet.insertRule(selector + '{' + rules[selector] + '}',
> + sheet.cssRules.length);
> + }
> + }
> + test.add_cleanup(function() {
> + extraStyle.remove();
> + });
> +}
I guess this function is from wpt testcommon.js. However, we have an equivalent function in dom/animation/tests/testcommon.js, addStyle() [1]. Could we reuse it?
[1] http://searchfox.org/mozilla-central/rev/d96317a351af8aa78ab9847e7feed964bbaac7d7/dom/animation/test/testcommon.js#87-113
::: dom/animation/test/chrome/test_observers_for_sync_api.html:83
(Diff revision 1)
> + createStyle(test, { '@keyframes anim': '',
> + ['.pseudo::' + type]: 'animation: anim 10s;' });
If we reuse addStyle, this might be:
addStyle(test, {...});
I think the format of |rules| is the same.
::: dom/animation/test/chrome/test_observers_for_sync_api.html:864
(Diff revision 1)
> + "records after duration set \"auto\"");
> +
> + anim.effect.timing.duration = "auto";
> + assert_equals_records(observer.takeRecords(),
> + [], "records after assigning same value \"auto\"");
> +}, "change_duration_and_currenttime");
I think it's better to rename this because we already have a test whose name is "change_duration_and_currenttime".
How about: "change_duration_and_currenttime_on_pseudo_elements"?
Attachment #8801650 -
Flags: review?(boris.chiou) → review+
Comment 10•9 years ago
|
||
mozreview-review |
Comment on attachment 8801651 [details]
Bug 1310605 - Part 4: Drop gRecordPromiseResolvers.
https://reviewboard.mozilla.org/r/86324/#review85446
Attachment #8801651 -
Flags: review?(boris.chiou) → review+
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Assignee | ||
Comment 15•9 years ago
|
||
mozreview-review-reply |
Comment on attachment 8801650 [details]
Bug 1310605 - Part 3: Move test case for pseudo element that can be rewritten to synchronous test.
https://reviewboard.mozilla.org/r/86322/#review85438
> I guess this function is from wpt testcommon.js. However, we have an equivalent function in dom/animation/tests/testcommon.js, addStyle() [1]. Could we reuse it?
>
> [1] http://searchfox.org/mozilla-central/rev/d96317a351af8aa78ab9847e7feed964bbaac7d7/dom/animation/test/testcommon.js#87-113
Thanks! Fixed it!
> I think it's better to rename this because we already have a test whose name is "change_duration_and_currenttime".
>
> How about: "change_duration_and_currenttime_on_pseudo_elements"?
Good catch! I did not notice it at all.
Assignee | ||
Comment 16•9 years ago
|
||
mozreview-review-reply |
Comment on attachment 8801649 [details]
Bug 1310605 - Part 2: Move test cases for CSS animation that can be rewriten to synchronus test. .
https://reviewboard.mozilla.org/r/86320/#review85432
> Is this necessary or for debugging?
Not at all! I just copied it. Thanks!
Comment 17•9 years ago
|
||
Pushed by hiikezoe@mozilla-japan.org:
https://hg.mozilla.org/integration/autoland/rev/504ca901dd74
Part 1: Rname test_observers_for_script_animation.html to test_observers_for_sync_api.html. r=boris
https://hg.mozilla.org/integration/autoland/rev/2b3a5735d669
Part 2: Move test cases for CSS animation that can be rewriten to synchronus test. r=boris.
https://hg.mozilla.org/integration/autoland/rev/2204c326ef7d
Part 3: Move test case for pseudo element that can be rewritten to synchronous test. r=boris
https://hg.mozilla.org/integration/autoland/rev/600b012bb435
Part 4: Drop gRecordPromiseResolvers. r=boris
Comment 18•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/504ca901dd74
https://hg.mozilla.org/mozilla-central/rev/2b3a5735d669
https://hg.mozilla.org/mozilla-central/rev/2204c326ef7d
https://hg.mozilla.org/mozilla-central/rev/600b012bb435
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox52:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Assignee | ||
Comment 19•9 years ago
|
||
Updated•9 years ago
|
status-firefox50:
--- → wontfix
status-firefox51:
--- → fixed
You need to log in
before you can comment on or make changes to this bug.
Description
•