Commit graph

1398 commits

Author SHA1 Message Date
Reedy
c1ed53da6c Kill off pre php 5.3.2 back compat hacks
Change-Id: I5b806a5d8fd4ec6914e3786a4a9aefba4ad6faa6
2012-05-05 00:23:35 +01:00
Werdna
a97f5a1134 Merge "(bug 18195) Allow changing preferences via API" 2012-05-04 05:53:06 +00:00
Aaron Schulz
56c13312da Merge "Adding test case for testing revision storage and retrieval." 2012-05-03 22:39:14 +00:00
robin
96753a2327 Very basic parser test for language function
Change-Id: I7fad6caa460a4f62881c33ae9f7bd30e6a5942d1
2012-05-03 22:23:09 +02:00
Hashar
65e0ff6bb8 Merge "Adding more tests for Title." 2012-05-03 11:40:50 +00:00
Timo Tijhof
5e5a4cc73c Re-enable css @import unit tests
- These tests were written while @import was broken. Now that it bug 34669 is temporarily
  fixed, we can re-enable the unit test to watch for regressions.

- See also bug 31676 which is still open.

- Added a "wait" parameter to the qunit

Change-Id: If9c2ce012dfe62e032ca4f62384237af0acc826c
2012-05-03 02:09:26 +02:00
Hashar
5343b3eb3e Merge "Bumping minimum supported version of PHPUnit to 3.6.7" 2012-05-02 20:13:40 +00:00
daniel
0b5f8c4cd0 Adding test case for testing revision storage and retrieval.
New tests are added to avoid regressions when the ContentHandler facility is introduced.

Change-Id: I6934d03e9df74930998d771f64fe4f4fe5555967
2012-05-02 19:34:35 +02:00
daniel
d85bbb1074 Adding more tests for Title.
This introduces tests for isCssJsSubpage, isCssOrJsPage, and isWikitextPage.

New tests are added to avoid regressions when the ContentHandler facility is introduced.

Change-Id: I68987490b01242cc0bcdc0d9dfaa99f1227f71a0
2012-05-02 19:32:56 +02:00
Aaron Schulz
f4ead22497 Merge "enable email for PreferencesTest.php" 2012-05-01 23:04:53 +00:00
umherirrender
bd27932f55 Set CdbTest to skipped instead of incomplete
When the native support is not available, the test is not incomplete.
See also the DiffBlob test and xdiff.

Change-Id: I16c14efc3f24e4171a699390d99ca6509d6a28c8
2012-04-30 09:49:31 +02:00
umherirrender
3098babc35 enable email for PreferencesTest.php
The tests in PreferencesTest.php checking email things,
enable email to let the test run complete and not depend on the wiki
setting.

Change-Id: I21b34b31c52a10e0f4f6b918ee25d98a97ea5981
2012-04-30 09:29:45 +02:00
Christian Aistleitner
096592cf14 Bumping minimum supported version of PHPUnit to 3.6.7
With PHPUnit 3.6.7, we can finally check the output of tests.

Change-Id: Ib0f1afe5fd9ab9784ba7f78b2921cf047ccc83f3
2012-04-29 10:02:23 +02:00
Platonides
fdc857b73e Change CRLF line ending in GenderCacheTest.php
Edited in windows with no autocrlf set?

Change-Id: I955f0ed1fad9c4e5c143324b163a4b3c81a3f733
2012-04-28 17:18:22 +02:00
Platonides
1ceb4b671f Really use the global variable. Fixes bug in c4507 (4989dd)
Change-Id: I4733a3d8949d76044ba90e672395299f6623cecf
2012-04-28 17:12:38 +02:00
Christian Aistleitner
76cefaf165 Adding tests for dumps
Change-Id: I9aa3b6d7349458b3e2b2c7111bda739bacc22f9f
2012-04-28 11:37:07 +02:00
Demon
799a29a209 Merge changes Ib2cb36cd,I50dec908
* changes:
  Adding Maintenance output tests
  fwriting to STDOUT -> print in Maintenance
