diff options
author | Scott González <scott.gonzalez@gmail.com> | 2013-11-20 11:14:19 -0500 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2013-11-20 11:14:27 -0500 |
commit | 6a74bf992944419caabc7adb8ec8ca758451f1d5 (patch) | |
tree | 20a6e626260f102332d808c28b31b1758cb4c7b2 /tests/unit/menu | |
parent | 1096f19f37d6075328509d62a4c2c6d6a53d4b37 (diff) | |
download | jquery-ui-6a74bf992944419caabc7adb8ec8ca758451f1d5.tar.gz jquery-ui-6a74bf992944419caabc7adb8ec8ca758451f1d5.zip |
Menu tests: Force line height to ensure we know how many items will be scrolled.
Diffstat (limited to 'tests/unit/menu')
-rw-r--r-- | tests/unit/menu/menu.html | 4 | ||||
-rw-r--r-- | tests/unit/menu/menu_events.js | 12 |
2 files changed, 10 insertions, 6 deletions
diff --git a/tests/unit/menu/menu.html b/tests/unit/menu/menu.html index a49c72a04..504d3f3cf 100644 --- a/tests/unit/menu/menu.html +++ b/tests/unit/menu/menu.html @@ -31,6 +31,10 @@ <style> .ui-menu { font-size: 15px; + line-height: 15px; + } + .ui-menu .ui-menu-item { + padding: 0; } #menu3 { height: 250px; diff --git a/tests/unit/menu/menu_events.js b/tests/unit/menu/menu_events.js index 9d74b4bbb..3f834fd66 100644 --- a/tests/unit/menu/menu_events.js +++ b/tests/unit/menu/menu_events.js @@ -389,15 +389,15 @@ asyncTest( "handle keyboard navigation on menu with scroll and without submenus" log( "keydown", true ); element.simulate( "keydown", { keyCode: $.ui.keyCode.PAGE_DOWN } ); - equal( logOutput(), "keydown,11", "Keydown PAGE_DOWN" ); + equal( logOutput(), "keydown,17", "Keydown PAGE_DOWN" ); log( "keydown", true ); element.simulate( "keydown", { keyCode: $.ui.keyCode.PAGE_DOWN } ); - equal( logOutput(), "keydown,22", "Keydown PAGE_DOWN" ); + equal( logOutput(), "keydown,34", "Keydown PAGE_DOWN" ); log( "keydown", true ); element.simulate( "keydown", { keyCode: $.ui.keyCode.PAGE_UP } ); - equal( logOutput(), "keydown,11", "Keydown PAGE_UP" ); + equal( logOutput(), "keydown,17", "Keydown PAGE_UP" ); log( "keydown", true ); element.simulate( "keydown", { keyCode: $.ui.keyCode.PAGE_UP } ); @@ -484,15 +484,15 @@ asyncTest( "handle keyboard navigation on menu with scroll and with submenus", f function menukeyboard3() { log( "keydown", true ); element.simulate( "keydown", { keyCode: $.ui.keyCode.PAGE_DOWN } ); - equal( logOutput(), "keydown,11", "Keydown PAGE_DOWN" ); + equal( logOutput(), "keydown,17", "Keydown PAGE_DOWN" ); log( "keydown", true ); element.simulate( "keydown", { keyCode: $.ui.keyCode.PAGE_DOWN } ); - equal( logOutput(), "keydown,22", "Keydown PAGE_DOWN" ); + equal( logOutput(), "keydown,27", "Keydown PAGE_DOWN" ); log( "keydown", true ); element.simulate( "keydown", { keyCode: $.ui.keyCode.PAGE_UP } ); - equal( logOutput(), "keydown,11", "Keydown PAGE_UP" ); + equal( logOutput(), "keydown,10", "Keydown PAGE_UP" ); log( "keydown", true ); element.simulate( "keydown", { keyCode: $.ui.keyCode.PAGE_UP } ); |