#include "extensions/common/warnings_test_util.h"
#include "base/memory/scoped_refptr.h"
#include "extensions/common/extension.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace extensions::warnings_test_util {
bool HasInstallWarning(scoped_refptr<Extension> extension,
const std::string& expected_message) {
return std::ranges::count_if(
extension->install_warnings(),
[expected_message](const InstallWarning& warning) {
return warning.message == expected_message;
}) == 1;
}
}