]> source.dussan.org Git - jquery-ui.git/commitdiff
Menu tests: Force line height to ensure we know how many items will be scrolled.
authorScott González <scott.gonzalez@gmail.com>
Wed, 20 Nov 2013 16:14:19 +0000 (11:14 -0500)
committerScott González <scott.gonzalez@gmail.com>
Wed, 20 Nov 2013 16:14:27 +0000 (11:14 -0500)
tests/unit/menu/menu.html
tests/unit/menu/menu_events.js

index a49c72a04fb2ebea38a6266126b2ef3434dad3cd..504d3f3cf2673c4bd067ef2edcbf5d6a8579bc24 100644 (file)
        <style>
        .ui-menu {
                font-size: 15px;
+               line-height: 15px;
+       }
+       .ui-menu .ui-menu-item {
+               padding: 0;
        }
        #menu3 {
                height: 250px;
index 9d74b4bbb762551aed58a223cfecd9b3b6fd22f4..3f834fd6628d9dfc4d68e7d2b572619f28d2242c 100644 (file)
@@ -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 } );