summaryrefslogtreecommitdiff
path: root/chromium/components/ntp_tiles/most_visited_sites_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/components/ntp_tiles/most_visited_sites_unittest.cc')
-rw-r--r--chromium/components/ntp_tiles/most_visited_sites_unittest.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/chromium/components/ntp_tiles/most_visited_sites_unittest.cc b/chromium/components/ntp_tiles/most_visited_sites_unittest.cc
index 5f18044c09d..918195db4b0 100644
--- a/chromium/components/ntp_tiles/most_visited_sites_unittest.cc
+++ b/chromium/components/ntp_tiles/most_visited_sites_unittest.cc
@@ -38,6 +38,7 @@
#include "components/ntp_tiles/switches.h"
#include "components/sync_preferences/testing_pref_service_syncable.h"
#include "components/webapps/common/constants.h"
+#include "extensions/buildflags/buildflags.h"
#include "services/data_decoder/public/cpp/test_support/in_process_data_decoder.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
#include "services/network/public/cpp/weak_wrapper_shared_url_loader_factory.h"
@@ -658,6 +659,9 @@ TEST_P(MostVisitedSitesTest, ShouldHaveHomepageFirstInListWhenFull) {
EXPECT_THAT(tiles[0], MatchesTile(u"", kHomepageUrl, TileSource::HOMEPAGE));
}
+// The following test exercises behavior with a preinstalled chrome app; this
+// is only relevant if extensions and apps are enabled.
+#if BUILDFLAG(ENABLE_EXTENSIONS)
TEST_P(MostVisitedSitesTest, ShouldNotContainDefaultPreinstalledApp) {
const char kTestUrl[] = "http://site1/";
const char16_t kTestTitle[] = u"Site 1";
@@ -684,6 +688,7 @@ TEST_P(MostVisitedSitesTest, ShouldNotContainDefaultPreinstalledApp) {
Contains(MatchesTile(kTestTitle, kTestUrl,
TileSource::TOP_SITES))));
}
+#endif // BUILDFLAG(ENABLE_EXTENSIONS)
TEST_P(MostVisitedSitesTest, ShouldHaveHomepageFirstInListWhenNotFull) {
FakeHomepageClient* homepage_client = RegisterNewHomepageClient();
@@ -1077,7 +1082,7 @@ TEST(MostVisitedSitesTest, ShouldDeduplicateDomainByReplacingMobilePrefixes) {
"www.cnn.com"));
}
-#if !defined(OS_ANDROID) && !defined(OS_IOS)
+#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS)
class MostVisitedSitesWithCustomLinksTest : public MostVisitedSitesTest {
public:
MostVisitedSitesWithCustomLinksTest() {