#ifndef UI_VIEWS_TEST_TEST_LAYOUT_PROVIDER_H_
#define UI_VIEWS_TEST_TEST_LAYOUT_PROVIDER_H_
#include <map>
#include <utility>
#include "ui/views/layout/layout_provider.h"
#include "ui/views/style/typography_provider.h"
namespace views::test {
class TestLayoutProvider : public LayoutProvider, public TypographyProvider {
public:
TestLayoutProvider();
TestLayoutProvider(const TestLayoutProvider&) = delete;
TestLayoutProvider& operator=(const TestLayoutProvider&) = delete;
~TestLayoutProvider() override;
void SetDistanceMetric(int metric, int value);
void SetSnappedDialogWidth(int width);
void SetFontDetails(int context,
int style,
const ui::ResourceBundle::FontDetails& details);
int GetDistanceMetric(int metric) const override;
const TypographyProvider& GetTypographyProvider() const override;
int GetSnappedDialogWidth(int min_width) const override;
ui::ResourceBundle::FontDetails GetFontDetailsImpl(int context,
int style) const override;
private:
std::map<int, int> distance_metrics_;
std::map<std::pair<int, int>, ui::ResourceBundle::FontDetails> details_;
int snapped_dialog_width_ = 0;
};
}
#endif