Split APZ gtests into several files

RESOLVED FIXED in Firefox 46

Status

()

Core
Panning and Zooming
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: botond, Assigned: botond)

Tracking

Trunk
mozilla46
Points:
---

Firefox Tracking Flags

(firefox46 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
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.
(Assignee)

Comment 1

2 years ago
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)
(Assignee)

Comment 2

2 years ago
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.
(Assignee)

Comment 3

2 years ago
https://treeherder.mozilla.org/#/jobs?repo=try&revision=3f149737c4ec
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.

Comment 5

2 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/58b024b0bb88
(Assignee)

Comment 6

2 years ago
Rebased across bug 1228641 and bug 1226826 and landed.

Comment 7

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/58b024b0bb88
Status: NEW → RESOLVED
Last Resolved: 2 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.