Skip to content

Commit

Permalink
[Refactor] Fix StartSurfaceMediatorUnitTest when the refactoring is e…
Browse files Browse the repository at this point in the history
…nabled.

In this CL, a helper function showHomepageAndVerify() is added to
allow showing Start surface without using the StartSurfaceState.

Bug: 1347089
Change-Id: Icd7eb42de013fd836105e2824cb8fd696f852700
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4114402
Reviewed-by: Calder Kitagawa <ckitagawa@chromium.org>
Commit-Queue: Xi Han <hanxi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1084590}
  • Loading branch information
Xi Han authored and Chromium LUCI CQ committed Dec 16, 2022
1 parent 1064b35 commit f8dadbb
Show file tree
Hide file tree
Showing 2 changed files with 155 additions and 117 deletions.
Expand Up @@ -1498,7 +1498,8 @@ private void mayRecordHomepageSessionBegin() {
/**
* Returns whether the Start surface homepage is showing.
*/
private boolean isHomepageShown() {
@VisibleForTesting
boolean isHomepageShown() {
return mIsStartSurfaceRefactorEnabled
? mIsHomepageShown
: mStartSurfaceState == StartSurfaceState.SHOWN_HOMEPAGE;
Expand Down

0 comments on commit f8dadbb

Please sign in to comment.