Fwd: Adding SetUpBrowserContextKeyedServices (current in InProcessBrowserTest) to AndroidBrowserTest?

0 views
Skip to first unread message

Kelvin Jiang

unread,
May 29, 2025, 3:34:26 PMMay 29
to content...@chromium.org


---------- Forwarded message ---------
From: Kelvin Jiang <kelvi...@google.com>
Date: Wed, May 28, 2025 at 8:15 PM
Subject: Adding SetUpBrowserContextKeyedServices (current in InProcessBrowserTest) to AndroidBrowserTest?
To: <content...@google.com>
Cc: Daniel Cheng <dch...@google.com>


Hi, I'm working on enabling some extensions PlatformBrowserTest for Android. PlatformBrowserTest is an alias that resolves to:
- AndroidBrowserTest for desktop Android
- InProcessBrowserTest for other desktop OS-es.

Some of the tests I need to enable rely on SetUpBrowserContextKeyedServices which is only available for InProcessBrowserTest and is called there during its init time.

I can either:
1. Add this to AndroidBrowserTest - as seen in crrev.com/c/6600198 , which works!
2. Add this to content::BrowserTestBase (probably should not at all unless more than two BrowserTest classes that inherit from BrowserTestBase need it?) 
3. Duplicate this logic in an #ifdef BUILDFLAG(IS_ANDROID) block for specific extension browser tests that need this and also need to run on Android?

I assume PlatformBrowserTest should stay as an alias instead of an interface that would contain methods that will be used by both Android and InProcess browser tests. Thus I am currently gravitating towards 1. and will consider 2. if browser tests other than InProcessBrowserTest and AndroidBrowserTest will need SetUpBrowserContextKeyedServices

Thanks,
Kelvin
Reply all
Reply to author
Forward
0 new messages