New issue
Advanced search Search tips

Issue 807645 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

browser_options.extensions_to_load should not contain mutable objects

Project Member Reported by perezju@chromium.org, Jan 31 2018

Issue description

Ideally we would like to get to the situation where we could "freeze" the browser_options after having parsed them from the command line.

However, browser_options.extensions_to_load is currently a list of mutable ExtensionToLoad objects. It seems that these objects _have to_ be mutable since their extension_id may depend on the path to the extension after it has been (possibly) copied to a remote device [2].

I suggest making browser_options.extensions_to_load a plain list of strings with the paths to the extensions to load. Then possible_browser.SetUpEnvironment can create and manage the lifetime of the necessary ExtensionToLoad objects.

+achuith since looking at the clients of extensions_to_load it seems that this is mainly used for CrOS to load 'auto_test' and an 'easy_unlock' app.

[1]: https://cs.chromium.org/chromium/src/third_party/catapult/telemetry/telemetry/internal/browser/extension_to_load.py?rcl=12ffa89339910751ca0516770d7b8877f4dd25a3&l=15
[2]: https://cs.chromium.org/chromium/src/third_party/catapult/telemetry/telemetry/internal/browser/extension_to_load.py?rcl=12ffa89339910751ca0516770d7b8877f4dd25a3&l=39
[3]: https://cs.chromium.org/search/?q=extensions_to_load+file:%5C.py$+-file:%5Esrc/third_party/android_tools+-file:%5Einfra/infra/services/android_docker&type=cs
 
Labels: -Pri-3 Pri-2
That seems fine. 

These aren't the only 2 extensions we load. A number of chromeos integration tests (autotests) load custom extensions for testing:
https://cs.corp.google.com/search/?q=package:%5Echromeos_public$+extension_paths&type=cs
Reminder to self to also run ExtensionTest on CrOS when testing patches for this.
Labels: -Pri-2 Pri-3
Status: Assigned (was: Started)
Blocking: -787834

Comment 6 by benhenry@google.com, Jan 16 (6 days ago)

Components: Test>Telemetry

Comment 7 by benhenry@google.com, Jan 16 (6 days ago)

Components: -Speed>Telemetry

Sign in to add a comment