blob: ce0820b388cbb904e8fe3c11ae9c844488598d3f [file] [log] [blame]
// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/extensions/updater/extension_updater_switches.h"
#include "base/command_line.h"
#include "chrome/common/channel_info.h"
#include "extensions/buildflags/buildflags.h"
#include "testing/gtest/include/gtest/gtest.h"
static_assert(BUILDFLAG(ENABLE_EXTENSIONS_CORE));
namespace extensions {
TEST(ExtensionUpdaterSwitchesTest, GetChannelForExtensionUpdates) {
EXPECT_EQ(chrome::GetChannelName(chrome::WithExtendedStable(true)),
GetChannelForExtensionUpdates());
base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
kSwitchExtensionForceChannel, "channel_for_unittest");
EXPECT_EQ("channel_for_unittest", GetChannelForExtensionUpdates());
}
} // namespace extensions