compareObject : function( objectA, objectB ) {
// Do a simple check if the types match
- if ( typeof( objectA ) == typeof( objectB ) ) {
+ if ( typeof objectA == typeof objectB ) {
// Only loop over the contents if it really is an object
- if ( typeof( objectA ) == 'object' ) {
+ if ( typeof objectA == 'object' ) {
// If they are aliases of the same object (ie. mw and mediaWiki) return now
if ( objectA === objectB ) {
return true;
// Check if this property is also present in the other object
if ( prop in objectB ) {
// Compare the types of the properties
- var type = typeof( objectA[prop] );
- if ( type == typeof( objectB[prop] ) ) {
+ var type = typeof objectA[prop];
+ if ( type == typeof objectB[prop] ) {
// Recursively check objects inside this one
switch ( type ) {
case 'object' :
same( a.disabled, false, 'property "disabled" is available and set to false' );
var $b = $('#bodyContent');
- equals( $b.css('background-color'), 'rgb(170, 255, 170)', 'Style color matches.' );
+ var match = $b.css('background-color').match(/rgb\(170,\s*255,\s*170\)/);
+ ok( match && match.length === 1, 'Style color matches.' );
+
});