Actually on second thought, having the parameter disappear is
a better option than keeping it around with only one possible
value.
This reverts commit 7a79b017a0.
Change-Id: Ia67fa1425e0aa1ee95e0a1733f89d29f94f1eeee
Extensions using $wgAutoloadClasses where this test will fail
Follow-Up: If1125cd5fa4ed836fe15fc79480d78ebd899be4e
Change-Id: Ic2024605d7d59890c527cc0580a49da73f8516c8
Disabled by default, enabled with inprop=protections,
returned as 'restrictiontypes', also for non-existing titles.
Change-Id: I98604b60626b84bd8cb601a4149b80db1b6787b7
To use, ensure npm modules are up to date by running 'npm install'
in tests/frontend. Then run 'grunt qunit' to run it in Chrome.
To run it in both Firefox and Chrome (locally), run
grunt karma:more
Moved fixture from hardcoded HTML to the testrunner so that our
tests don't depend on arbitrary HTML and thus also pass in browser
contexts where the page only loads QUnit + test suites (e.g. Karma).
Change-Id: I4e96da137340a28789b38940e75d4b6b8bc5d76a
Add an 'export' subpage to SpecialJavaScriptTest which allows
one to request a self-sufficient JavaScript payload that will
bootstrap a ResourceLoader client and load the test suites.
This is needed for using Karma (which only loads JavaScript,
no full html pages). As such elements from the Skin and OutputPage
will not exist. While all QUnit tests in MediaWiki core and
most extensions I've seen already use #qunit-fixture, this is
now required. This to prevent leakage of elements from one
test to another, but it also prevents tests from depending
on elements provided by the server.
While the Karma setup is still in the pipeline (might land before
this commit loses WIP status), for now this can be tested via
the 'Special:JavaScriptTest/qunit/plain' subpage.
Refactor:
* Use HTTP status code 404 in the response for "noframework".
* Simplify HTML footprint by using <div id="qunit"> instead of
hardcoding the full structure. This feature was added to QUnit
since v1.3.0 (Feb 2012), we're using v1.14.0 (Jan 2014).
QUnit's header is automatically derived from document.title.
* Remove redundant addModules() for 'test.mediawiki.qunit.testrunner'.
This is already added by default.
* Move allowClickjacking() call so that it applies to other modes
as well. The exported javascript needs to have wgBreakFrame set
to false so that test runners can frame it.
* Change mediawiki.special.javaScriptTest to not depend on QUnit.
It caused QUnit to load on error pages. And in theory the page
is suited for other frameworks and shouldn't load QUnit this way.
Bug: T74063
Change-Id: I3d4d0df43bb426d9579eb0349b8b5477281a7cfc
It's fairly common that the API doesn't need to load the user
preferences, except to implement the unfortunate default uselang=user.
So let's move the handling of uselang=user to
RequestContext::getLanguage(), and have the API just assume that its
parent context will eventually fall back to that for uselang=user.
Bug: T85635
Change-Id: I947348d87b31808d331055dac6feb0cc2e1dd15d
Extensions and skins should already be adding their credits through
$wgExtensionCredits, meaning that they would be duplicated in the
"Installed libraries" section.
Anything that has a type that begins with "mediawiki-" will now
be skipped.
Release notes were added for this commit and 528297f8db.
Change-Id: Ie873b16c1a8a696c7de833ae69b263161d9e15a8
Original element sizes are stored in data(), and on window resize,
they are restored, so elements can be justified as on just loaded
page.
Bug: T55664
Change-Id: I286e0a4c8230c11619ca30f8f3b66778de835a33
The existing message is hard to understand and does not mention, that
this is a problem in the parser test itself and not with phpunit.
Before:
1) Warning
The data provider specified for ParserTest_<file>::testParserTest is
invalid.
Problem running hook
After:
1) Warning
The data provider specified for ParserTest_<file>::testParser
Problem running requested parser hook from the test file
Change-Id: I0b4225cc9ab95e8dd048515315c789113dacf39e
The mw.config.value object is no longer an alias to the global object
when $wgLegacyJavaScriptGlobals is true.
Instead, set() is made to copy to property to the global object. This
matches behaviour of other deprecated properties in that changes to the
deprecated property directly are ignored.
Bug: T58550
Change-Id: I703f7c12b59bc3207b2a291eacc393a8ae92df6f
The maxRows setting was previously unused and had no effect. This patch
passes the property in the fetch() call, and makes it enforce the setting.
Also updates mediawiki.userSuggest.js to use response()
The previously unused setting of 7 is changed to 10 to match current
behaviour.
Bug: T39316
Change-Id: I2873963aba9fd751607d11904b94bfcec8eb2d32
This will allow the server to trim any trailing parameters with
empty objects from invocations.
'templates' was the only parameter added after the initial ResourceLoader
release, the other properties have always been required.
Change-Id: Ie32e7d6a3c09f86a52d60394c474a62cb1b4e1d6
Amends to Database::makeList() to check if 'NULL' is present in array while
building IN clause. Presently a NULL in array intended to build IN clause, is
treated as a usual value. This creates
problem:https://dev.mysql.com/doc/refman/5.0/en/comparison-operators.html#function_in
Therefore null is appended at the end of the IN clause as " $field IS NULL"
rather than within the IN clause.
DatabaseSQLTest.php: Some test cases added for the modified behaviour.
Bug: T50853
Change-Id: Ic255c37e9702fd44d8173027ab8036ddc48f9d2e
Items in $wgExtensionCredits can expose a 'namemsg' attribute,
but it should only be used for localized strings.
SpecialVersion->execute() correctly uses 'name', while commit
326f3f450c inadvertently made
getCreditsForExtension() use 'namemsg'.
Also reduced code duplication.
Change-Id: I029ea17c55191d74bc6a803fad6cf092105f5b3c
The target for the checbox was extending unusually due to extra
margins. See https://phabricator.wikimedia.org/M27/51/
Change-Id: I93fb29cfed5e0fd0ceb1f89977abd2991629fe34