2012-04-27 18:36:05 +00:00
Brion VIBBER
e8eddd20de Merge "[FileBackend] Added 'recursive' flag to directory clean() function." 2012-04-26 23:30:05 +00:00
Brion VIBBER
ece03cc143 Merge "strip off subpages direct in GenderCache" 2012-04-26 23:21:43 +00:00
Aaron
104e8bb0d7 [FileBackend] Added 'recursive' flag to directory clean() function.
Change-Id: I8fadd25c05840e2324bf8433dc0a4846daf8e2c3
2012-04-26 12:41:33 -07:00
Demon
490b85f27b Merge "let us easily override PHPUnit version" 2012-04-26 13:22:17 +00:00
Brion VIBBER
f2e06b1f04 Merge "[FileBackend] Added some basic directory functions." 2012-04-25 19:38:12 +00:00
Aaron Schulz
dd5326ccf1 [FileBackend] Added some basic directory functions.
* Added directoryExists() function to check if a dir exists.
* Added getDirectoryList() and getTopDirectoryList() functions to list out subdirs.
* Added getTopFileList() function to list out immediate files in a dir. This wraps getFileList(), which was modified.

Change-Id: I087835f40d76c41f5d6af55b9a34a51e0f44a675
2012-04-21 21:33:41 -07:00
Brion VIBBER
634bf17c9e Merge "Revert "tests to compare En, Qqq and messages.inc" due to test failures caused by extension dependencies." 2012-04-21 19:39:59 +00:00
umherirrender
4989ddd423 strip off subpages direct in GenderCache
LinkBatch can also give subpages to the GenderCache and therefor it is
easier to do it always in GenderCache, than in LinkBatch and Title

Add unit tests for GenderCache

Change-Id: Ia936ff8bb639a197b0b3a8e07c97a66edd57dd10
2012-04-21 10:34:22 +02:00
Aaron Schulz
e515d15f3a Revert "tests to compare En, Qqq and messages.inc" due to test failures caused by extension dependencies.
This reverts commit 9a2aae3107
2012-04-20 21:12:08 +00:00
Brion VIBBER
242659a4a7 Merge "Increase permitted runtime for testParserTest" 2012-04-20 18:03:20 +00:00
Christian Aistleitner
cc13cf0564 Increase permitted runtime for testParserTest
Change-Id: Id8a73b2d5d32af38c6856c3120394a2d6150f835
2012-04-20 20:00:36 +02:00
Brion VIBBER
30721bc6a9 Merge "(bug 35769) Convert mediawiki.Uri test suite to QUnit" 2012-04-20 17:51:24 +00:00
Antoine Musso
9a2aae3107 tests to compare En, Qqq and messages.inc
Change-Id: I7ebeeea703e955c628b57548eb023fa3eb5a2f52
2012-04-20 18:08:33 +02:00
Szymon Świerkosz
a6cd69d83a (bug 18195) Allow changing preferences via API
I have created an API module for changing the preferences.
It allows resetting preferences (reset argument) and bulk changes
of preferences (change argument) in a format:
name1=value1|name2=value2

The change argument has a limitation imposed by the current API
implementation as it cannot accept | in values. There is
available a pair of arguments optionname and optionvalue, the
latter accepts values with |.

I have created optionstoken parameter in meta=userinfo to provide
a token. There is already preferencestoken there, but I would
like to have a consistent naming.

