[WebLayer] Fix WebLayer bundle tests which broke with WebLayer in split
These tests depended on the context that was returned from TestWebLayer.getRemoteContext() to have been processed by the implementation side. This was no longer the case when WebLayer was in a split, since the context that gets processed was the one returned by createContextForSplit(). To make these types of tests more robust, TestWebLayer.getRemoteContext() now returns the actual context used by the implementation side (from ContextUtils.getApplicationContext()), and a new TestWebLayer.getWebLayerContext() method is added to get the context for the WebLayer package. This required adding a test only method to IWebLayer.aidl which allows tests against the WebView bundle target to call it. Alternatively, we could build a separate WebView bundle with WebLayer test code, but I would rather have these tests testing the actual WebView bundle to make sure there aren't any issues. Bug: 1130660 Change-Id: I68838dc7f918d1ee86fe8c65e84a4f5fefbec655 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2427068 Commit-Queue: Clark DuVall <cduvall@chromium.org> Reviewed-by:Scott Violet <sky@chromium.org> Cr-Commit-Position: refs/heads/master@{#810211}
Showing
Please register or sign in to comment