// The testrunner configures QUnit and essentially depends on it. However, test suites
// are reusable in environments that preload QUnit (or a compatibility interface to
// another framework). Therefore we have to load it ourselves.
- $out->addHtml( Html::inlineScript(
- ResourceLoader::makeLoaderConditionalScript(
- Xml::encodeJsCall( 'mw.loader.using', array(
- array( 'jquery.qunit', 'jquery.qunit.completenessTest' ),
- new XmlJsCode(
- 'function () {' . Xml::encodeJsCall( 'mw.loader.load', array( $modules ) ) . '}'
- )
- ) )
- )
+ $out->addHtml( ResourceLoader::makeInlineScript(
+ Xml::encodeJsCall( 'mw.loader.using', array(
+ array( 'jquery.qunit', 'jquery.qunit.completenessTest' ),
+ new XmlJsCode(
+ 'function () {' . Xml::encodeJsCall( 'mw.loader.load', array( $modules ) ) . '}'
+ )
+ ) )
) );
}
// writes a script tag (the one loading mediawiki.js). Script tags are synchronous, block
// each other, and run in order. But they don't nest. The code appended after the startup
// module runs before the added script tag is parsed and executed.
- echo Xml::encodeJsCall( 'document.write', array( Html::inlineScript( $code ) ) );
+ echo Xml::encodeJsCall( 'document.write', array( Html::inlineScript( $code ) ) );
}
private function plainQUnit() {