lacros: Provide default LacrosInitParams when running tests
browser_tests disable all crosapi calls and do not call LacrosChromeService::Init(). LacrosChromeServiceImpl::init_params_ is therefore "null". However, because LacrosInitParams is a small mojo struct, it is an InlinedStructPtr, and init_params_.get() returns a non-null pointer. This means existing code in lacros can call LacrosChromeServiceImpl::init_params() and get a non-null value. A later CL increases the size of LacrosInitParams, so it cannot be inlined. This causes browser_tests failures because init_params() starts returning null. We want some value for InitParams in tests. Therefore create a default-constructed version in tests. Bug: none Change-Id: I3ee0b15a276d0f04fc024ba3fbd7d2d1a892a72b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2463568 Commit-Queue: James Cook <jamescook@chromium.org> Commit-Queue: Erik Chen <erikchen@chromium.org> Auto-Submit: James Cook <jamescook@chromium.org> Reviewed-by:Erik Chen <erikchen@chromium.org> Cr-Commit-Position: refs/heads/master@{#815711}
Showing
Please register or sign in to comment