diff --git a/tests/integration/panel/open-click-bubbling-tests.html b/tests/integration/panel/open-click-bubbling-tests.html index 9b74dca09e8..630dbe736c1 100644 --- a/tests/integration/panel/open-click-bubbling-tests.html +++ b/tests/integration/panel/open-click-bubbling-tests.html @@ -21,7 +21,7 @@ "widgets/panel", "widgets/page" ], - [ "init" ], + [ "jquery.mobile.init" ], [ "open_click_bubbling_core.js" ] diff --git a/tests/integration/panel/panel-stale-height-tests.html b/tests/integration/panel/panel-stale-height-tests.html new file mode 100644 index 00000000000..58a58acab97 --- /dev/null +++ b/tests/integration/panel/panel-stale-height-tests.html @@ -0,0 +1,43 @@ + + + + + + jQuery Mobile Panel Test Suite + + + + + + + + + + + + + + + + +
+ +
+
+

The panel

+
+ Open panel +
+ + diff --git a/tests/integration/panel/panel_stale_height_core.js b/tests/integration/panel/panel_stale_height_core.js new file mode 100644 index 00000000000..6461c531ac8 --- /dev/null +++ b/tests/integration/panel/panel_stale_height_core.js @@ -0,0 +1,26 @@ +asyncTest( "Closing a panel removes the modal's height from its inline CSS", function() { + var eventNs = ".closingAPanelRemovesModalsHeightFromItsInlineCSS", + panel = $( "#stale-height-panel" ), + link = $( "#stale-height-panel-link" ), + modal = $( ".ui-panel-dismiss" ); + + $.testHelper.detailedEventCascade([ + function() { + link.click(); + }, + { + panelopen: { src: panel, event: "panelopen" + eventNs + "1" } + }, + function() { + panel.panel( "close" ); + }, + { + panelclose: { src: panel, event: "panelclose" + eventNs + "2" } + }, + function() { + deepEqual( ( modal.attr( "style" ) || "" ).match( /height:\s*[0-9]/ ), null, + "style attribute does not include a height field" ); + start(); + } + ]); +});