Skip to content

Commit

Permalink
Remove old test for AssistantController
Browse files Browse the repository at this point in the history
DarkLightMode is always enabled.  Stop testing the disabled state.
Cleanup other unnecessary feature reference.

Change-Id: I5257c5f578004a552ad0e2db68e3c540436ead1e
Bug: b:258246941
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4369534
Auto-Submit: Sean Kau <skau@chromium.org>
Reviewed-by: Xiaohui Chen <xiaohuic@chromium.org>
Commit-Queue: Xiaohui Chen <xiaohuic@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1122009}
  • Loading branch information
Sean Kau authored and Chromium LUCI CQ committed Mar 24, 2023
1 parent 1987cec commit 38f8159
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions ash/assistant/assistant_controller_impl_unittest.cc
Expand Up @@ -21,7 +21,6 @@
#include "base/scoped_observation.h"
#include "base/test/scoped_feature_list.h"
#include "chromeos/ash/services/assistant/public/cpp/assistant_service.h"
#include "chromeos/constants/chromeos_features.h"
#include "testing/gmock/include/gmock/gmock.h"

namespace ash {
Expand Down Expand Up @@ -257,26 +256,7 @@ TEST_F(AssistantControllerImplTest, ClosesAssistantUiForFeedbackDeeplink) {
ui_model()->RemoveObserver(&ui_model_observer_mock);
}

// Dark mode is set to true if the DarkLightMode flag is off. This is determined
// in DarkLightModeControllerImpl::IsDarkModeEnabled().
TEST_F(AssistantControllerImplTestForStartUp,
ColorModeIsSetWhenAssistantIsReadyFlagOff) {
base::test::ScopedFeatureList scoped_feature_list;
scoped_feature_list.InitWithFeatures(
/*enabled_features=*/{}, /*disabled_features=*/{
chromeos::features::kDarkLightMode, features::kNotificationsRefresh});
SetUpActiveUser();

ASSERT_TRUE(assistant_service()->dark_mode_enabled().has_value());
EXPECT_TRUE(assistant_service()->dark_mode_enabled().value());
}

TEST_F(AssistantControllerImplTestForStartUp, ColorModeIsUpdated) {
base::test::ScopedFeatureList feature_list;
feature_list.InitAndEnableFeature(chromeos::features::kDarkLightMode);

ASSERT_TRUE(chromeos::features::IsDarkLightModeEnabled());

auto* active_user_pref_service =
Shell::Get()->session_controller()->GetPrimaryUserPrefService();
ASSERT_TRUE(active_user_pref_service);
Expand Down

0 comments on commit 38f8159

Please sign in to comment.