diff --git a/tests/unit/dialog/dialog_events.js b/tests/unit/dialog/dialog_events.js index bdde626a..916aa414 100644 --- a/tests/unit/dialog/dialog_events.js +++ b/tests/unit/dialog/dialog_events.js @@ -5,13 +5,20 @@ module('jquery.mobile.dialog.js'); asyncTest( "dialog hash is added when the dialog is opened and removed when closed", function(){ - expect( 2 ); + expect( 6 ); //bring up the dialog $("a[href='#foo-dialog']").click(); setTimeout(function(){ ok(/&ui-state=dialog/.test(location.hash), "ui-state=dialog =~ location.hash"); + + // Assert dialog theme inheritance (issue 1375): + ok($('#foo-dialog').hasClass('ui-body-b'), 'Expected theme ui-body-b'); + ok($('#foo-dialog').find( ":jqmData(role=header)" ).hasClass('ui-bar-b'), 'Expected header theme inherited from parent ui-bar-b'); + ok($('#foo-dialog').find( ":jqmData(role=content)" ).hasClass('ui-body-b'), 'Expect content inheritance from dialog theme ui-body-b'); + ok($('#foo-dialog').find( ":jqmData(role=footer)" ).hasClass('ui-bar-c'), 'Expected footer theme ui-bar-c'); + // close the dialog $(".ui-dialog").dialog("close"); }, 500); diff --git a/tests/unit/dialog/index.html b/tests/unit/dialog/index.html index 7e3a82f2..665c4d6d 100644 --- a/tests/unit/dialog/index.html +++ b/tests/unit/dialog/index.html @@ -25,15 +25,20 @@
-
+
-
-
+
+

Dialog

- foo +
+ foo +
+
+ footer +