r87970 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87969‎ | r87970 | r87971 >
Date:12:43, 13 May 2011
Author:krinkle
Status:resolved (Comments)
Tags:
Comment:
comparing colors cross-browser is Aweful. Turns out Opera normalizes to hexidecimal.. Using anoter property instead (margin-top). Thanks TestSwarm
Modified paths:
  • /trunk/phase3/resources/test/unit/mediawiki.util/mediawiki.util.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/test/unit/mediawiki.util/mediawiki.util.js
@@ -20,13 +20,12 @@
2121
2222 test( 'addCSS', function(){
2323
24 - var a = mw.util.addCSS( '#bodyContent { background-color: rgb(170, 255, 170); }' );
 24+ var a = mw.util.addCSS( '#bodyContent { margin-top: 5px; }' );
2525 ok( a, 'function works' );
2626 same( a.disabled, false, 'property "disabled" is available and set to false' );
2727
2828 var $b = $('#bodyContent');
29 - var match = $b.css('background-color').match(/rgb\(170,\s*255,\s*170\)/);
30 - ok( match && match.length === 1, 'Style color matches.' );
 29+ equals( $b.css('margin-top'), '5px', 'Added style properties are in effect.' );
3130
3231
3332 });

Follow-up revisions

RevisionCommit summaryAuthorDate
r87988Looks like even margin-top isn't save due to box model differences (ie. becom...krinkle15:28, 13 May 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r87938Remove unneeded parens in $.compareObject; Fix addCSS QUnit test for IE6 whic...krinkle23:03, 12 May 2011

Comments

#Comment by Krinkle (talk | contribs)   15:27, 13 May 2011

This is a follow-up ro r87938.

Status & tagging log