fix async loading select test issue where keepnative isn't defined in time for the leading test

This commit is contained in:
John Bender 2012-01-04 13:13:09 -08:00
parent 95073892f0
commit b47d9ba24e
3 changed files with 6 additions and 3 deletions

View file

@ -0,0 +1,4 @@
$(document).bind("mobileinit", function() {
$.mobile.page.prototype.options.keepNative = "select.should-be-native";
});

View file

@ -14,7 +14,8 @@
$.testHelper.asyncLoad([
[
"jquery.mobile.forms.select",
"jquery.mobile.forms.select.custom"
"jquery.mobile.forms.select.custom",
"defineKeepNative.js"
],
[ "jquery.mobile.init" ],
[

View file

@ -334,8 +334,6 @@
same(window.encodedValueIsDefined, true);
});
$.mobile.page.prototype.options.keepNative = "select.should-be-native";
// not testing the positive case here since's it's obviously tested elsewhere
test( "select elements in the keepNative set shouldn't be enhanced", function() {
ok( !$("#keep-native").parent().is("div.ui-btn") );