Skip to content

Commit

Permalink
Merge pull request #26829 from brave/cr132-followup-add-aida-client-u…
Browse files Browse the repository at this point in the history
…nittest

Add unit test to ensure that AidaClient remains disabled
  • Loading branch information
emerick committed Dec 4, 2024
1 parent dbd8c59 commit 842224c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions chromium_src/chrome/browser/devtools/aida_client_unittest.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/* Copyright (c) 2024 The Brave Authors. All rights reserved.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at https://mozilla.org/MPL/2.0/. */

#include "src/chrome/browser/devtools/aida_client_unittest.cc"

TEST_F(AidaClientTest, NotAvailable) {
auto availability = AidaClient::CanUseAida(profile_.get());
EXPECT_FALSE(availability.available);
EXPECT_TRUE(availability.blocked);
EXPECT_TRUE(availability.blocked_by_age);
EXPECT_TRUE(availability.blocked_by_enterprise_policy);
EXPECT_TRUE(availability.blocked_by_geo);
EXPECT_FALSE(availability.blocked_by_rollout);
EXPECT_TRUE(availability.disallow_logging);
}

0 comments on commit 842224c

Please sign in to comment.