r109356 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109355‎ | r109356 | r109357 >
Date:11:39, 18 January 2012
Author:santhosh
Status:ok
Tags:i18nreview 
Comment:
Correct the testcases that were failing in r109334
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
@@ -4,6 +4,7 @@
55 expect(1);
66
77 ok( mw.webfonts, 'mw.webfonts is defined' );
 8+
89 } );
910
1011 test( '-- Web font application to body', function() {
@@ -33,14 +34,14 @@
3435 assertTrue( $textareaElement !== [], 'The textarea test element is defined' );
3536
3637 ok( mw.webfonts.set( teluguFont ), 'Attempted to load a Telugu font for the whole page' );
37 - var fallbackFonts = 'Helvetica,Arial,sans-serif';
 38+ var fallbackFonts = 'Helvetica, Arial, sans-serif';
3839 deepEqual( oldConfig, mw.webfonts.oldconfig, 'Previous body css was saved properly' );
3940
4041 // Font application
41 - equal( $body.css( 'font-family' ), '"' + teluguFont + '",' + fallbackFonts, 'The web font was applied to font-family of body' );
42 - equal( $inputElement.css( 'font-family' ), '"' + teluguFont + '",' + fallbackFonts, 'The web font was applied to font-family of input' );
43 - equal( $selectElement.css( 'font-family' ), '"' + teluguFont + '",' + fallbackFonts, 'The web font was applied to font-family of select' );
44 - equal( $textareaElement.css( 'font-family' ), '"' + teluguFont + '",' + fallbackFonts, 'The web font was applied to font-family of textarea' );
 42+ equal( $body.css( 'font-family' ), "'" + teluguFont + "', " + fallbackFonts, 'The web font was applied to font-family of body' );
 43+ equal( $inputElement.css( 'font-family' ), "'" + teluguFont + "', " + fallbackFonts, 'The web font was applied to font-family of input' );
 44+ equal( $selectElement.css( 'font-family' ), "'" + teluguFont + "', " + fallbackFonts, 'The web font was applied to font-family of select' );
 45+ equal( $textareaElement.css( 'font-family' ), "'" '"' + teluguFont + "', " + fallbackFonts, 'The web font was applied to font-family of textarea' );
4546
4647 // Restore <body>
4748 $body.attr( 'lang', bodyLang );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r109334Added tests for application of web fonts to body, input, select and textarea.amire8007:31, 18 January 2012

Status & tagging log