Skip to content

Commit 5d25f78

Browse files
committed
Conditionally run height/width in iframeTest
1 parent 53a5810 commit 5d25f78

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

test/unit/dimensions.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,8 +430,13 @@ testIframe( "dimensions/documentSmall", "window vs. small document", function( j
430430
testIframe( "dimensions/documentLarge", "window vs. large document", function( jQuery, window, document ) {
431431
expect(2);
432432

433-
ok( jQuery( document ).height() > jQuery( window ).height(), "document height is larger than window height" );
434-
ok( jQuery( document ).width() > jQuery( window ).width(), "document width is larger than window width" );
433+
if ( jQuery.fn.height && jQuery.fn. width ) {
434+
expect(2);
435+
ok( jQuery( document ).height() > jQuery( window ).height(), "document height is larger than window height" );
436+
ok( jQuery( document ).width() > jQuery( window ).width(), "document width is larger than window width" );
437+
} else {
438+
expect(0);
439+
}
435440
});
436441

437442
}

0 commit comments

Comments
 (0)