Krinkle has uploaded a new change for review. https://gerrit.wikimedia.org/r/156040
Change subject: startup: Update documentation and tests to reflect current practices ...................................................................... startup: Update documentation and tests to reflect current practices * Grade C doesn't exist any more, this is now called Grade B. * Update links to mediawiki.org and jquery.com. * Remove irrelevant link to jquerymobile.com. * Fix documentation stating the isCompatible() function is deleted after use, because it isn't (and never was). The code pretending to delete it was removed in d0259d497d7e76d. Change-Id: I4521521210778d9eea3959afcd62647410958305 --- M resources/src/startup.js M tests/qunit/suites/resources/startup.test.js 2 files changed, 8 insertions(+), 11 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/40/156040/1 diff --git a/resources/src/startup.js b/resources/src/startup.js index c481e98..a8aaab5 100644 --- a/resources/src/startup.js +++ b/resources/src/startup.js @@ -7,15 +7,14 @@ var mediaWikiLoadStart = ( new Date() ).getTime(); /** - * Returns false when run in a black-listed browser + * Returns false for Grade B supported browsers. * - * This function will be deleted after it's used, so do not expand it to be - * generally useful beyond startup. + * This function should only be used by the Startup module, do not expand it to + * be generally useful beyond startup. * * See also: - * - https://www.mediawiki.org/wiki/Compatibility#Browser - * - http://jquerymobile.com/gbs/ - * - http://jquery.com/browser-support/ + * - https://www.mediawiki.org/wiki/Compatibility#Browsers + * - https://jquery.com/browser-support/ */ /*jshint unused: false */ diff --git a/tests/qunit/suites/resources/startup.test.js b/tests/qunit/suites/resources/startup.test.js index 817354b..b63427e 100644 --- a/tests/qunit/suites/resources/startup.test.js +++ b/tests/qunit/suites/resources/startup.test.js @@ -1,7 +1,6 @@ /*global isCompatible: true */ ( function ( $ ) { var testcases = { - // Supported: Compatible gradeA: [ // Chrome 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.205 Safari/534.16', @@ -43,8 +42,7 @@ // Android 'Mozilla/5.0 (Linux; U; Android 2.1; en-us; Nexus One Build/ERD62) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17' ], - // Supported: Uncompatible, serve basic content - gradeC: [ + gradeB: [ // Internet Explorer < 7 'Mozilla/2.0 (compatible; MSIE 3.03; Windows 3.1)', 'Mozilla/4.0 (compatible; MSIE 4.01; Windows 95)', @@ -123,8 +121,8 @@ ); } ); - QUnit.test( 'isCompatible( Grade C )', testcases.gradeC.length, function ( assert ) { - $.each( testcases.gradeC, function ( i, ua ) { + QUnit.test( 'isCompatible( Grade B )', testcases.gradeB.length, function ( assert ) { + $.each( testcases.gradeB, function ( i, ua ) { assert.strictEqual( isCompatible( ua ), false, ua ); } ); -- To view, visit https://gerrit.wikimedia.org/r/156040 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I4521521210778d9eea3959afcd62647410958305 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Krinkle <krinklem...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits