wiki.techinc.nl/tests/phpunit/includes
Timo Tijhof 3d342d4deb resourceloader: Add support for modules sending preload headers
ResourceLoaderModule objects gain a new method getPreloadLinks() which
returns an array with the meta data required to build a Link rel=preload
header according to the current draft for W3C Preload.
<https://w3c.github.io/preload/>

Another implementation of this is already in use in OutputPage for
preloading the logo image.

This array is formatted by the ResourceLoaderModule::getHeaders method,
which is implemented as "final" at this time, thus restricting use to
the Link rel=preload header.

Headers are exposed and process-cached, like all other content
(scripts, styles, etc.), through ResourceLoaderModule::getModuleContent,
and aggregated by ResoureLoader::makeModuleResponse.

I had hoped for the getPreloadLinks to be stateless (not vary on $context).
Whether something should be preloaded and what, should not vary on the
skin or language. However, while that conceptually holds true, the exact
url for any given resource may still vary. Even the main use case for this
feature (T164299, preloading base modules request) require $context to pass
down skin and lang to the load.php url.

Add full test coverage and example documentation.

Bug: T164299
Change-Id: I2bfe0796ceaa0c82579c501f5b10e931f2175681
2017-08-03 03:57:00 +00:00
..
actions
api Merge "API: Add deprecation warnings for Iae0e2ce3" 2017-07-21 21:12:10 +00:00
auth clone keyword must not be used as a function 2017-06-28 16:29:33 +02:00
cache tests: Replace implicit Bugzilla bug numbers with Phab ones 2017-02-21 02:14:34 +00:00
changes RCFilters: show new changes 2017-07-31 08:50:09 -04:00
changetags Add unit tests for ChangeTags::modifyDisplayQuery() 2017-07-24 23:54:07 +00:00
collation Add collation for Bashkir (ba) 2017-05-10 04:17:46 +00:00
composer
config config: Add more EtcdConfig::fetchAllFromEtcdServer tests 2017-07-24 13:04:00 -07:00
content build: Update mediawiki/mediawiki-codesniffer to 0.10.1 2017-07-22 18:24:09 -07:00
context
db rdbms: Refactor DatabaseTest 2017-07-20 18:23:37 -07:00
debug Switch to librarized version of TestingAccessWrapper 2017-04-20 14:15:57 +00:00
deferred Push all DeferredUpdates to POSTSEND queue when running that queue 2017-07-06 14:10:17 -07:00
diff
exception Fix/hack ErrorPageError to work from non-UI contexts 2017-07-06 20:04:31 +00:00
externalstore
filebackend Switch to librarized version of TestingAccessWrapper 2017-04-20 14:15:57 +00:00
filerepo phpunit: Avoid use of deprecated getMock for PHPUnit 5 compat 2017-04-06 00:44:32 +00:00
GlobalFunctions Remove empty lines at begin of function, if, foreach, switch 2017-07-01 11:34:16 +00:00
htmlform Merge "HTMLForm: Allow returning Message objects from HTMLFormField::validate()" 2016-11-25 09:11:07 +00:00
http Move HttpAccept* to libs 2017-06-12 18:28:25 +04:30
import Remove empty lines at begin of function, if, foreach, switch 2017-07-01 11:34:16 +00:00
installer DatabaseUpdater: Stop inserting junk into 'updatelog' every time the updater runs 2016-11-30 20:13:30 +00:00
interwiki Remove empty lines at begin of function, if, foreach, switch 2017-07-01 11:34:16 +00:00
jobqueue build: Prepare for mediawiki/mediawiki-codesniffer to 0.9.0 2017-06-26 17:14:31 +00:00
json Remove spaces after cast operators 2016-10-31 13:57:39 +00:00
libs Merge "rdbms: Complete coverage for Database::selectSQLText()" 2017-07-28 21:02:54 +00:00
linkeddata Remove empty lines at begin of function, if, foreach, switch 2017-07-01 11:34:16 +00:00
linker phpunit: Avoid use of deprecated getMock for PHPUnit 5 compat 2017-04-06 00:44:32 +00:00
logging Various test fixes for postgres 2017-05-18 20:30:13 +00:00
mail phpunit: Avoid use of deprecated getMock for PHPUnit 5 compat 2017-04-06 00:44:32 +00:00
media Remove empty lines at begin of function, if, foreach, switch 2017-07-01 11:34:16 +00:00
objectcache Switch to librarized version of TestingAccessWrapper 2017-04-20 14:15:57 +00:00
page build: Update mediawiki/mediawiki-codesniffer to 0.10.1 2017-07-22 18:24:09 -07:00
pager Various test fixes for postgres 2017-05-18 20:30:13 +00:00
parser Remove ParserOptions::legacyOptions() and cleanup related code 2017-07-04 01:28:57 +00:00
password Remove empty lines at begin of function, if, foreach, switch 2017-07-01 11:34:16 +00:00
poolcounter
rcfeed Add missing @group Database tags in tests 2017-03-18 19:13:18 -04:00
registration Merge "Allow namespaces defined in extension.json to be overwritten locally." 2017-05-21 08:02:22 +00:00
resourceloader resourceloader: Add support for modules sending preload headers 2017-08-03 03:57:00 +00:00
search Fix phrase search 2017-07-03 11:44:48 +02:00
Services build: Prepare for mediawiki/mediawiki-codesniffer to 0.9.0 2017-06-26 17:14:31 +00:00
session session: Avoid deprecated wfMemcKey() 2017-05-23 22:25:27 -07:00
site build: Update mediawiki/mediawiki-codesniffer to 0.10.1 2017-07-22 18:24:09 -07:00
skins phpunit: Fix OutputPage::__construct warning in SkinTemplateTest 2017-02-08 18:19:43 +00:00
specialpage Follow-up 0b3ea6e1ab: use more flexible regex for timestamp in ChangesListSpecialPageTest 2017-07-28 17:36:25 -07:00
specials Allow blacklisting certain namespaces in Special:ShortPages 2017-08-01 00:21:12 +02:00
tidy Merge "RemexHtml tidy driver with p-wrapping" 2017-03-08 15:24:36 +00:00
title Remove empty lines at begin of function, if, foreach, switch 2017-07-01 11:34:16 +00:00
upload SECURITY: Whitelist DTD declaration in SVG 2017-04-06 13:43:04 -07:00
user Do not disable password reset for blocks meant to force login 2017-06-08 08:18:24 +00:00
utils Remove empty lines at begin of function, if, foreach, switch 2017-07-01 11:34:16 +00:00
AutopromoteTest.php In Autopromote skip edit count lookup if requirement is 0 or invalid 2017-05-21 14:30:42 +00:00
BlockTest.php tests: Replace implicit Bugzilla bug numbers with Phab ones 2017-02-21 02:14:34 +00:00
DeprecatedGlobalTest.php phpunit: Fix failing DeprecatedGlobalTest on HHVM at Travis CI 2017-07-28 18:30:32 -07:00
DiffHistoryBlobTest.php
EditPageTest.php tests: Replace implicit Bugzilla bug numbers with Phab ones 2017-02-21 02:14:34 +00:00
ExportTest.php DumpStringOutput: Rename getOutput() to __toString() 2016-07-14 06:28:16 -04:00
ExtraParserTest.php Wrap parser output in <div class="mw-parser-output"> 2017-05-08 05:32:03 +00:00
FauxRequestTest.php FauxRequest: Complete code coverage for FauxRequestTest 2017-04-01 01:25:02 +00:00
FauxResponseTest.php
FormOptionsInitializationTest.php Remove "Generated by PHPUnit" comments in 3 files 2016-12-13 03:20:04 +00:00
FormOptionsTest.php Remove "Generated by PHPUnit" comments in 3 files 2016-12-13 03:20:04 +00:00
GitInfoTest.php phpcs.xml: Escape . in exclude-pattern 2017-07-23 00:46:12 +00:00
HooksTest.php
HtmlTest.php Update weblinks in comments to msdn.microsoft.com 2017-06-09 11:55:28 +02:00
LicensesTest.php
LinkerTest.php Merge "Linker: Do not localize links to other wikis in comments" 2017-07-06 02:08:02 +00:00
LinkFilterTest.php Move LikeMatch to Rdbms namespace 2017-02-06 21:20:39 -08:00
MediaWikiServicesTest.php statsd: Rename MediawikiStatsdDataFactory to IBufferingStatsdDataFactory 2017-07-07 17:22:50 -07:00
MediaWikiTest.php Revert "MediaWiki.php: Redirect non-standard title urls to canonical" 2016-09-09 21:45:27 +00:00
MediaWikiVersionFetcherTest.php
MergeHistoryTest.php
MessageTest.php Switch to librarized version of TestingAccessWrapper 2017-04-20 14:15:57 +00:00
MovePageTest.php
MWNamespaceTest.php Rename canTalk methods 2017-06-25 10:15:30 +00:00
MWTimestampTest.php phpunit: Avoid use of deprecated getMock for PHPUnit 5 compat 2017-04-06 00:44:32 +00:00
OutputPageTest.php Merge "Remove space after cast" 2017-06-29 01:11:32 +00:00
PagePropsTest.php Remove empty lines at end of functions 2016-11-05 11:55:10 +01:00
PathRouterTest.php
PreferencesTest.php build: Update mediawiki/mediawiki-codesniffer to 0.10.1 2017-07-22 18:24:09 -07:00
PrefixSearchTest.php Avoid postgres PrefixSearchTest failures due to collation differences 2017-05-18 19:04:03 -07:00
ReadOnlyModeTest.php Remove unused and unnecessary imports 2017-06-12 15:50:43 +00:00
RevisionStorageTest.php Revision::getText() was removed 2017-01-19 01:57:38 +00:00
RevisionStorageTestContentHandlerUseDB.php
RevisionTest.php Revision::getText() was removed 2017-01-19 01:57:38 +00:00
SampleTest.php Update weblinks in comments from HTTP to HTTPS 2016-11-07 15:24:46 +01:00
SanitizerTest.php Human-readable section ID support 2017-08-01 20:32:20 -07:00
SanitizerValidateEmailTest.php tests: Replace implicit Bugzilla bug numbers with Phab ones 2017-02-21 02:14:34 +00:00
SiteConfigurationTest.php
SiteStatsTest.php Add WAN Cache to SiteStats::jobs 2017-07-25 18:17:34 +00:00
StatusTest.php tests: Fix invalid @covers value in StatusTest.php 2016-09-22 18:29:28 +01:00
TemplateCategoriesTest.php Disable broken TemplateCategoriesTest unit test 2017-05-20 11:36:25 +00:00
TemplateParserTest.php Better path traversal prevention in TemplateParser. 2017-03-14 18:43:11 +00:00
TestLogger.php Remove "@author Bryan Davis" and "Brad Jorsch" annotations 2017-06-26 15:25:46 -06:00
TestUser.php Make deprecated TestUser properties private 2016-06-22 15:43:54 +00:00
TestUserRegistry.php
TimeAdjustTest.php
TitleArrayFromResultTest.php
TitleMethodsTest.php
TitlePermissionTest.php Remove "editusercssjs" user right 2017-04-11 14:54:43 +01:00
TitleTest.php Introduce Title::getTalkPageIfDefined. 2017-08-01 19:09:13 +02:00
WatchedItemIntegrationTest.php Remove empty lines at begin of function, if, foreach, switch 2017-07-01 11:34:16 +00:00
WatchedItemQueryServiceUnitTest.php build: Prepare for mediawiki/mediawiki-codesniffer to 0.9.0 2017-06-26 17:14:31 +00:00
WatchedItemStoreIntegrationTest.php
WatchedItemStoreUnitTest.php build: Prepare for mediawiki/mediawiki-codesniffer to 0.9.0 2017-06-26 17:14:31 +00:00
WatchedItemUnitTest.php phpunit: Avoid use of deprecated getMock for PHPUnit 5 compat 2017-04-06 00:44:32 +00:00
WebRequestTest.php Move IP::isConfigured/TrustedProxy() to ProxyLookup service 2016-09-21 20:02:09 -07:00
WikiMapTest.php Improve WikiMap::getWikiReferenceFromWgConf() 2016-07-06 14:20:07 -04:00
WikiReferenceTest.php
XmlJsTest.php
XmlSelectTest.php Update weblinks in comments from HTTP to HTTPS 2016-10-11 17:25:10 +00:00
XmlTest.php Xml: Add test for listDropDown and remove unused getArrayFromWikiTextList 2017-03-20 22:47:19 +00:00