#include "components/omnibox/browser/location_bar_model_impl.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "build/build_config.h"
#include "components/dom_distiller/core/url_constants.h"
#include "components/dom_distiller/core/url_utils.h"
#include "components/omnibox/browser/location_bar_model_delegate.h"
#include "components/omnibox/browser/test_omnibox_client.h"
#include "components/omnibox/common/omnibox_features.h"
#include "components/omnibox/common/omnibox_focus_state.h"
#include "components/search_engines/template_url_service.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/ui_base_features.h"
#include "ui/gfx/color_palette.h"
#include "ui/gfx/favicon_size.h"
#include "ui/gfx/paint_vector_icon.h"
#include "url/gurl.h"
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS)
#include "components/omnibox/browser/vector_icons.h"
#include "components/vector_icons/vector_icons.h"
#endif
OmniboxEventProto;
_;
Invoke;
Return;
WithArg;
namespace {
class TestLocationBarModelDelegate : public LocationBarModelDelegate { … };
class MockLocationBarModelDelegate
: public testing::NiceMock<TestLocationBarModelDelegate> { … };
class LocationBarModelImplTest : public testing::Test { … };
TEST_F(LocationBarModelImplTest, FormatsReaderModeUrls) { … }
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
#define MAYBE_PreventElisionWorks …
#else
#define MAYBE_PreventElisionWorks …
#endif
TEST_F(LocationBarModelImplTest, MAYBE_PreventElisionWorks) { … }
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS)
TEST_F(LocationBarModelImplTest, GetVectorIcon) { … }
#endif
#if BUILDFLAG(IS_IOS)
TEST_F(LocationBarModelImplTest, BlobDisplayURLIOS) {
delegate()->SetURL(GURL("blob:http://example.test/foo"));
EXPECT_EQ(u"example.test/TestSuffix", model()->GetURLForDisplay());
}
#endif
TEST_F(LocationBarModelImplTest, GetPageClassification) { … }
}