Skip to content

Commit 54e9cc6

Browse files
committed
test list view parent theme inheritance
1 parent db2782b commit 54e9cc6

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

tests/unit/listview/index.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,12 @@ <h1>Basic List View</h1>
299299
</ul>
300300
</div>
301301

302+
<div id="list-theme-inherit" data-nstest-theme="b">
303+
<ul data-nstest-role="listview">
304+
<li>foo</li>
305+
</ul>
306+
</div>
307+
302308
<div data-nstest-role="page" id="ui-li-has-test">
303309
<div data-nstest-role="content">
304310
<p>Right padding on item 1 is OK (75px).</p>

tests/unit/listview/listview_core.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,4 +764,21 @@
764764
}
765765
]);
766766
});
767+
768+
769+
asyncTest( "list inherits theme from parent", function() {
770+
$.testHelper.pageSequence([
771+
function() {
772+
$.testHelper.openPage("#list-theme-inherit");
773+
},
774+
775+
function() {
776+
var theme = $.mobile.activePage.jqmData('theme');
777+
ok( $.mobile.activePage.find("ul > li").hasClass("ui-body-b"), "theme matches the parent");
778+
window.history.back();
779+
},
780+
781+
start
782+
]);
783+
});
767784
})(jQuery);

0 commit comments

Comments
 (0)