Remove mediawiki.special.javaScriptTest module

We're almost ready to drop the non-plain mode of Special:JavaScriptTest
in favour of Special:JavaScript/qunit/plain. There's a few mobile-related
extensions still using the non-karma mode for qunit testing.

However, none of them make use of the Skin selector, which was mainly a debug
thing I added in the initial version. It no longer makes sense since our tests
now enforce an anti-dependency on skin html and other context. Encouraging
testing in multiple skins in the old UI therefore no longer makes sense.

This also fixes one of the most frequent errors in resourceloader logs and gets
rid of an ugly hack in Resources.php that causes a small amount of overhead
in ResourceLoader::__construct().

> MessageBlobStore failed to find skinname-fallback
> MessageBlobStore failed to find skinname-apioutput

Change-Id: Idaacf718703883c6a7e83a17ccd3f41ebdca53d1
This commit is contained in:
Timo Tijhof 2015-12-18 14:03:53 -08:00 committed by Bartosz Dziewoński
parent 92a481e8a2
commit 6b758fc982
3 changed files with 0 additions and 49 deletions

View file

@ -106,8 +106,6 @@ class SpecialJavaScriptTest extends SpecialPage {
return;
}
$out->addModules( 'mediawiki.special.javaScriptTest' );
$method = 'view' . ucfirst( $framework );
$this->$method();
$out->setPageTitle( $this->msg(

View file

@ -1866,16 +1866,6 @@ return array(
'mediawiki.special.watchlist' => array(
'scripts' => 'resources/src/mediawiki.special/mediawiki.special.watchlist.js',
),
'mediawiki.special.javaScriptTest' => array(
'scripts' => 'resources/src/mediawiki.special/mediawiki.special.javaScriptTest.js',
'messages' => array_merge( Skin::getSkinNameMessages(), array(
'colon-separator',
'javascripttest-pagetext-skins',
) ),
'dependencies' => 'mediawiki.Uri',
'position' => 'top',
'targets' => array( 'desktop', 'mobile' ),
),
'mediawiki.special.version' => array(
'styles' => 'resources/src/mediawiki.special/mediawiki.special.version.css',
),

View file

@ -1,37 +0,0 @@
/*!
* JavaScript for Special:JavaScriptTest
*/
( function ( mw, $ ) {
$( function () {
// Create useskin dropdown menu and reload onchange to the selected skin
// (only if a framework was found, not on error pages).
$( '#mw-javascripttest-summary' ).append( function () {
var $html = $( '<p><label for="useskin">'
+ mw.message( 'javascripttest-pagetext-skins' ).escaped()
+ ' '
+ '</label></p>' ),
select = '<select name="useskin" id="useskin">';
// Build <select> further
$.each( mw.config.get( 'wgAvailableSkins' ), function ( id ) {
select += '<option value="' + id + '"'
+ ( mw.config.get( 'skin' ) === id ? ' selected="selected"' : '' )
+ '>' + mw.message( 'skinname-' + id ).escaped() + '</option>';
} );
select += '</select>';
// Bind onchange event handler and append to form
$html.append(
$( select ).change( function () {
var url = new mw.Uri();
location.href = url.extend( { useskin: $( this ).val() } );
} )
);
return $html;
} );
} );
}( mediaWiki, jQuery ) );