Skip to content

Commit c1bd079

Browse files
committed
test for keepnative on the select menu
1 parent 0e5583e commit c1bd079

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

tests/unit/select/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,10 @@ <h2 id="qunit-userAgent"></h2>
349349
<select name="encoded-option" id="encoded-option" data-nstest-native-menu="false">
350350
<option>&lt;script&gt;window.encodedValueIsDefined = true;&lt;/script&gt;</option>
351351
</select>
352+
353+
<select name="keep-native" id="keep-native" class="should-be-native">
354+
<option></option>
355+
</select>
352356
</div>
353357

354358

tests/unit/select/select_core.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,4 +334,10 @@
334334
same(window.encodedValueIsDefined, true);
335335
});
336336

337+
$.mobile.page.prototype.options.keepNative = "select.should-be-native";
338+
339+
// not testing the positive case here since's it's obviously tested elsewhere
340+
test( "select elements in the keepNative set shouldn't be enhanced", function() {
341+
ok( !$("#keep-native").parent().is("div.ui-btn") );
342+
});
337343
})(jQuery);

0 commit comments

Comments
 (0)