r109551 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109550‎ | r109551 | r109552 >
Date:16:57, 19 January 2012
Author:amire80
Status:ok
Tags:
Comment:
A little less illogical test for unsupported browser.
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
@@ -3,9 +3,10 @@
44 test( '-- Initial check', function() {
55 expect(1);
66
7 -
87 if ( !mw.webfonts.isBrowserSupported ) {
9 - ok( mw.webfonts === undefined, 'mw.webfonts is not defined because we are running in a blacklisted browser' );
 8+ // TODO: need a better way to test this
 9+ ok( mw.webfonts, 'The WebFonts extension is not supposed to run in a blacklisted browser - '
 10+ + navigator.appName + ' ' + navigator.userAgent );
1011 } else {
1112 ok( mw.webfonts, 'mw.webfonts is defined and the browser is supported' );
1213 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r109454Added function browserIsBlacklisted, to avoid running tests on blacklisted br...amire8023:24, 18 January 2012

Status & tagging log