wiki.techinc.nl/tests/phpunit/includes/resourceloader
Brad Jorsch 3f1142045f Generalize ResourceLoader 'excludepage' functionality
There has long been a hack for previewing edits to user JS/CSS, where
OutputPage would pass an 'excludepage' parameter to
ResourceLoaderUserModule to tell it not to load one particular page and
would instead embed that page statically. That's nice, but there are
other places where we could use the same thing.

This patch generalizes it:
* DerivativeResourceLoaderContext may now contain a callback for mapping
  titles to replacement Content objects.
* ResourceLoaderWikiModule::getContent() uses the overrides, and
  requests embedding when they're used. All subclasses in Gerrit should
  pick it up automatically.
* OutputPage gains methods for callers to add to the override mapping,
  which it passes on to RL. It loses a bunch of the special casing it
  had for the 'user' and 'user.styles' modules.
* EditPage sets the overrides on OutputPage when doing the preview, as
  does ApiParse for prop=headhtml. TemplateSandbox does too in I83fa0856.
* OutputPage::userCanPreview() gets less specific to editing user CSS
  and JS, since RL now handles the embedding based on the actual
  modules' dependencies and EditPage only requests it on preview.

ApiParse also gets a new hook to support TemplateSandbox's API
integration (used in I83fa0856).

Bug: T112474
Change-Id: Ib9d2ce42931c1de8372e231314a1f672d7e2ac0e
2018-04-25 00:37:08 +00:00
..
templates
DerivativeResourceLoaderContextTest.php Generalize ResourceLoader 'excludepage' functionality 2018-04-25 00:37:08 +00:00
MessageBlobStoreTest.php resourceloader: Disable a flaky MessageBlobStoreTest case 2018-04-17 22:19:36 +01:00
ResourceLoaderClientHtmlTest.php resourceloader: Support loading group=user modules with addModules() 2018-04-06 02:30:30 +00:00
ResourceLoaderContextTest.php Generalize ResourceLoader 'excludepage' functionality 2018-04-25 00:37:08 +00:00
ResourceLoaderFileModuleTest.php
ResourceLoaderImageModuleTest.php Use ::class to resolve class names in tests 2018-01-26 22:49:13 +01:00
ResourceLoaderImageTest.php Use fallback languages in ResourceLoaderImage 2018-04-01 20:41:01 +01:00
ResourceLoaderModuleTest.php resourceloader: Add @covers for covered deprecated methods 2018-04-17 01:40:48 +01:00
ResourceLoaderOOUIImageModuleTest.php Use ::class to resolve class names in tests 2018-01-26 22:49:13 +01:00
ResourceLoaderSkinModuleTest.php build: Updating mediawiki/mediawiki-codesniffer to 16.0.0 2018-02-17 13:29:13 +01:00
ResourceLoaderStartUpModuleTest.php Use ::class to resolve class names in tests 2018-01-26 22:49:13 +01:00
ResourceLoaderTest.php resourceloader: Simplify load.mock.php by removing includes dependency 2018-03-06 15:59:13 -08:00
ResourceLoaderWikiModuleTest.php Generalize ResourceLoader 'excludepage' functionality 2018-04-25 00:37:08 +00:00