aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/unit/autocomplete/autocomplete_core.js8
-rw-r--r--tests/unit/autocomplete/autocomplete_events.js14
-rw-r--r--tests/unit/autocomplete/autocomplete_options.js10
-rw-r--r--tests/unit/dialog/dialog_events.js2
-rw-r--r--tests/unit/dialog/dialog_methods.js2
-rw-r--r--tests/unit/menu/menu_core.js4
-rw-r--r--tests/unit/menu/menu_events.js42
-rw-r--r--tests/unit/menu/menu_methods.js8
-rw-r--r--tests/unit/tabs/tabs_core.js40
pre { line-height: 125%; } td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; } td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; } .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
---
title: Creating A Servlet 3.0 Application
order: 3
layout: page
---

[[creating-a-servlet-3.0-application]]
= Creating a servlet 3.0 application

Servlet 3.0 introduces a `@WebServlet` annotation which can be used to
replace the traditional web.xml. The straightforward approach to create
a Vaadin application using servlet 3.0 annotations is to simply move
whatever is in web.xml to a custom servlet class (extends `VaadinServlet`)
and annotate it using `@WebServlet` and add `@WebInitParams` as needed. You
will end up with something like

[source,java]
....
@WebServlet(value = "/*", asyncSupported = true, initParams = {
  @WebInitParam(name = "ui", value = "com.example.MyUI"),
  @WebInitParam(name = "productionMode", value = "false")
})
public class MyServlet extends VaadinServlet {
}
....

The problem you will face sooner or later with both this approach as
well as using web.xml is that you will misspell some parameter name or
class name. Maybe you change the UI class name and the init parameter is
not automatically updated - and the head scratching and debugging
starts.

Vaadin 7.1 introduces two features which makes this a lot easier,
`@VaadinServletConfiguration` and automatic UI finding.

`@VaadinServletConfiguration` is a type safe, Vaadin version of
`@WebInitParam` which provides you with the option to select UI by
referring the UI class directly, toggle `productionMode` using a boolean
and more. The above example rewritten using `@VaadinServletConfiguration`
looks like:

[source,java]
....
@WebServlet(value = "/*", asyncSupported = true)
@VaadinServletConfiguration(productionMode = false, ui = MYUI.class)
public class MyServlet extends VaadinServlet {
}
....

Automatic UI finding takes this even one step further and allows you to
leave out `@VaadinServletConfiguration` completely if you define your
servlet class as a static inner class to your UI class. The above
example could therefore also be written as

