Split APZ gtests into several files

RESOLVED FIXED in Firefox 46

Status

()

RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: botond, Assigned: botond)

Tracking

Trunk
mozilla46
Points:
---

Firefox Tracking Flags

(firefox46 fixed)

Details

Attachments

(1 attachment)

The APZ gtests are currently housed in a single 3000+ line file, TestAsyncPanZoomController.cpp.

This file is getting a bit unwiedly to work with due to its length, so I'd like to split it up.
Created attachment 8708626 [details]
MozReview Request: Bug 1240244 - Split APZ gtests into several files. r=kats

Review commit: https://reviewboard.mozilla.org/r/31135/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/31135/
Attachment #8708626 - Flags: review?(bugmail.mozilla)
This patch splits the file up as follows:

  - General utilities used by all tests, such as the mocks of GeckoCC, APZC
    and APZCTM, were moved into APZTestCommon.h.

  - Functions used to send input, such as Tap(), Pan(), etc., were moved
    into InputUtils.h.

  - Test fixtures that serve as base classes for other test fixtures,
    namely APZCBasicTester and APZCTreeManagerTester, were moved into
    their own headers.

  - More specific test fixtures, and the tests themselves, were split
    up into 8 Test*.cpp files:
     TestBasic
     TestEventRegions
     TestGestureDetector
     TestHitTesting
     TestOverscrollHandoff
     TestPanning
     TestPinching
     TestTreeManager
    mostly one fixture per file, although in a couple of cases I've
    grouped related fixtures into one file.

The only code changes I made beyond moving code between files are:

  - Removed 'static' from functions that moved to header files.

  - Removed two unused classes, TaskRunMetrics and MockTask, which
    were left over from the TaskThrottler removal.
Attachment #8708626 - Flags: review?(bugmail.mozilla) → review+
Comment on attachment 8708626 [details]
MozReview Request: Bug 1240244 - Split APZ gtests into several files. r=kats

https://reviewboard.mozilla.org/r/31135/#review27943

Thanks! This is something that's been bugging me for a while, glad to see this patch :) I didn't go over it line-by-line; the way you split it up seems good and I'll take your word that you didn't modify any of the code.
Rebased across bug 1228641 and bug 1226826 and landed.

Comment 7

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/58b024b0bb88
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox46: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
You need to log in before you can comment on or make changes to this bug.