Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Android test enviorment can run browser tests with mojom bound to frames. #27837

Closed
sangwoo108 opened this issue Jan 16, 2023 · 6 comments · Fixed by brave/brave-core#20825
Assignees
Labels
OS/Android Fixes related to Android browser functionality priority/P3 The next thing for us to work on. It'll ride the trains. QA/No release-notes/exclude

Comments

@sangwoo108
Copy link

sangwoo108 commented Jan 16, 2023

[ERROR:render_process_host_impl.cc(5236)] Terminating render process for bad Mojo message: Received bad user message: No binder found for interface cosmetic_filters.mojom.CosmeticFiltersResources for the frame/document scope
I  326.832s run_tests_on_device(192.168.0.13:5555)  [ERROR:bad_message.cc(29)] Terminating renderer for bad IPC message, reason 123

content::SetBrowserClientForTesting() didn't work for Android. We might have to override TestContentBrowserClient.

@sangwoo108 sangwoo108 added OS/Desktop OS/Android Fixes related to Android browser functionality priority/P3 The next thing for us to work on. It'll ride the trains. and removed OS/Desktop labels Jan 16, 2023
@sangwoo108 sangwoo108 self-assigned this Jan 16, 2023
cdesouza-chromium pushed a commit to brave/brave-core that referenced this issue Jan 25, 2023
These tests regressed in cr110. A follow up issue is created to fix them brave/brave-browser#27837
arthuredelstein added a commit to brave/brave-core that referenced this issue Feb 4, 2023
@arthuredelstein
Copy link

Here's an approach I took to fix this problem for one test: brave/brave-core@67293eb. The key was to use BraveContentBrowserClient because it registers a binder for CosmeticFiltersResources. Perhaps this approach can inspire a general solution?

@sangwoo108
Copy link
Author

Hum, I thought It hadn't worked at the time. Let me check out again.

@bridiver
Copy link
Contributor

bridiver commented Nov 2, 2023

@arthuredelstein @sangwoo108 yes, the problem is that cosmetic filters applies to every frame so no matter what you navigate to, it will try to register the browser interface and fail. Setting the test content browser client to BraveContentBrowserClient is the fix, but what we may want to do is create BravePlatformBrowserTest that is BraveAndroidBrowserTest on android and BraveInProcessBrowserTest on desktop and automatically sets the content browser client to BraveContentBrowserClient

@bridiver
Copy link
Contributor

bridiver commented Nov 3, 2023

looks like there are some other issues here as well which I'm investigating

@bridiver
Copy link
Contributor

bridiver commented Nov 7, 2023

just looking at some of the upstream browser tests that are now failing to make sure they all should be failing or move them to a follow-up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS/Android Fixes related to Android browser functionality priority/P3 The next thing for us to work on. It'll ride the trains. QA/No release-notes/exclude
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants