Closed Bug 1160642 Opened 9 years ago Closed 9 years ago

add reftest-async-zoom to apply an async zoom before taking snapshot

Categories

(Testing :: Reftest, defect)

defect
Not set
normal

Tracking

(firefox41 fixed)

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: tnikkel, Assigned: tnikkel)

References

Details

Attachments

(1 file, 3 obsolete files)

reftest-async-zoom is like reftest-async-scroll-x/y except for zoom. It is a handy addition to a sadly under-tested part of gecko: async panning/zooming.
Attached patch patch (obsolete) — Splinter Review
Need at least an iid bump and some annotations to the reftest-sanity reftests that test the new feature to make them only run when we have an async pan zoom controller to do the requested zoom.
So, do we also need something for testing stationary APZ-style zoom, if reftest-zoom is full page Desktop-style zoom?
(In reply to Markus Stange [:mstange] from comment #2)
> So, do we also need something for testing stationary APZ-style zoom, if
> reftest-zoom is full page Desktop-style zoom?

Yes, we do. But that will have to be another bug.
ni me so I remember to finish this up.
Flags: needinfo?(tnikkel)
Attached patch Patch v2 (obsolete) — Splinter Review
I made the changes from comment 1 in my local version
Attachment #8600467 - Attachment is obsolete: true
I wrote these tests which use reftest-async-zoom.
Comment on attachment 8607682 [details] [diff] [review]
add scrollbar tests using the new feature

A patch on bug 1151617 does this better. marking obsolete.
Attachment #8607682 - Attachment is obsolete: true
Flags: needinfo?(tnikkel)
Attachment #8607605 - Flags: review?(bugmail.mozilla)
Comment on attachment 8607605 [details] [diff] [review]
Patch v2

dbaron, do you want to review/okay adding this reftest feature?
Attachment #8607605 - Flags: review?(dbaron)
Attachment #8607605 - Flags: review?(bugmail.mozilla) → review+
Attached patch Patch v3Splinter Review
Updated this patch to address botond's comment at https://bugzilla.mozilla.org/show_bug.cgi?id=1151617#c21 - it's just a minor change to AsyncPanZoomController.cpp, the rest of the patch is unchanged. My r+ stands.
Attachment #8607605 - Attachment is obsolete: true
Attachment #8607605 - Flags: review?(dbaron)
Attachment #8608697 - Flags: review?(dbaron)
Comment on attachment 8608697 [details] [diff] [review]
Patch v3

Not sure which parts I'm being asked to review, so I'll just review the reftest bits.

>+Testing Async Zooming: reftest-async-zoom="<float>"
>+=========================================================
>+
>+When the "reftest-async-zoom" attribute is present on the root element then at
>+the end of the test take the snapshot with the given async zoom on top of any
>+existing zoom. Content is not re-rendered at the new zoom level. This
>+corresponds to the mobile style "pinch zoom" style of zoom. This is unsupported
>+in many configurations.

Maybe mention the asyncZoom in the condition sandbox here?

>+    var zoom = attrOrDefault(contentRootElement, "reftest-async-zoom", 0);
>+    if (zoom != 0) {

Seems like it would make more sense for both of these 0s to be 1s.


r=dbaron
Attachment #8608697 - Flags: review?(dbaron) → review+
https://hg.mozilla.org/mozilla-central/rev/9b5127b7f759
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
One other thought about this patch -- does anything need to happen to reset this after the test finishes so that things behave normally for the next test?
Flags: needinfo?(bugmail.mozilla)
I don't think so, because the APZC that ends up with the reftest-asyc-zoom should get destroyed at the end of the test, and the next test will create a new set of APZCs without the extra zoom.
Flags: needinfo?(bugmail.mozilla)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: