New issue
Advanced search Search tips

Issue 911304 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 5
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Feature



Sign in to add a comment

PreviewsHints has unnecessary test-only code path

Project Member Reported by jegray@chromium.org, Dec 3

Issue description

There are two ways to create PreviewsHints:
  1. from a hints component with CreateFromHintsComponent()
  2. from a host filter with CreateForTesting()
However, the test-only option isn't actually needed for the tests. Given that the tests can be implemented using the component, the test-only path should be removed and the tests should be changed to use the same path as the rest of the code.

 

Comment 1 Deleted

Project Member

Comment 2 by bugdroid1@chromium.org, Dec 4

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/181c3537d7bbd15f5ea01f846bea1fba55dc0c15

commit 181c3537d7bbd15f5ea01f846bea1fba55dc0c15
Author: Jered Gray <jegray@google.com>
Date: Tue Dec 04 18:01:13 2018

Eliminate test-only code path in PreviewsHints

There were previously two ways to create PreviewsHints:
  1. from a hints component with CreateFromHintsComponent()
  2. from a host filter with CreateForTesting()
However, the host filter option was test-only and wasn't needed for the
tests. Given that the tests can be implemented using the component, I'm
removing the test-only path and forcing the tests to use the same code
path as the rest of the code.

Bug:  911304 

Change-Id: I17dea5bfec7f30facc8df7884f6df3870bcd602b
Reviewed-on: https://chromium-review.googlesource.com/c/1359322
Reviewed-by: Robert Ogden <robertogden@chromium.org>
Reviewed-by: Tarun Bansal <tbansal@chromium.org>
Commit-Queue: Jered Gray <jegray@chromium.org>
Cr-Commit-Position: refs/heads/master@{#613596}
[modify] https://crrev.com/181c3537d7bbd15f5ea01f846bea1fba55dc0c15/components/previews/content/previews_hints.cc
[modify] https://crrev.com/181c3537d7bbd15f5ea01f846bea1fba55dc0c15/components/previews/content/previews_hints.h
[modify] https://crrev.com/181c3537d7bbd15f5ea01f846bea1fba55dc0c15/components/previews/content/previews_hints_unittest.cc

Status: Assigned (was: Untriaged)
Status: Fixed (was: Assigned)

Sign in to add a comment