aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/datepicker/datepicker_options.js
diff options
context:
space:
mode:
authorMike Sherov <mike.sherov@gmail.com>2013-04-14 17:07:24 -0400
committerMike Sherov <mike.sherov@gmail.com>2013-04-14 17:07:24 -0400
commitb75e4f7d27eff1c5a40fe101cb34a0f806efaede (patch)
treec8e7f771267c49ca16c5041c989ee86f3710a19f /tests/unit/datepicker/datepicker_options.js
parent7c939aadf8c661f1230627d51bf1450f99effcc3 (diff)
downloadjquery-ui-b75e4f7d27eff1c5a40fe101cb34a0f806efaede.tar.gz
jquery-ui-b75e4f7d27eff1c5a40fe101cb34a0f806efaede.zip
Datepicker Tests: fix failing oldIE tests by creating new inputs to focus when necessary for focus tests.
Diffstat (limited to 'tests/unit/datepicker/datepicker_options.js')
-rw-r--r--tests/unit/datepicker/datepicker_options.js21
1 files changed, 11 insertions, 10 deletions
diff --git a/tests/unit/datepicker/datepicker_options.js b/tests/unit/datepicker/datepicker_options.js
index a763b2fda..a775a5302 100644
--- a/tests/unit/datepicker/datepicker_options.js
+++ b/tests/unit/datepicker/datepicker_options.js
@@ -95,8 +95,7 @@ asyncTest( "invocation", function() {
expect( isOldIE ? 25 : 29 );
function step0() {
- var input = $( "<input>" ).appendTo( "#qunit-fixture" ),
- inp = TestHelpers.datepicker.init( input ),
+ var inp = TestHelpers.datepicker.initNewInput(),
dp = $( "#ui-datepicker-div" );
button = inp.siblings( "button" );
@@ -114,8 +113,7 @@ asyncTest( "invocation", function() {
function step1() {
- var input = $( "<input>" ).appendTo( "#qunit-fixture" ),
- inp = TestHelpers.datepicker.init( input ),
+ var inp = TestHelpers.datepicker.initNewInput(),
dp = $( "#ui-datepicker-div" );
TestHelpers.datepicker.onFocus( inp, function() {
@@ -129,8 +127,10 @@ asyncTest( "invocation", function() {
}
function step2() {
- var input = $( "<input>" ).appendTo( "#qunit-fixture" ),
- inp = TestHelpers.datepicker.init( input, { showOn: "button", buttonText: "Popup" } ),
+ var inp = TestHelpers.datepicker.initNewInput({
+ showOn: "button",
+ buttonText: "Popup"
+ }),
dp = $( "#ui-datepicker-div" );
ok( !dp.is( ":visible" ), "Button - initially hidden" );
@@ -153,8 +153,7 @@ asyncTest( "invocation", function() {
}
function step3() {
- var input = $( "<input>" ).appendTo( "#qunit-fixture" ),
- inp = TestHelpers.datepicker.init( input, {
+ var inp = TestHelpers.datepicker.initNewInput({
showOn: "button",
buttonImageOnly: true,
buttonImage: "images/calendar.gif",
@@ -183,8 +182,10 @@ asyncTest( "invocation", function() {
}
function step4() {
- var input = $( "<input>" ).appendTo( "#qunit-fixture" ),
- inp = TestHelpers.datepicker.init( input, { showOn: "both", buttonImage: "images/calendar.gif"} ),
+ var inp = TestHelpers.datepicker.initNewInput({
+ showOn: "both",
+ buttonImage: "images/calendar.gif"
+ }),
dp = $( "#ui-datepicker-div" );
ok( !dp.is( ":visible" ), "Both - initially hidden" );