[Extensions] Fix a crash with isolated world CSP The isolated world CSP for scripts injected from an extension may be a specific CSP (as is the case for MV3 extensions), an empty CSP (for MV2 extensions), or a null CSP, indicating the script should use the main world CSP (the case for extensions converted from users scripts). The latter caused a crash, since we were dereferencing an empty optional, and it turned out we didn't have any (!) browser tests for script injection by extensions converted from user scripts. This CL fixes the crash and adds a basic end-to-end test for user-script-converted extensions injecting into a web page. Fixed: 377725082 Change-Id: I8f434c4f16c766d0b1bbf20c429d85b3d661f875 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6001219 Commit-Queue: Devlin Cronin <rdevlin.cronin@chromium.org> Reviewed-by: Tim <tjudkins@chromium.org> Cr-Commit-Position: refs/heads/main@{#1380027}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
To check out the source code locally, don't use git clone! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure.
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.