summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/CompositionEngine/tests
diff options
context:
space:
mode:
authorLloyd Pique <lpique@google.com>2019-11-21 16:40:05 -0800
committerLloyd Pique <lpique@google.com>2019-11-21 17:24:02 -0800
commit739afaf693bfea29e2e2d1637344d1ccaf83d4f0 (patch)
tree532633397dcb3de8d640dc84fb41db21f75ea75b /services/surfaceflinger/CompositionEngine/tests
parent1ef9322148f140d8815a22bc79e836014dd2041e (diff)
downloadnative-739afaf693bfea29e2e2d1637344d1ccaf83d4f0.tar.gz
CE: Cleanup some comments in OutputTest
A non-generic comment was copied-pasted, and not all of them were fixed up with what they were used for. Just make them all generic. Bug: None Test: None Change-Id: I7d237d9be7d7ada9a7484e93caddfff97cd937b5
Diffstat (limited to 'services/surfaceflinger/CompositionEngine/tests')
-rw-r--r--services/surfaceflinger/CompositionEngine/tests/OutputTest.cpp34
1 files changed, 16 insertions, 18 deletions
diff --git a/services/surfaceflinger/CompositionEngine/tests/OutputTest.cpp b/services/surfaceflinger/CompositionEngine/tests/OutputTest.cpp
index 88d232ae54..110760cb10 100644
--- a/services/surfaceflinger/CompositionEngine/tests/OutputTest.cpp
+++ b/services/surfaceflinger/CompositionEngine/tests/OutputTest.cpp
@@ -753,8 +753,8 @@ TEST_F(OutputUpdateAndWriteCompositionStateTest, forcesClientCompositionForAllLa
struct OutputPrepareFrameTest : public testing::Test {
struct OutputPartialMock : public OutputPartialMockBase {
- // Sets up the helper functions called by prepareFrame to use a mock
- // implementations.
+ // Sets up the helper functions called by the function under test to use
+ // mock implementations.
MOCK_METHOD0(chooseCompositionStrategy, void());
};
@@ -1041,9 +1041,8 @@ TEST_F(OutputCollectVisibleLayersTest, processesCandidateLayersReversedAndSetsOu
struct OutputPresentTest : public testing::Test {
struct OutputPartialMock : public OutputPartialMockBase {
- // All child helper functions Output::present() are defined as mocks,
- // and those are tested separately, allowing the present() test to
- // just cover the high level flow.
+ // Sets up the helper functions called by the function under test to use
+ // mock implementations.
MOCK_METHOD1(updateColorProfile, void(const compositionengine::CompositionRefreshArgs&));
MOCK_METHOD1(updateAndWriteCompositionState,
void(const compositionengine::CompositionRefreshArgs&));
@@ -1082,9 +1081,8 @@ struct OutputUpdateColorProfileTest : public testing::Test {
using TestType = OutputUpdateColorProfileTest;
struct OutputPartialMock : public OutputPartialMockBase {
- // All child helper functions Output::present() are defined as mocks,
- // and those are tested separately, allowing the present() test to
- // just cover the high level flow.
+ // Sets up the helper functions called by the function under test to use
+ // mock implementations.
MOCK_METHOD1(setColorProfile, void(const ColorProfile&));
};
@@ -1813,8 +1811,8 @@ struct OutputBeginFrameTest : public ::testing::Test {
using TestType = OutputBeginFrameTest;
struct OutputPartialMock : public OutputPartialMockBase {
- // Sets up the helper functions called by begiNFrame to use a mock
- // implementations.
+ // Sets up the helper functions called by the function under test to use
+ // mock implementations.
MOCK_CONST_METHOD1(getDirtyRegion, Region(bool));
};
@@ -1966,8 +1964,8 @@ TEST_F(OutputBeginFrameTest, notHasDirtyNotHasLayersNotHadLayersLastFrame) {
struct OutputDevOptRepaintFlashTest : public testing::Test {
struct OutputPartialMock : public OutputPartialMockBase {
- // Sets up the helper functions called by composeSurfaces to use a mock
- // implementations.
+ // Sets up the helper functions called by the function under test to use
+ // mock implementations.
MOCK_CONST_METHOD1(getDirtyRegion, Region(bool));
MOCK_METHOD1(composeSurfaces, std::optional<base::unique_fd>(const Region&));
MOCK_METHOD0(postFramebuffer, void());
@@ -2048,8 +2046,8 @@ TEST_F(OutputDevOptRepaintFlashTest, alsoComposesSurfacesAndQueuesABufferIfDirty
struct OutputFinishFrameTest : public testing::Test {
struct OutputPartialMock : public OutputPartialMockBase {
- // Sets up the helper functions called by composeSurfaces to use a mock
- // implementations.
+ // Sets up the helper functions called by the function under test to use
+ // mock implementations.
MOCK_METHOD1(composeSurfaces, std::optional<base::unique_fd>(const Region&));
MOCK_METHOD0(postFramebuffer, void());
};
@@ -2098,8 +2096,8 @@ TEST_F(OutputFinishFrameTest, queuesBufferIfComposeSurfacesReturnsAFence) {
struct OutputPostFramebufferTest : public testing::Test {
struct OutputPartialMock : public OutputPartialMockBase {
- // Sets up the helper functions called by composeSurfaces to use a mock
- // implementations.
+ // Sets up the helper functions called by the function under test to use
+ // mock implementations.
MOCK_METHOD0(presentAndGetFrameFences, compositionengine::Output::FrameFences());
};
@@ -2278,8 +2276,8 @@ struct OutputComposeSurfacesTest : public testing::Test {
static const mat4 kDefaultColorTransformMat;
struct OutputPartialMock : public OutputPartialMockBase {
- // Sets up the helper functions called by composeSurfaces to use a mock
- // implementations.
+ // Sets up the helper functions called by the function under test to use
+ // mock implementations.
MOCK_CONST_METHOD0(getSkipColorTransform, bool());
MOCK_METHOD2(generateClientCompositionRequests,
std::vector<renderengine::LayerSettings>(bool, Region&));