X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fspecials%2FSpecialJavaScriptTest.php;h=17c64c8edeaa9d8f7d793f6c8352e2692c7d28c6;hb=d214edb945494a882d72c588e07b47736f9075fd;hp=0e2e7db046215e6bb3662c7ca70ce3eed5987d53;hpb=75d8b6c6cd2b70d98242e1246678c12e973a5dfa;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/specials/SpecialJavaScriptTest.php b/includes/specials/SpecialJavaScriptTest.php index 0e2e7db046..17c64c8ede 100644 --- a/includes/specials/SpecialJavaScriptTest.php +++ b/includes/specials/SpecialJavaScriptTest.php @@ -134,12 +134,26 @@ class SpecialJavaScriptTest extends SpecialPage { // Catch exceptions (such as "dependency missing" or "unknown module") so that we // always start QUnit. Re-throw so that they are caught and reported as global exceptions // by QUnit and Karma. - $code .= '(function () {' - . 'var start = window.__karma__ ? window.__karma__.start : QUnit.start;' - . 'try {' - . 'mw.loader.using( ' . Xml::encodeJsVar( $modules ) . ' ).always( start );' - . '} catch ( e ) { start(); throw e; }' - . '}());'; + $modules = Xml::encodeJsVar( $modules ); + $code .= <<