Closed Bug 1240244 Opened 6 years ago Closed 6 years ago

Split APZ gtests into several files

Categories

(Core :: Panning and Zooming, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla46
Tracking Status
firefox46 --- fixed

People

(Reporter: botond, Assigned: botond)

Details

Attachments

(1 file)

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.
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.
https://hg.mozilla.org/mozilla-central/rev/58b024b0bb88
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
You need to log in before you can comment on or make changes to this bug.