wiki.techinc.nl/tests/phpunit/includes/ResourceLoader
Gergő Tisza 31f614f732 resourceloader: Add ResourceLoaderModifyStartupSourceUrls hook
Add a hook to StartUpModule that can modify the source URLs
that get embedded into the startup module JS in the form of
mw.loader.addSource() parameters.

The intended use case is preserving relevant URL information,
especially in the case of the 'local' source which is a
relative URL, when the URL pattern of the load.php URL
that generates the startup module code is different from the
URL pattern of the page that loads that load.php URL.

(E.g. $wgLoadScript is set to a different domain than the
current page, to canonicalize load.php URLs for a site
that's reachable via multiple domains, but then by default
the local source is a relative URL which would be
interpreted relative to the URL of the page that executes
the startup module code, so it would result in calls to
non-canonical load.php URLs).

Bug: T365162
Bug: T371530
Change-Id: I199ab779abd0596b836ae43dcc5f2f2a489c9274
2024-07-31 17:02:35 +00:00
..
templates ResourceLoader namespace (attempt 2) 2022-05-24 15:41:46 +00:00
ClientHtmlTest.php tests: Add more use statements in namespaced classes 2024-02-18 21:31:02 +00:00
CodexModuleTest.php tests: Use namespaced classes (1) 2024-06-14 17:19:36 +00:00
ContextTest.php tests: Use namespaced classes (1) 2024-06-14 17:19:36 +00:00
DerivativeContextTest.php tests: Namespace ResourceLoaderTestCase and friends 2024-02-16 21:32:22 +00:00
FileModuleTest.php tests: Add more use statements in namespaced classes 2024-02-18 21:31:02 +00:00
ImageModuleTest.php tests: Namespace ResourceLoaderTestCase and friends 2024-02-16 21:32:22 +00:00
LessVarFileModuleTest.php tests: Namespace ResourceLoaderTestCase and friends 2024-02-16 21:32:22 +00:00
MessageBlobStoreTest.php Add namespace to the root classes of ObjectCache 2024-07-10 00:14:54 +03:30
ModuleTest.php ResourceLoader: Add missing @group ResourceLoader to various cases 2024-03-09 21:25:44 +00:00
OOUIImageModuleTest.php tests: Namespace ResourceLoaderTestCase and friends 2024-02-16 21:32:22 +00:00
ResourceLoaderEntryPointTest.php ResourceLoader: Add missing @group ResourceLoader to various cases 2024-03-09 21:25:44 +00:00
ResourceLoaderTest.php tests: Use namespaced classes (1) 2024-06-14 17:19:36 +00:00
SkinModuleTest.php Use MainConfigNames constants in tests where possible 2024-07-10 10:11:22 +00:00
StartUpModuleTest.php resourceloader: Add ResourceLoaderModifyStartupSourceUrls hook 2024-07-31 17:02:35 +00:00
UserOptionsModuleTest.php ResourceLoader: Add missing @group ResourceLoader to various cases 2024-03-09 21:25:44 +00:00
WikiModuleTest.php tests: Use namespaced classes (1) 2024-06-14 17:19:36 +00:00