Tests: Update domEqual() to work with jQuery git

jQuery now returns `null` for empty attributes instead of `undefined`.

Ref gh-1516

(cherry picked from commit e4363ab82d)
This commit is contained in:
Scott González 2015-03-23 18:37:03 -04:00
parent 6fd43da409
commit 1ca46175d5

View File

@ -301,11 +301,11 @@ window.domEqual = function( selector, modifier, message ) {
result = {};
$.each( properties, function( index, attr ) {
var value = elem.prop( attr );
result[ attr ] = value !== undefined ? value : "";
result[ attr ] = value != null ? value : "";
});
$.each( attributes, function( index, attr ) {
var value = elem.attr( attr );
result[ attr ] = value !== undefined ? value : "";
result[ attr ] = value != null ? value : "";
});
result.style = getElementStyles( elem[ 0 ] );
result.events = $._data( elem[ 0 ], "events" );