Index: trunk/phase3/resources/test/unit/mediawiki.util/mediawiki.util.js |
— | — | @@ -25,7 +25,9 @@ |
26 | 26 | same( a.disabled, false, 'property "disabled" is available and set to false' ); |
27 | 27 | |
28 | 28 | var $b = $('#bodyContent'); |
29 | | - equals( $b.css('background-color'), 'rgb(170, 255, 170)', 'Style color matches.' ); |
| 29 | + var match = $b.css('background-color').match(/rgb\(170,\s*255,\s*170\)/); |
| 30 | + ok( match && match.length === 1, 'Style color matches.' ); |
| 31 | + |
30 | 32 | |
31 | 33 | }); |
32 | 34 | |
Index: trunk/phase3/resources/mediawiki/mediawiki.js |
— | — | @@ -57,10 +57,10 @@ |
58 | 58 | compareObject : function( objectA, objectB ) { |
59 | 59 | |
60 | 60 | // Do a simple check if the types match |
61 | | - if ( typeof( objectA ) == typeof( objectB ) ) { |
| 61 | + if ( typeof objectA == typeof objectB ) { |
62 | 62 | |
63 | 63 | // Only loop over the contents if it really is an object |
64 | | - if ( typeof( objectA ) == 'object' ) { |
| 64 | + if ( typeof objectA == 'object' ) { |
65 | 65 | // If they are aliases of the same object (ie. mw and mediaWiki) return now |
66 | 66 | if ( objectA === objectB ) { |
67 | 67 | return true; |
— | — | @@ -71,8 +71,8 @@ |
72 | 72 | // Check if this property is also present in the other object |
73 | 73 | if ( prop in objectB ) { |
74 | 74 | // Compare the types of the properties |
75 | | - var type = typeof( objectA[prop] ); |
76 | | - if ( type == typeof( objectB[prop] ) ) { |
| 75 | + var type = typeof objectA[prop]; |
| 76 | + if ( type == typeof objectB[prop] ) { |
77 | 77 | // Recursively check objects inside this one |
78 | 78 | switch ( type ) { |
79 | 79 | case 'object' : |