Commit dea0857
authored
Fix cobalt_browsertests not execute test code (#8623)
This CL fixes an issue where cobalt_browsertests were not executing
their test bodies on Starboard.
**Root Cause**:
On Starboard (similar to Android and iOS), ShellMainDelegate::RunProcess
initializes the BrowserMainRunner but returns 0 early, skipping the call
to BrowserMainRunner::Run().
* The test body (ui_task) is normally executed within
BrowserMainLoop::InterceptMainMessageLoopRun.
* On standard platforms, InterceptMainMessageLoopRun is called during
Run().
* Since Run() is skipped on Starboard, the test body was never executed.
**Fix**:
Updated BrowserMainLoop::CreateStartupTasks to include
BUILDFLAG(IS_STARBOARD).
* This explicitly schedules InterceptMainMessageLoopRun as a startup
task.
* This ensures the ui_task is executed synchronously during
BrowserMainRunner::Initialize(), matching the behavior required by
ShellMainDelegate for these platforms.
**Additional Changes**:
* Added assertions to ContentMainRunnerImplBrowserTest.StartupSequence
in content_main_runner_impl_browsertest.cc to verify that FeatureList,
ThreadPoolInstance, and ContentClient are correctly initialized after
startup.
Issue: 4333549831 parent 475649f commit dea0857
2 files changed
Lines changed: 7 additions & 1 deletion
File tree
- cobalt/testing/browser_tests
- content/browser
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
300 | 303 | | |
301 | 304 | | |
302 | 305 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
895 | 895 | | |
896 | 896 | | |
897 | 897 | | |
898 | | - | |
| 898 | + | |
| 899 | + | |
| 900 | + | |
| 901 | + | |
899 | 902 | | |
900 | 903 | | |
901 | 904 | | |
| |||
0 commit comments