From: Timo Tijhof Date: Sat, 12 May 2012 23:14:48 +0000 (+0200) Subject: Fix qunit failure when run from https://intergration.. X-Git-Tag: 1.31.0-rc.0~23625 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22suivi_revisions%22%2C%22id_auteur=%24connecte%22%29%20.%20%22?a=commitdiff_plain;h=a3ac0eb68fd5d37ea6beef9de6f2777edcbb2c3f;p=lhc%2Fweb%2Fwiklou.git Fix qunit failure when run from https://intergration.. Change-Id: Ibc42bb34aae4af1fc472ac1f02056842d6a23f88 --- diff --git a/tests/qunit/suites/resources/mediawiki/mediawiki.Uri.test.js b/tests/qunit/suites/resources/mediawiki/mediawiki.Uri.test.js index 552e69e303..b834aeb6f3 100644 --- a/tests/qunit/suites/resources/mediawiki/mediawiki.Uri.test.js +++ b/tests/qunit/suites/resources/mediawiki/mediawiki.Uri.test.js @@ -3,10 +3,11 @@ module( 'mediawiki.Uri', QUnit.newMwEnvironment() ); test( '-- Initial check', function () { expect( 2 ); - // Ensure we have a generic URI parser if not running in a browser - if ( !mw.Uri ) { - mw.Uri = mw.UriRelative( 'http://example.com/' ); - } + // Ensure we have a generic mw.Uri constructor. By default mediawiki.uri, + // will use the currrent window ocation as base. But for testing we need + // to have a generic one, so that it doens't return false negatives if + // we run the test suite from an https server. + mw.Uri = mw.UriRelative( 'http://example.org/w/index.php' ); ok( mw.UriRelative, 'mw.UriRelative defined' ); ok( mw.Uri, 'mw.Uri defined' );