Skip to content

Commit

Permalink
fix async loading select test issue where keepnative isn't defined in…
Browse files Browse the repository at this point in the history
… time for the leading test
  • Loading branch information
johnbender committed Jan 4, 2012
1 parent 9507389 commit b47d9ba
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 4 additions & 0 deletions tests/unit/select/defineKeepNative.js
@@ -0,0 +1,4 @@
$(document).bind("mobileinit", function() {
$.mobile.page.prototype.options.keepNative = "select.should-be-native";
});

3 changes: 2 additions & 1 deletion tests/unit/select/index.html
Expand Up @@ -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" ],
[
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/select/select_core.js
Expand Up @@ -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") );
Expand Down

0 comments on commit b47d9ba

Please sign in to comment.