Index: trunk/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.test.js |
— | — | @@ -169,6 +169,23 @@ |
170 | 170 | }); |
171 | 171 | }); |
172 | 172 | |
| 173 | +test( 'mw.loader.bug30825', function() { |
| 174 | + // This bug was actually already fixed in 1.18 and later when discovered in 1.17. |
| 175 | + // Test is for regressions! |
| 176 | + |
| 177 | + expect(1); |
| 178 | + |
| 179 | + // Confirm that mw.loader.load() works with protocol-relative URLs |
| 180 | + var loc = window.location, |
| 181 | + base = ('//' + loc.hostname + loc.pathname).replace(/\/[^\/]*$/, ''), |
| 182 | + target = base + '/suites/resources/mediawiki/mediawiki.test.bug30825.js'; |
| 183 | + |
| 184 | + // Async! Include a timeout, as failure in this test leads to neither the |
| 185 | + // success nor failure callbacks getting called. |
| 186 | + stop(5000); |
| 187 | + mw.loader.load( target ); |
| 188 | +}); |
| 189 | + |
173 | 190 | test( 'mw.html', function() { |
174 | 191 | expect(11); |
175 | 192 | |
Index: trunk/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.test.bug30825.js |
— | — | @@ -0,0 +1,2 @@ |
| 2 | +start(); |
| 3 | +ok( true, "Bug 30825 -- protocol-relative URL script load via mw.loader.load"); |
Property changes on: trunk/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.test.bug30825.js |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 4 | + native |