diff --git a/tests/unit/dialog/dialog_events.js b/tests/unit/dialog/dialog_events.js index bdde626a..623fb08c 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 explicit theme ui-body-b'); + ok($('#foo-dialog').find( ":jqmData(role=header)" ).hasClass('ui-bar-a'), 'Expected header to inherit from $.mobile.page.prototype.options.headerTheme'); + ok($('#foo-dialog').find( ":jqmData(role=content)" ).hasClass('ui-body-d'), 'Expect content to inherit from $.mobile.page.prototype.options.contentTheme'); + ok($('#foo-dialog').find( ":jqmData(role=footer)" ).hasClass('ui-bar-a'), 'Expected footer to inherit from $.mobile.page.prototype.options.footerTheme'); + // close the dialog $(".ui-dialog").dialog("close"); }, 500); diff --git a/tests/unit/dialog/index.html b/tests/unit/dialog/index.html index 7e3a82f2..f250593d 100644 --- a/tests/unit/dialog/index.html +++ b/tests/unit/dialog/index.html @@ -6,6 +6,12 @@ jQuery Mobile Dialog Test Suite + @@ -25,15 +31,20 @@
-
+
-
-
+
+

Dialog

- foo +
+ foo +
+
+ footer +