r109148 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109147‎ | r109148 | r109149 >
Date:14:21, 17 January 2012
Author:nikerabbit
Status:ok
Tags:i18nreview 
Comment:
Reset list of fonts before testing... one test still failing
Modified paths:
  • /trunk/extensions/WebFonts/tests/qunit/ext.webfonts.tests.js (modified) (history)

Diff [purge]

Index: trunk/extensions/WebFonts/tests/qunit/ext.webfonts.tests.js
@@ -8,6 +8,8 @@
99
1010 test( '-- Dynamic font loading', function() {
1111 expect( 7 );
 12+
 13+ mw.webfonts.fonts = [];
1214 var cssRulesLength = document.styleSheets.length;
1315 assertTrue( mw.webfonts.addFont( 'Lohit Devanagari' ) , 'Add the Lohit Devanagari font' );
1416 assertTrue( $.inArray( 'Lohit Devanagari', mw.webfonts.fonts ) >= 0 , 'Font loaded' );
@@ -22,6 +24,14 @@
2325 test( '-- Dynamic font loading based on lang attribute', function() {
2426 expect( 15 );
2527
 28+ mw.webfonts.fonts = [];
 29+ mw.config.set( {
 30+ wgLanguage: "en",
 31+ wgUserVariant: "en",
 32+ wgUserLanguage: "en",
 33+ wgPageContentLanguage: "en",
 34+ } );
 35+
2636 ok( $( 'body' ).append( "<p class='webfonts-testing-lang-attr'>Some Content</p>") );
2737 $testElement = $( 'p.webfonts-testing-lang-attr' )
2838 assertTrue( $testElement !== [], 'Test element added' ) ;
@@ -49,6 +59,7 @@
5060 test( '-- Dynamic font loading based on font-family style attribute', function() {
5161 expect( 14 )
5262
 63+ mw.webfonts.fonts = [];
5364 ok( $( 'body' ).append( "<p class='webfonts-testing-font-family-style'>Some Content</p>" ) );
5465 var $testElement = $( 'p.webfonts-testing-font-family-style' );
5566 assertTrue( $testElement !== [], 'Test element added' ) ;

Status & tagging log