Commit 9d1db5b8 authored by Rainhard Findling's avatar Rainhard Findling Committed by Commit Bot

Safety check: add tests for the Chrome cleaner child backend

* Test that each possible CCT status results in the corresponding
  safety check child status and display string.
* Test that CCT being enterprise managed is handled correctly.

Bug: 1087263
Change-Id: I84d93408800cb4fbe8d138578c586a0ae89dbfc9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2249980Reviewed-by: default avatarEsmael Elmoslimany <aee@chromium.org>
Reviewed-by: default avatarJoe Mason <joenotcharles@chromium.org>
Commit-Queue: Rainhard Findling <rainhard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#783942}
parent 15e68533
...@@ -281,6 +281,11 @@ void ChromeCleanerControllerImpl::SetStateForTesting(State state) { ...@@ -281,6 +281,11 @@ void ChromeCleanerControllerImpl::SetStateForTesting(State state) {
idle_reason_ = IdleReason::kInitial; idle_reason_ = IdleReason::kInitial;
} }
void ChromeCleanerControllerImpl::SetIdleForTesting(IdleReason idle_reason) {
state_ = State::kIdle;
idle_reason_ = idle_reason;
}
// static // static
void ChromeCleanerControllerImpl::ResetInstanceForTesting() { void ChromeCleanerControllerImpl::ResetInstanceForTesting() {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI); DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
......
...@@ -84,6 +84,7 @@ class ChromeCleanerControllerImpl : public ChromeCleanerController { ...@@ -84,6 +84,7 @@ class ChromeCleanerControllerImpl : public ChromeCleanerController {
// Force the current controller's state for tests that check the effect of // Force the current controller's state for tests that check the effect of
// starting and completing reporter runs. // starting and completing reporter runs.
void SetStateForTesting(State state); void SetStateForTesting(State state);
void SetIdleForTesting(IdleReason idle_reason);
private: private:
ChromeCleanerControllerImpl(); ChromeCleanerControllerImpl();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment