Commit 2c14b00a authored by Aditya Raghavan's avatar Aditya Raghavan Committed by Oleg Gaidarenko

Event: add test for window scrollTop/Left logic in iframes

Ref d21edb599d8f5f80a3f3ecba5b62311b9cd1a3e6
parent 6bc0e508
...@@ -547,4 +547,19 @@ test("fractions (see #7730 and #7885)", function() { ...@@ -547,4 +547,19 @@ test("fractions (see #7730 and #7885)", function() {
div.remove(); div.remove();
}); });
test("iframe scrollTop/Left (see gh-1945)", function() {
expect( 2 );
// Tests scrollTop/Left with iframes
var ifDoc = jQuery( "#iframe" )[ 0 ].contentDocument;
jQuery( "#iframe" ).css( "width", "50px" ).css( "height", "50px" );
ifDoc.write( "<div style='width: 1000px; height: 1000px;'></div>" );
jQuery( ifDoc ).scrollTop( 200 );
jQuery( ifDoc ).scrollLeft( 500 );
equal( jQuery( ifDoc ).scrollTop(), 200, "$($('#iframe')[0].contentDocument).scrollTop()" );
equal( jQuery( ifDoc ).scrollLeft(), 500, "$($('#iframe')[0].contentDocument).scrollLeft()" );
});
})(); })();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment