Need common extension loading test util for use across unit tests, browser tests |
||
Issue descriptionWe have a bunch of ways to load extensions in tests. Too many. It makes it hard to reason about and nearly impossible to remember which variation you want to use, and also hard to make changes to them. We should instead (to the extent possible) have a single canonical way of loading extensions that can be used across unit tests and browser tests. Additionally, we should have it able to be used as a separate object (composition over inheritance, yay!) to prevent future double-inheritance like [1]. Converting ExtensionBrowserTest and ExtensionServiceTestBase to use whatever the common implementation is would be a good start. [1] https://chromium.googlesource.com/chromium/src/+/50bf87a5fa8874cd37a334e402c6931f55641335/chrome/browser/prerender/prerender_browsertest.cc#2642
,
Dec 5 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/55f2b623d3cb915156f24f7efdd09e3b64bd43e4 commit 55f2b623d3cb915156f24f7efdd09e3b64bd43e4 Author: rdevlin.cronin <rdevlin.cronin@chromium.org> Date: Mon Dec 05 21:25:53 2016 [Extensions WebUI] Clean up ExtensionSettingsUIBrowserTest Clean up ExtensionSettingsUIBrowserTest. Most notably, use the utility class ChromeTestExtensionLoader() rather than re-implementing the load extension functionality. Also remove some unneeded members, includes, complexity, etc. BUG= 667587 Review-Url: https://codereview.chromium.org/2536903002 Cr-Commit-Position: refs/heads/master@{#436411} [modify] https://crrev.com/55f2b623d3cb915156f24f7efdd09e3b64bd43e4/chrome/browser/extensions/chrome_test_extension_loader.cc [modify] https://crrev.com/55f2b623d3cb915156f24f7efdd09e3b64bd43e4/chrome/browser/ui/webui/extensions/extension_settings_browsertest.cc [modify] https://crrev.com/55f2b623d3cb915156f24f7efdd09e3b64bd43e4/chrome/browser/ui/webui/extensions/extension_settings_browsertest.h
,
Oct 6
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6d811f38dc4a3cff661f750825679bc1ef7e6072 commit 6d811f38dc4a3cff661f750825679bc1ef7e6072 Author: Devlin Cronin <rdevlin.cronin@chromium.org> Date: Sat Oct 06 02:58:35 2018 [Extensions Cleanup] Use ChromeTestExtensionLoader in developerPrivate tests ChromeTestExtensionLoader is designed to load extensions from disk for testing purposes, and abstracts out a lot of the nasty process. Use it in developer_private_unittest.cc to simplify the code. As a drive-by, also get rid of some other unnecessary includes. Bug: 667587 Change-Id: If47abca4faca6231bb2fc95ce38fbed5edf677e2 Reviewed-on: https://chromium-review.googlesource.com/c/1265086 Commit-Queue: Devlin <rdevlin.cronin@chromium.org> Reviewed-by: Istiaque Ahmed <lazyboy@chromium.org> Cr-Commit-Position: refs/heads/master@{#597401} [modify] https://crrev.com/6d811f38dc4a3cff661f750825679bc1ef7e6072/chrome/browser/extensions/api/developer_private/developer_private_api_unittest.cc
,
Dec 21
The loading utility exists and is used in many places; closing this out. |
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Nov 28 2016