Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(607)

Issue 2830983004: Replace TestSurfaceReferenceFactory in surface_layer_unittests.cc with a mock implementation (Closed)

Created:
3 years, 8 months ago by Saman Sami
Modified:
3 years, 8 months ago
Reviewers:
danakj
CC:
chromium-reviews, cc-bugs_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Replace TestSurfaceReferenceFactory in surface_layer_unittests.cc with a mock implementation TestSurfaceReferneceFactory currently takes pointers to stack variables of a test and apparently writes to them when the stack is gone. This has caused flakiness on some bots. A mock interface allows us to avoid doing the nasty stuff with pointers and is generally nicer. BUG=703263 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2830983004 Cr-Commit-Position: refs/heads/master@{#466160} Committed: https://chromium.googlesource.com/chromium/src/+/76209400f9091745a4ecc635223c5e9a86c96939

Patch Set 1 #

Total comments: 1

Patch Set 2 : Remove VerifyAndClearExpectations #

Unified diffs Side-by-side diffs Delta from patch set Stats (+69 lines, -93 lines) Patch
M cc/layers/surface_layer_unittest.cc View 1 8 chunks +69 lines, -93 lines 0 comments Download

Messages

Total messages: 15 (11 generated)
Saman Sami
PTAL
3 years, 8 months ago (2017-04-20 21:24:18 UTC) #6
danakj
LGTM https://codereview.chromium.org/2830983004/diff/1/cc/layers/surface_layer_unittest.cc File cc/layers/surface_layer_unittest.cc (right): https://codereview.chromium.org/2830983004/diff/1/cc/layers/surface_layer_unittest.cc#newcode241 cc/layers/surface_layer_unittest.cc:241: testing::Mock::VerifyAndClearExpectations(ref_factory_.get()); Tests will verify mocks implicitly when the ...
3 years, 8 months ago (2017-04-20 21:40:36 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2830983004/20001
3 years, 8 months ago (2017-04-20 21:46:29 UTC) #12
commit-bot: I haz the power
3 years, 8 months ago (2017-04-20 22:12:19 UTC) #15
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/76209400f9091745a4ecc635223c...

Powered by Google App Engine
This is Rietveld 408576698