diff options
author | Mike Sherov <mike.sherov@gmail.com> | 2013-10-19 11:12:35 -0400 |
---|---|---|
committer | Mike Sherov <mike.sherov@gmail.com> | 2013-10-19 18:48:04 -0400 |
commit | 67fd40eda7a7f4a9e48afe09593c20bd0e0f9c6f (patch) | |
tree | e6ef0d4af2236b17128f6fdd5571dbae1a0332dd /tests/unit/testsuite.js | |
parent | 52307ebadbca3f403549140e1d34f08bc07bf8ce (diff) | |
download | jquery-ui-67fd40eda7a7f4a9e48afe09593c20bd0e0f9c6f.tar.gz jquery-ui-67fd40eda7a7f4a9e48afe09593c20bd0e0f9c6f.zip |
Tests: extract TestHelpers.forceScrollableWindow for tests that need the window to scroll
Diffstat (limited to 'tests/unit/testsuite.js')
-rw-r--r-- | tests/unit/testsuite.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/unit/testsuite.js b/tests/unit/testsuite.js index 83d69d2d9..13daa7e66 100644 --- a/tests/unit/testsuite.js +++ b/tests/unit/testsuite.js @@ -191,6 +191,13 @@ TestHelpers.onFocus= function( element, onFocus ) { element.bind( "focus", fn )[ 0 ].focus(); }; +TestHelpers.forceScrollableWindow = function( appendTo ) { + return $( "<div>" ).css({ + height: "10000px", + width: "10000px" + }).appendTo( appendTo || "#qunit-fixture" ); +}; + /* * Taken from https://github.com/jquery/qunit/tree/master/addons/close-enough */ |