Change-Id: I0d6c654a7354ba77e65e338423952a6a78c1150f
2012-04-20 16:56:27 +10:00
Brion VIBBER
01c99c8541 Merge "assertEquals is $expected, $actual, not $actual, $expected" 2012-04-18 23:06:24 +00:00
Reedy
9e33a6c740 assertEquals is $expected, $actual, not $actual, $expected
Fix Title related tests that are the wrong way round (noticed by Daniel Kinzler
when creating more tests, and wondering why phpunit was making error messages
that didn't make any sense!)

public static function assertEquals($expected, $actual, $message = '',
    $delta = 0, $maxDepth = 10, $canonicalize = FALSE, $ignoreCase = FALSE)

Change-Id: I09aeb7cb7edb8e486ccf2f54673f91cd9704cd3b
2012-04-18 16:03:46 -07:00
Reedy
bcafe7b005 Merge "duration formatter, makes time in sec easy to read" 2012-04-18 15:56:30 +00:00
Aaron
41831cbcfe Fixed silly backend test config bug.
Change-Id: I35b53dc609acb720c64f236cb58f91a73604e2f8
2012-04-17 10:25:52 -07:00
Antoine Musso
3b9a3678b3 let us easily override PHPUnit version
The new --with-phpunitdir let us specify a git checkout of PHPUnit. That
will ease regression testing of the upstream new version. Usage is
straightforward:

Checkout PHPUnit from git as instructed on:
https://github.com/sebastianbergmann/phpunit#readme

Invoke our test suite with:
 $ cd maintenance/tests
 $ php phpunit.php --with-phpunitdir /path/you/just/checked/out

Change-Id: I8a9af0deac4dd74e3c8bde73535555c54ac83766
2012-04-17 15:39:15 +02:00
Brion VIBBER
c9ebb1698c Merge "(bug 34852) new optional 'link' parameter to <gallery>" 2012-04-16 17:33:07 +00:00
Kim Eik
0a52782667 (bug 34852) new optional 'link' parameter to <gallery>
The patch adds an optional parameter |link= to the <gallery>
tag. This will allow for images to link to other pages and
externals urls instead of being hardlinked to the image file
that is displayed in the gallery.

Here are a couple of examples.

Link as WikiLink:
<gallery>
File:20120106_001.jpg|link=Main_Page
</gallery>

Link as absolute URI:
<gallery>
File:20120106_001.jpg|my caption|alt=my alt
text|link=http://bugzilla.wikimedia.org
</gallery>

this would cause the link on the thumbnails rendered by the gallery tag to link
to a custom page/url instead of the actual media/image.

a link should be an internal wiki link or an absolute uri as shown in the examples.

Change-Id: I21b276ad5c7a8df13b3a716957d23fd53c37d29e
2012-04-16 10:09:31 +02:00
Christian Aistleitner
89743db168 Adding Maintenance output tests
Change-Id: Ib2cb36cd840505e2956a6b0978cea1920277d42c
2012-04-15 21:29:07 +02:00
Timo Tijhof
226d32217a (bug 35769) Convert mediawiki.Uri test suite to QUnit
- Converted ./tests/jasmine/spec/mediawiki.Uri.spec.js
  to ./tests/qunit/suites/resources/mediawiki/mediawiki.Uri.test.js

- expect('').toContain('') doesn't exist in QUnit, changed to
  ok(''.indexOf('') >= 0), which is what Jasmine does internally.

- Some of the Jasmine expects()'s didn't have descriptions, added those
  while at it.

- Cleaned up the 1 test that was already in QUnit added in
  2d84f3191a.

- Cleaned up SpecRunner.html

Change-Id: Id7b498888e22576e8ff0636725191624add470d6
2012-04-14 09:48:21 +02:00
Jeroen De Dauw
77d2f16760 duration formatter, makes time in sec easy to read
The Language::formatDuration() method introduced by this patch let us
easily render an amount of seconds for easier human reading.

 $ maintenance/eval.php
 > var_dump( $wgLang->formatDuration( 1000 );
 string(25) "16 minutes and 40 seconds"

Also ran rebuildLanguage.php on Siebrands request

Change-Id: If287fb10e897d3d2374cf6eeae3bc5be00cdfc01
2012-04-13 13:54:04 +02:00
Antoine Musso
2389ec7141 MockOutputPage class in its own file
The MockOutputPage can be needed in various tests suite beside
GlobalFunctions. Seems to make sense to get it in its own class so we
can easily use it.

Change-Id: Icbb34db81e8cc8636d95f6326dd228bc74a741d7
2012-04-13 12:47:19 +02:00
Adam Wight
376d54f4c5 document how the parser handles list items coming from a template,
especially the surprising start-of-line behavior.  This test will
be used to implement matching behavior in Parsoid.

Change-Id: Ibfa13dfd2be2d62c285449cb090e2b112fe30f9b
2012-04-12 08:50:29 -07:00
Antoine Musso
d664ffd18a (34037) phpunit tests timeout too fast
PHPUnit has a timeout protection system which let us put tests in three
categories having different timeout (default: 1s, 10s, 60s). The timeout
only happens when using strict mode and having PHPUnit Invoker
installed.

Recently, the continuous integration server has been upgraded and the
PHPUnit Invoker was installed to let us run a serie of tests related to
dumping the database to XML. They do need some timeout system. Suddenly,
some tests started failing.

By default all tests are in the 1 second timeout group. Since we use a
sqlite backend and the server hard disk can get busy, some test can take
more than one second to execute.

This patch raise the default (small group) timeout to 2seconds and
explicitly define the value for the two other groups (medium and large)
using PHPUnit default values.

Change-Id: I2f5613b0c0215023c413dec8e84804175d8c8d6e
2012-04-11 21:08:09 +02:00
Timo Tijhof
fcdeff9945 Increase QUnit async stop() timeout limit, improve documentation
- Raise from 5s to 10s. Should fix the false positives that sometimes
  happens in TestSwarm if a VM is being slow (especially IE6).

Change-Id: I4bc00b34040f5659c8456ce6978627c32497656d
2012-04-11 19:26:06 +02:00
Brion VIBBER
9791a4e52d Merge "Employing MediaWikiTestCase's temporary file methods" 2012-04-10 20:54:36 +00:00
Brion VIBBER
8de59d1452 Merge "(bug 33658) support for {{GRAMMAR:}} in jqueryMsg" 2012-04-10 20:42:34 +00:00
Brion VIBBER
8dc3a4825d Merge "- Fix bug 35076 - More tests, test comments" 2012-04-10 19:54:11 +00:00
Brion VIBBER
17a8a22c89 Merge "Adding temp file/dir management to MediaWikiTestCase" 2012-04-10 19:50:54 +00:00
Nikola Smolenski
598d96d24c - Fix bug 35076
- More tests, test comments

(This is the same as r114049.)

Patch set 2: Squash in missed test file

Change-Id: Icaf7fdd11499c64c42b46e442c158f22309345a7
2012-04-10 13:39:46 -04:00
Aaron Schulz
e82c2cc7ee Merged r114672 from wmf1.19 plus tests; crosswiki block name/id fix.
Change 1:
* Delete any pre-existing block for the tests
* Renamed test function and fixed comment typo

Change-Id: I4804ccae81dd0455e9d3ddf48960c4b5cd6e4f5f
2012-04-10 09:49:52 -07:00
Christian Aistleitner
282554eb33 Employing MediaWikiTestCase's temporary file methods
Change-Id: Ide86541abf6642791c1466a2075436a9df6bdbed
2012-04-10 17:08:06 +02:00
Christian Aistleitner
9e80e3a702 Adding temp file/dir management to MediaWikiTestCase
Change-Id: I4ac8f44f1d681925af231377e9d1b984488d3198
2012-04-10 17:08:00 +02:00
Santhosh Thottingal
931c31c7bd (bug 33658) support for {{GRAMMAR:}} in jqueryMsg
This add GRAMMAR support to the mediawiki.jqueryMsg module:

1. make jqueryMsg understand GRAMMAR(case insensitive)
2. mw.language get convertGrammar, can be overridden per language as in
   php
3. Introduce resourceloader module ResourceLoaderLanguageDataModule
4. Language.php get a method to filter wgGrammerForms for the current
   contentLanguage.
5. Qunit tests
6. This code was originally written in jsgrammar branch of svn and had
   reviewed during the last slush time.

Change-Id: I90dd0b2f0cb30fd30539896c292829adc4fc7364
2012-04-10 11:47:39 +02:00
Catrope
458f162b63 Merge "[LanguageConverter] Added some cache code based on the problems in r97512." 2012-04-09 22:25:24 +00:00
Brion VIBBER
e59109e750 Merge "(bug 35658) make mw.Uri handle uris w/o protocol or host" 2012-04-09 18:23:51 +00:00
lupo
2d84f3191a (bug 35658) make mw.Uri handle uris w/o protocol or host
Includes testcase.

mw.Uri already supplied the protocol if it was missing and
document.location was set. Newly it also supplies the host (and port)
from document.location if that is set. That enables handling of
root-relative URls like "/some/path".

Changeset 2/3: rename test file from mediaWiki.Uri.test.js to
mediawiki.Uri.test.js.

Changeset 4: fix jasmine tests. Test for 'http:/foo.com' is now expected
to succeed, not throw an exception. The second test for
'foo.com/bar/baz' in strict mode is correct; that's parsed in strict
mode as a truly relative path.

Change-Id: Ibc4386ba40cffea9d30417ec2720114f6819ae1c
2012-04-07 18:52:02 +02:00
Aaron Schulz
10f49bd065 [LanguageConverter] Added some cache code based on the problems in r97512.
* Added $wgLanguageConverterCacheType global to control LC cache type. We can use it to enable direct apc use for language converter (to match the live hack).
* Added $wgLangConvMemc object, available via Setup.php

Change 1:
* Updated unit tests
* Minor documentation cleanup in DefaultSettings.php

Change-Id: Icd5dd28407e9759ce294c784ec41d9ca15c89616
2012-04-06 13:26:17 -07:00
Christian Aistleitner
02c05b9d0e Correcting type of DatabaseSqlite::insertId()
Change-Id: I37ebe291cf8c4fd66a1ee236fcfa063016efbc8d
2012-04-06 21:02:27 +02:00
Reedy
a521673dc2 Merge "tests related to API block action and its gettoken" 2012-04-06 15:38:25 +00:00
umherirrender
bf2a9989b2 (bug 23006) create #speciale parser function
Also add explicit Title::getPrefixedText() in
CoreParserFunctions::special, so that method does not rely on
Title::toString.

Change-Id: I1d041b11386bff15811e19de47a662e5ed7a2b07
2012-04-06 09:14:47 +02:00
Hashar
e41c77eda7 Merge "Un-marking testMakeNormalBlock as broken..." 2012-04-06 06:42:07 +00:00
Gabriel Wicke
792792b68a Add passing test documenting MW's acceptance of pipes between tr attributes
Change-Id: I584a8826348a9acc4facfaadf5766832d262a53d
2012-04-05 15:52:05 +02:00
Timo Tijhof
63b833ab18 increase qunit coverage of mediawiki.html and mediawiki.util
- mw.html
 * Adding test for mw.html.Raw
 * Adding more tests for mw.html.element

- mw.util
 * Minor coding style update (local variables)
 * Updating mw.util.addPortletLink to not create its own "#mw-panel",
 this was previously done for ./qunit/index.html (which has been
 removed) but when ran on [[Special:JavaScriptTest/qunit]] it collides
 with the existing "#mw-panel", so far didn't break anything but that
 was purely lucky. This element is redundant so taking it out of the
 html sample
 * Removing redundant clean up, #qunit-fixture is automatically cleaned
 after each test

Change-Id: Iaf9791ca3cdcac1b732c851cdecc8fcd9f96fdd8
2012-04-04 22:48:46 +02:00
Amir E. Aharoni
fe0b0270fd (bug 31817) add support for HTML5 <bdi> bidi embed element
Adding <bdi> to $htmlpairsStatic to allow using this tag.

Adds parser test case to confirm that <bdi> makes it through with 'lang' attribute.

This updated patchset also adds <bdi> to the attribute whitelist with the basic common attribute; allows 'lang' and such to get through.

Change-Id: Ib7e6553f017837cb1d49d5718e288228c17392c0
2012-04-04 13:11:55 -07:00
Timo Tijhof
ea8581e5e7 Remove old qunit/index.html
It wasn't actively maintained and has been made obsolete when
[[Special:JavaScriptTest/qunit]] was introduced, which actually uses
ResourceLoader, LocalSettings and the Skin. It was broken in some ways
already and adds no value. It was a quick hack that isn't needed
anymore.

Change-Id: I60098902cd1e736b08992890dce978c71b9b32b0
2012-04-04 21:53:49 +02:00
Brion VIBBER
d05de487c3 Merge "Fix support for TestSwarm on SpecialJavaScriptTest/qunit" 2012-04-04 17:52:02 +00:00
Brion VIBBER
f781c4e414 Merge changes Id1ac2f8b,I48f8cd17,I10481ce6,Id4530499
* changes:
  PHPUnit preparations for tests of maintenance
  Database dependency injection for BackupDumpers
  Pulling in fix for superfluous header
  TextPassDumper::initProgress pull in default value
2012-04-04 17:43:45 +00:00
Reedy
cdbfe8db86 tests related to API block action and its gettoken
Add tests for:
 - action=block and action=unblock gettoken
 - attempting to block or unblock a user with no token passed.

Patchset2: use a provider to have tests run against both 'block' and
'unblock' actions.

Change-Id: I686348ff4e2fe419c556acea2fa59dd203dc9440
2012-04-03 22:27:57 +02:00
umherirrender
b5511c68c3 (bug 34355) add a variable and parser function for the namespace number
Change-Id: Ie162cfda7ddd38d4278ceee5fd23f5a4e579cb96
2012-04-03 13:25:06 -07:00
Reedy
6eb4171a07 Un-marking testMakeNormalBlock as broken...
Change-Id: I5960d71409dc6338249817bc67de5227845dc3d8
2012-04-03 21:16:40 +01:00
Antoine Musso
633c4542c6 disable broken ApiBlockTest::testMakeNormalBlock()
That test has probably always been broken and use an invalid token. The
bug tracking brokenness is http://bugzilla.wikimedia.org/35646

Since the broken test is merged in master, that block the integration of
Jenkins and Gerrit by having any submitted patchset to be reported as
failling :-(

Root cause is https://gerrit.wikimedia.org/r/3434 which made the
Block/Unblock API to actually verify the token previously always
considered valid (bug 34212).

Change-Id: Iecf6b083163c214c734360b2f6d9b4bed8af07dc
2012-04-03 15:08:57 +02:00
Christian Aistleitner
8ba98560af PHPUnit preparations for tests of maintenance
Change-Id: Id1ac2f8b940e5417e0facaacb7d5ec30b48a9efb
2012-04-03 12:57:10 +02:00
Santhosh Thottingal
c56cca551e (bug 32748) unicode URL for articles print version
Printer friendly version of article must encode URL in unicode.

- Patch originally written by Brion Vibber
  https://bugzilla.wikimedia.org/attachment.cgi?id=9593
- introduces wfExpandIRI() global function, uses wfExpandIRI_callback.
- phpunit test.

Change-Id: I348b9f1d2ce65cb14f20d4a5751ac9359c8b8316
2012-04-02 18:14:41 +02:00
Alex Monk
7b7d5d6df7 Renamed 'metawikipedia' interwiki link prefix to 'metawikimedia' - Meta-Wiki deals with more projects than just Wikipedia. See https://www.mediawiki.org/wiki/Wikipmediawiki
Change-Id: I995f0d0e6a3877f605fbabd4a49ec258d9fc08b6
2012-04-02 16:34:37 +01:00
Antoine Musso
da8ba7c544 Regroup all API tests in the 'API' PHPUnit group
That will let us tests all the API tests by using PHPUnit group
filtering such as:

 php phpunit.php --group API

Also cleaned some whitespaces

Patchset-4: skipped files that had only whitespace changes

Change-Id: I51e03d910521b061f505e3a9b11a08c7b95f1538
2012-04-02 16:55:31 +02:00
Santhosh Thottingal
b91ffd7b09 Add phpunit testcases for Bug 30681
- The fix was done in https://gerrit.wikimedia.org/r/3842

Change-Id: I9874604828c1ae4ce0948ed7533a57dea9ac736d
2012-03-28 15:36:23 +05:30
Krinkle
5e590be3d6 Fix support for TestSwarm on SpecialJavaScriptTest/qunit
So far we've still been using ./tests/qunit/index.html in TestSwarm, today I've tested locally
to submit a url to SpecialJavaScriptTest instead and made a bunch of browsers join my swarm,
quite a few problems popped up. This commit fixes those issues so that we can actually use
SpecialJavaScriptTest in TestSwarm.

* Add QUnit configuration variable for TestSwarm's inject.js

  In order to use TestSwarm, the urls that TestSwarm loads in clients that has
  the QUnit test suite running on it need to include a little javascript.
  This inject.js registers hooks with QUnit to listen for when the test suite finishes
  and contacts the parent window (TestSwarm loads the qunit test suite url in an iframe)
  to submit the results. Previously I included a copy of TestSwarm's inject.js in
  ./tests/qunit/data and in our testrunner.js a relative link to that.
  However this is currently breaking because it is an outdated version. Updating brings
  no good since someone else might use their own TestSwarm would could still run on an old
  version etc. The TestSwarm submitted too always expects that it's own inject.js is used,
  not some snapshot copy. I've removed the copy of it in MediaWiki and instead added a
  configuration option to point to wherever the you want is located.

  Also, since the old static index.html version of the unit test can't retrieve PHP based
  content, this means TestSwarm submissions through the old static index.html are no longer
  supported. Only through the new Special:JavaScriptTest from now on. I'll probably remove
  the whole index.html soon-ish as it's getting quite annoying to maintain all that by hand,
  and it's been superseded in everywhere imaginable now anyway. Even not used anymore by
  intergration.mediawiki.org because that's been quiet since the Git-switchover.., and when
  we update it, we can update it to point to the new SpecialPage instead.

* OutputPage::allowClickjacking() on SpecialJavaScriptTest/qunit.

  When initially testing the TestSwarm setup to submit SpecialJavaScriptTest/qunit urls
  (instead of the old ./tests/qunit/index.html) it was failing due to an iframe DENY.
  This was a bit odd since `$wgBreakFrames = false;` by default, and although
  `$wgEditPageFrameOptions = 'DENY';` by default, it wasn't obvious at all that that value
  ("DENY") is used for all OutputPages by default (as supposed to just action=edit and the
  like). This is because OutputPage has  mPreventClickjacking=true by default and when it's
  true-ish it uses $wgEditPageFrameOptions for the X-Frame-Options.

* 'position' => true; for the mediawiki.tests.qunit.suites module.

  QUnit has a hook for "done". Which is called when QUnit.start() is called and all queued tests
  have been executed. QUnit.start() is automatically called on window.onload by QUnit.

  TestSwarm uses QUnit's hook system to hook into the QUnit "done" event, and at that point
  takes the stats, submits them to TestSwarm and go on with the next job.

  When testing locally, I got semi-random failures reporting that only 0/0 tests were
  successfully ran in IE6. This is because when QUnit.start (and consequently QUnit.done)
  are first called, apparently no test suites had finished downloading and/or execution yet
  (the bottom queue is asynchronous, and doesn't postpone domready nor window.onload).

  When normally viewing Special:JavaScriptTest/qunit this doesn't break anything, because if
  QUnit start/done is in the past and another module(), test(), or equal() etc. is called it just
  picks up again and adds more results to the page and calls QUnit.done() again.
  However in the case of the TestSwarm embed, it submits the results after the first done() and
  cleans up the iframe. So I'm making mediawiki.tests.qunit.suites a blocking module instead, so
  that there will only be one QUnit.start/done and that's the one that TestSwarm gets and after
  which TestSwarm can safely garbage the iframe.

  This means that basically all test suite modules and the original modules they are testing will
  be loaded from the head. Shouldn't have any side effects, but might cause minor breakage in
  future in modules that badly assume they're being put on the bottom.
  I'm not considering that a bug in the test, it'll just help catch that bad code sooner :),
  it's a test suite after all.

(Yay, my first Git commit to MediaWiki core)

Change-Id: I83f83377f2183b6deb4e901af602ac9a5628558b
2012-03-25 03:15:19 +02:00
Alex Monk
bc0446e8b5 Fixed some links from SVN to Git.
Change-Id: If425135e3601f11e42c0fc66b1eff7192b2a0704
2012-03-23 22:32:53 +00:00
Antoine Musso
9a5cbc553e RecentChangeTest use the Database
Moving RecentChangeTest to the Database group will fix Jenkins jobs
handling databaseless tests.

Change-Id: I3f14120e806c35b19e96747aa43d6c64a6b504ca
2012-03-23 18:20:01 +01:00
Sam Reed
c27fbf5330 Trim trailing whitespace
Add/improve documentation

Explicitly define a few variables

Change-Id: If0017770a0a47f8f6be178b5bde8ae6691f74b6a
2012-03-21 15:47:05 -07:00
Roan Kattouw
311200ee2c Revert r114067, r114071, r114075, r114079, r114081, r114082, r114084, r114086, r114088, r114089, r114101, r114118, r114137, r114147, r114164, r114172, r114175, r114180, r114208, r114209, r114215, r114219, r114226, r114321, r114322.
This reverts the SpecialCachedPage and formatDuration sagas, with some collateral damage here and there. All of these revisions are tagged with 'gerritmigration' and will be resubmitted into Gerrit after the Gerrit switchover. See also http://lists.wikimedia.org/pipermail/wikitech-l/2012-March/059124.html
2012-03-20 23:03:59 +00:00
Jeroen De Dauw
d42c2f4d7a added some tests using the intervals param 2012-03-20 22:48:28 +00:00
Tim Starling
13b514edae Fixed a few "strip tag exposed" bugs.
* Introduced Parser::killMarkers() based on the concept from StringFunctions. Used it in cases where markerStripCallback() doesn't make sense semantically, namely grammar, padleft, padright and anchorencode. Used markerStripCallback() in other cases.
* Changed headline unstrip order as suggested by P.Copp on bug 18295
* In CPF::lc() and CPF::uc(), removed the is_callable(). This was a temporary testing hack committed by me in r30109, which allowed me to do differential testing against a copy of the parser from before that revision.
2012-03-20 04:39:09 +00:00
Tim Starling
a654a6e79a Fixed attempt to write to the wiki's upload directory during parser tests instead of /tmp, this is not allowed. I'm not sure what setupGlobals() is meant to do nowadays, that part is untested. It seems to be duplicated in ParserTest::__construct(). 2012-03-20 00:28:30 +00:00
Sam Reed
daa4e524b7 More occurrence typos 2012-03-19 21:40:39 +00:00
Aaron Schulz
7c54a34730 Reverted r113688, r113691 per CR and filed #61440 upstream. 2012-03-19 18:28:47 +00:00
Alexandre Emsenhuber
a606e89c6b Removed XmlTest::testNamespaceSelector(); it just breaks when $wgDevelopmentWarnings is set to true due to the fact that Xml::namespaceSelector() calls wfDeprecated(). 2012-03-19 12:44:36 +00:00
Krinkle
c2f213a404 [jquery.byteLimit] Set vars in return this.each loop
* Set vars in return this.each loop. This is the defacto standard plugin structure
  but somehow it slipped through this one (it's a 2 line wrapper, easy to miss).
* Added unit test (which failed before this commit)
* Fixes:
-- (bug 35294) jquery.byteLimit shouldn't set element specific variables outside the "return this.each" loop.
2012-03-18 22:13:55 +00:00
Krinkle
3224d041f4 [jquery.byteLimit.test] clean up
* js conventions
* whitespace indention
2012-03-18 21:40:46 +00:00
Jeroen De Dauw
bc9cca92ed follow up to r114084, add tests for stuff w/ multiple units 2012-03-17 23:26:37 +00:00
Sam Reed
a2dc33a5a3 Trim trailing whitespace
Add/improve documentation

Explicitly define a few variables
2012-03-17 22:52:54 +00:00
Sam Reed
e8ab5f6466 Noralise a few of the magic numbers used in r114084 2012-03-17 22:47:02 +00:00
Sam Reed
5736aa4132 Unit tests for r114067 2012-03-17 22:39:38 +00:00
Max Semenik
e7001ff574 Follow-up r113922: tests 2012-03-15 15:38:11 +00:00
Amir E. Aharoni
4b439bb6ad Bug 35034 - moved autocomment-prefix between the prefix and the arrow. Follow up to r109086. 2012-03-13 23:09:06 +00:00
Aaron Schulz
19799ae5bb Tweak testFileRepoConstructionWithRequiredOptions so that it doesn't fail depending on the config of the wiki being tested on. 2012-03-13 01:44:39 +00:00
Aaron Schulz
c8cc2ff897 r113688: updated test assertions 2012-03-13 00:18:29 +00:00
Sam Reed
b18ea7dee2 Normalise casing of getArticleID used in core 2012-03-11 18:54:55 +00:00
Aaron Schulz
783f7f0bd3 [FileBackend] Made doOperations() Status handling align with documentation as well as what FileRepo is essentially expecting when using the 'force' option (it assumes fatals are for total batch failures, not just partial ones). The relevant documentation was also improved. 2012-03-08 22:31:04 +00:00