[source,java]
....
public class MYUI extends UI {
    @WebServlet(value = "/*", asyncSupported = true)
    public static class Servlet extends VaadinServlet {
    }
....

For clarity the variant with `@VaadinServletConfiguration` is likely the
better option. Please do note that `@VaadinServletConfiguration` comes
with defaults for some parameters, most importantly
`legacyPropertyToStringMode`, which might be important if you are
migrating an older application.
iv class='ctx'> });
asyncTest( "disabled", function() {
@@ -133,7 +133,7 @@ asyncTest( "disabled", function() {
setTimeout(function() {
ok( menu.is( ":hidden" ) );
start();
- }, 50 );
+ });
});
test( "minLength", function() {
@@ -158,7 +158,7 @@ asyncTest( "minLength, exceed then drop below", function() {
equal( req.term, "12", "correct search term" );
setTimeout(function() {
res([ "item" ]);
- }, 1 );
+ });
}
}),
menu = element.autocomplete( "widget" );
@@ -172,7 +172,7 @@ asyncTest( "minLength, exceed then drop below", function() {
setTimeout(function() {
ok( menu.is( ":hidden" ), "menu is hidden after searches" );
start();
- }, 50 );
+ });
});
test( "minLength, exceed then drop below then exceed", function() {
diff --git a/tests/unit/dialog/dialog_events.js b/tests/unit/dialog/dialog_events.js
index 49b93bdd1..f4b353b8d 100644
--- a/tests/unit/dialog/dialog_events.js
+++ b/tests/unit/dialog/dialog_events.js
@@ -337,7 +337,7 @@ asyncTest("ensure dialog's container doesn't scroll on resize and focus", functi
equal($(window).scrollTop(), initialScroll, "scroll hasn't moved after focus moved to dialog");
element.dialog("destroy");
start();
- }, 500);
+ });
});
test("#5184: isOpen in dialogclose event is true", function() {
diff --git a/tests/unit/dialog/dialog_methods.js b/tests/unit/dialog/dialog_methods.js
index c449ad0d4..ea4a7002a 100644
--- a/tests/unit/dialog/dialog_methods.js
+++ b/tests/unit/dialog/dialog_methods.js
@@ -87,7 +87,7 @@ asyncTest("#9000: Dialog leaves broken event handler after close/destroy in cert
$( "#favorite-animal" ).focus();
ok( true, "close and destroy modal dialog before its really opened" );
start();
- }, 2 );
+ });
});
test("#4980: Destroy should place element back in original DOM position", function(){
diff --git a/tests/unit/menu/menu_core.js b/tests/unit/menu/menu_core.js
index f02f97fca..5be717a66 100644
--- a/tests/unit/menu/menu_core.js
+++ b/tests/unit/menu/menu_core.js
@@ -54,9 +54,9 @@ asyncTest( "#9532: Need a way in Menu to keep ui-state-active class on selected
element.menu( "focus", null, firstChild );
wrapper.addClass( "ui-state-active" );
setTimeout( function() {
- ok( wrapper.is( ".ui-state-active" ), "ui-state-active improperly removed" );
+ ok( wrapper.is( ".ui-state-active" ) );
start();
- }, 500 );
+ });
});
})( jQuery );
diff --git a/tests/unit/menu/menu_events.js b/tests/unit/menu/menu_events.js
index b1ade3b85..ad13de3b8 100644
--- a/tests/unit/menu/menu_events.js
+++ b/tests/unit/menu/menu_events.js
@@ -111,62 +111,66 @@ asyncTest( "handle focus of menu with active item", function() {
});
});
-asyncTest( "handle submenu auto collapse: mouseleave", function() {
+asyncTest( "handle submenu auto collapse: mouseleave, default markup", function() {
expect( 4 );
+ $.ui.menu.prototype.delay = 1;
var element = $( "#menu2" ).menu(),
event = $.Event( "mouseenter" );
function menumouseleave1() {
equal( element.find( "ul[aria-expanded='true']" ).length, 1, "first submenu expanded" );
element.menu( "focus", event, element.find( "li:nth-child(7) li:first" ) );
- setTimeout( menumouseleave2, 350 );
+ setTimeout( menumouseleave2, 25 );
}
function menumouseleave2() {
equal( element.find( "ul[aria-expanded='true']" ).length, 2, "second submenu expanded" );
element.find( "ul[aria-expanded='true']:first" ).trigger( "mouseleave" );
- setTimeout( menumouseleave3, 350 );
+ setTimeout( menumouseleave3, 25 );
}
function menumouseleave3() {
equal( element.find( "ul[aria-expanded='true']" ).length, 1, "second submenu collapsed" );
element.trigger( "mouseleave" );
- setTimeout( menumouseleave4, 350 );
+ setTimeout( menumouseleave4, 25 );
}
function menumouseleave4() {
equal( element.find( "ul[aria-expanded='true']" ).length, 0, "first submenu collapsed" );
+ $.ui.menu.prototype.delay = 300;
start();
}
element.find( "li:nth-child(7)" ).trigger( "mouseenter" );
- setTimeout( menumouseleave1, 350 );
+ setTimeout( menumouseleave1, 25 );
});
-asyncTest( "handle submenu auto collapse: mouseleave", function() {
+asyncTest( "handle submenu auto collapse: mouseleave, custom markup", function() {
expect( 4 );
+ $.ui.menu.prototype.delay = 1;
var element = $( "#menu5" ).menu({ menus: ".menu" }),
event = $.Event( "mouseenter" );
function menumouseleave1() {
equal( element.find( "div[aria-expanded='true']" ).length, 1, "first submenu expanded" );
element.menu( "focus", event, element.find( ":nth-child(7)" ).find( ".menu" ).eq( 0 ).children().eq( 0 ) );
- setTimeout( menumouseleave2, 350 );
+ setTimeout( menumouseleave2, 25 );
}
function menumouseleave2() {
equal( element.find( "div[aria-expanded='true']" ).length, 2, "second submenu expanded" );
element.find( "div[aria-expanded='true']:first" ).trigger( "mouseleave" );
- setTimeout( menumouseleave3, 350 );
+ setTimeout( menumouseleave3, 25 );
}
function menumouseleave3() {
equal( element.find( "div[aria-expanded='true']" ).length, 1, "second submenu collapsed" );
element.trigger( "mouseleave" );
- setTimeout( menumouseleave4, 350 );
+ setTimeout( menumouseleave4, 25 );
}
function menumouseleave4() {
equal( element.find( "div[aria-expanded='true']" ).length, 0, "first submenu collapsed" );
+ $.ui.menu.prototype.delay = 300;
start();
}
element.find( ":nth-child(7)" ).trigger( "mouseenter" );
- setTimeout( menumouseleave1, 350 );
+ setTimeout( menumouseleave1, 25 );
});
asyncTest( "handle keyboard navigation on menu without scroll and without submenus", function() {
@@ -251,7 +255,7 @@ asyncTest( "handle keyboard navigation on menu without scroll and with submenus"
element.simulate( "keydown", { keyCode: $.ui.keyCode.DOWN } );
element.simulate( "keydown", { keyCode: $.ui.keyCode.DOWN } );
equal( logOutput(), "keydown,1,2", "Keydown DOWN" );
- setTimeout( menukeyboard1, 50 );
+ setTimeout( menukeyboard1 );
});
element.focus();
@@ -274,8 +278,8 @@ asyncTest( "handle keyboard navigation on menu without scroll and with submenus"
setTimeout(function() {
equal( logOutput(), "keydown,1,2,3,4,0", "Keydown RIGHT (open submenu)" );
- setTimeout( menukeyboard2, 50 );
- }, 50 );
+ setTimeout( menukeyboard2 );
+ } );
}
function menukeyboard2() {
@@ -285,7 +289,7 @@ asyncTest( "handle keyboard navigation on menu without scroll and with submenus"
// re-open submenu
element.simulate( "keydown", { keyCode: $.ui.keyCode.RIGHT } );
- setTimeout( menukeyboard3, 50 );
+ setTimeout( menukeyboard3 );
}
function menukeyboard3() {
@@ -319,7 +323,7 @@ asyncTest( "handle keyboard navigation on menu without scroll and with submenus"
log( "keydown", true );
element.simulate( "keydown", { keyCode: $.ui.keyCode.SPACE } );
- setTimeout( menukeyboard4, 50 );
+ setTimeout( menukeyboard4 );
}
function menukeyboard4() {
@@ -344,9 +348,9 @@ asyncTest( "handle keyboard navigation on menu without scroll and with submenus"
log( "keydown", true );
element.simulate( "keydown", { keyCode: $.ui.keyCode.ENTER } );
- setTimeout( menukeyboard6, 50 );
- }, 50 );
- }, 50 );
+ setTimeout( menukeyboard6 );
+ } );
+ } );
}
function menukeyboard6() {
@@ -446,7 +450,7 @@ asyncTest( "handle keyboard navigation on menu with scroll and with submenus", f
element.simulate( "keydown", { keyCode: $.ui.keyCode.DOWN } );
element.simulate( "keydown", { keyCode: $.ui.keyCode.DOWN } );
equal( logOutput(), "keydown,1,2", "Keydown DOWN" );
- setTimeout( menukeyboard1, 50 );
+ setTimeout( menukeyboard1 );
});
element.focus();
diff --git a/tests/unit/menu/menu_methods.js b/tests/unit/menu/menu_methods.js
index ef8279018..1cc3ec179 100644
--- a/tests/unit/menu/menu_methods.js
+++ b/tests/unit/menu/menu_methods.js
@@ -11,19 +11,13 @@ module( "menu: methods", {
});
test( "destroy", function() {
- expect( 4 );
- domEqual( "#menu1", function() {
- $( "#menu1" ).menu().menu( "destroy" );
- });
+ expect( 2 );
domEqual( "#menu2", function() {
$( "#menu2" ).menu().menu( "destroy" );
});
domEqual( "#menu5", function() {
$( "#menu5").menu().menu( "destroy" );
});
- domEqual( "#menu6", function() {
- $( "#menu6" ).menu().menu( "destroy" );
- });
});
test( "enable/disable", function() {
diff --git a/tests/unit/tabs/tabs_core.js b/tests/unit/tabs/tabs_core.js
index 2d18a6f1a..ab3c81175 100644
--- a/tests/unit/tabs/tabs_core.js
+++ b/tests/unit/tabs/tabs_core.js
@@ -155,7 +155,7 @@ asyncTest( "keyboard support - LEFT, RIGHT, UP, DOWN, HOME, END, SPACE, ENTER",
panels = element.find( ".ui-tabs-panel" ),
keyCode = $.ui.keyCode;
- element.tabs( "instance" ).delay = 50;
+ element.tabs( "instance" ).delay = 1;
equal( tabs.filter( ".ui-state-focus" ).length, 0, "no tabs focused on init" );
tabs.eq( 0 ).simulate( "focus" );
@@ -208,7 +208,7 @@ asyncTest( "keyboard support - LEFT, RIGHT, UP, DOWN, HOME, END, SPACE, ENTER",
equal( tabs.eq( 0 ).attr( "aria-expanded" ), "true", "first tab has aria-expanded=true" );
equal( panels.eq( 0 ).attr( "aria-hidden" ), "false", "first panel has aria-hidden=false" );
- setTimeout( step2, 100 );
+ setTimeout( step2, 25 );
}
// left, home, space
@@ -246,7 +246,7 @@ asyncTest( "keyboard support - LEFT, RIGHT, UP, DOWN, HOME, END, SPACE, ENTER",
// SPACE activates, cancels delay
tabs.eq( 0 ).simulate( "keydown", { keyCode: keyCode.SPACE } );
- setTimeout( step3, 1 );
+ setTimeout( step3 );
}
// end, enter
@@ -273,7 +273,7 @@ asyncTest( "keyboard support - LEFT, RIGHT, UP, DOWN, HOME, END, SPACE, ENTER",
// ENTER activates, cancels delay
tabs.eq( 0 ).simulate( "keydown", { keyCode: keyCode.ENTER } );
- setTimeout( step4, 1 );
+ setTimeout( step4 );
}
// enter (collapse)
@@ -293,10 +293,10 @@ asyncTest( "keyboard support - LEFT, RIGHT, UP, DOWN, HOME, END, SPACE, ENTER",
equal( tabs.eq( 2 ).attr( "aria-expanded" ), "false", "third tab has aria-expanded=false" );
equal( panels.eq( 2 ).attr( "aria-hidden" ), "true", "third panel has aria-hidden=true" );
- setTimeout( start, 1 );
+ setTimeout( start );
}
- setTimeout( step1, 1 );
+ setTimeout( step1 );
});
// Navigation with CTRL and COMMAND (both behave the same)
@@ -311,7 +311,7 @@ $.each({
panels = element.find( ".ui-tabs-panel" ),
keyCode = $.ui.keyCode;
- element.tabs( "instance" ).delay = 50;
+ element.tabs( "instance" ).delay = 1;
equal( tabs.filter( ".ui-state-focus" ).length, 0, "no tabs focused on init" );
tabs.eq( 0 ).simulate( "focus" );
@@ -337,7 +337,7 @@ $.each({
equal( tabs.eq( 0 ).attr( "aria-expanded" ), "true", "first tab has aria-expanded=true" );
equal( panels.eq( 0 ).attr( "aria-hidden" ), "false", "first panel has aria-hidden=false" );
- setTimeout( step2, 100 );
+ setTimeout( step2, 25 );
}
// right
@@ -364,7 +364,7 @@ $.each({
equal( tabs.eq( 0 ).attr( "aria-expanded" ), "true", "first tab has aria-expanded=true" );
equal( panels.eq( 0 ).attr( "aria-hidden" ), "false", "first panel has aria-hidden=false" );
- setTimeout( step3, 100 );
+ setTimeout( step3, 25 );
}
// down (wrap)
@@ -387,7 +387,7 @@ $.each({
equal( tabs.eq( 0 ).attr( "aria-expanded" ), "true", "first tab has aria-expanded=true" );
equal( panels.eq( 0 ).attr( "aria-hidden" ), "false", "first panel has aria-hidden=false" );
- setTimeout( step4, 100 );
+ setTimeout( step4, 25 );
}
// up (wrap)
@@ -411,7 +411,7 @@ $.each({
equal( tabs.eq( 0 ).attr( "aria-expanded" ), "true", "first tab has aria-expanded=true" );
equal( panels.eq( 0 ).attr( "aria-hidden" ), "false", "first panel has aria-hidden=false" );
- setTimeout( step5, 100 );
+ setTimeout( step5, 25 );
}
// left
@@ -438,7 +438,7 @@ $.each({
equal( tabs.eq( 0 ).attr( "aria-expanded" ), "true", "first tab has aria-expanded=true" );
equal( panels.eq( 0 ).attr( "aria-hidden" ), "false", "first panel has aria-hidden=false" );
- setTimeout( step6, 100 );
+ setTimeout( step6, 25 );
}
// home
@@ -465,7 +465,7 @@ $.each({
equal( tabs.eq( 0 ).attr( "aria-expanded" ), "true", "first tab has aria-expanded=true" );
equal( panels.eq( 0 ).attr( "aria-hidden" ), "false", "first panel has aria-hidden=false" );
- setTimeout( step7, 100 );
+ setTimeout( step7, 25 );
}
// end
@@ -489,7 +489,7 @@ $.each({
equal( tabs.eq( 0 ).attr( "aria-expanded" ), "true", "first tab has aria-expanded=true" );
equal( panels.eq( 0 ).attr( "aria-hidden" ), "false", "first panel has aria-hidden=false" );
- setTimeout( step8, 100 );
+ setTimeout( step8, 25 );
}
// space
@@ -512,10 +512,10 @@ $.each({
equal( tabs.eq( 0 ).attr( "aria-expanded" ), "false", "first tab has aria-expanded=false" );
equal( panels.eq( 0 ).attr( "aria-hidden" ), "true", "first panel has aria-hidden=true" );
- setTimeout( start, 1 );
+ setTimeout( start );
}
- setTimeout( step1, 1 );
+ setTimeout( step1 );
});
});
@@ -567,7 +567,7 @@ asyncTest( "keyboard support - CTRL+UP, ALT+PAGE_DOWN, ALT+PAGE_UP", function()
equal( panels.eq( 2 ).attr( "aria-hidden" ), "true", "third panel has aria-hidden=true" );
panels.eq( 0 ).simulate( "focus" );
- setTimeout( step2, 1 );
+ setTimeout( step2 );
}
function step2() {
@@ -596,7 +596,7 @@ asyncTest( "keyboard support - CTRL+UP, ALT+PAGE_DOWN, ALT+PAGE_UP", function()
equal( panels.eq( 2 ).attr( "aria-hidden" ), "true", "third panel has aria-hidden=true" );
panels.eq( 1 ).simulate( "focus" );
- setTimeout( step3, 1 );
+ setTimeout( step3 );
}
function step3() {
@@ -605,10 +605,10 @@ asyncTest( "keyboard support - CTRL+UP, ALT+PAGE_DOWN, ALT+PAGE_UP", function()
panels.eq( 1 ).simulate( "keydown", { keyCode: keyCode.UP, ctrlKey: true } );
strictEqual( document.activeElement, tabs[ 1 ], "second tab is activeElement" );
- setTimeout( start, 1 );
+ setTimeout( start );
}
- setTimeout( step1, 1 );
+ setTimeout( step1 );
});
test( "#3627 - Ajax tab with url containing a fragment identifier fails to load", function() {
diff --git a/tests/unit/tabs/tabs_methods.js b/tests/unit/tabs/tabs_methods.js
index a3d663f27..073430b77 100644
--- a/tests/unit/tabs/tabs_methods.js
+++ b/tests/unit/tabs/tabs_methods.js
@@ -206,7 +206,7 @@ asyncTest( "load", function() {
strictEqual( uiPanel[ 0 ], panel[ 0 ], "panel" );
equal( uiPanel.find( "p" ).length, 1, "panel html" );
state( element, 1, 0, 0, 0, 0 );
- setTimeout( tabsload1, 100 );
+ setTimeout( tabsload1 );
});
element.tabs( "load", 3 );
state( element, 1, 0, 0, 0, 0 );
@@ -218,7 +218,7 @@ asyncTest( "load", function() {
});
element.one( "tabsload", function() {
ok( true, "tabsload invoked" );
- setTimeout( tabsload2, 100 );
+ setTimeout( tabsload2 );
});
element.tabs( "option", "active", 3 );
state( element, 0, 0, 0, 1, 0 );
diff --git a/tests/unit/tabs/tabs_options.js b/tests/unit/tabs/tabs_options.js
index 7f5352bac..56e32b7da 100644
--- a/tests/unit/tabs/tabs_options.js
+++ b/tests/unit/tabs/tabs_options.js
@@ -347,7 +347,7 @@ asyncTest( "hide and show - animation", function() {
equal( options, "drop", "correct options in _show()" );
setTimeout(function() {
callback();
- }, 1 );
+ });
};
widget._hide = function( element, options, callback ) {
strictEqual( element[ 0 ], panels[ 0 ], "correct element in _hide()" );
@@ -355,7 +355,7 @@ asyncTest( "hide and show - animation", function() {
setTimeout(function() {
callback();
start();
- }, 1 );
+ });
};
ok( panels.eq( 0 ).is( ":visible" ), "first panel visible" );