mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-04-22 23:24:43 +00:00
slider enhanceWith tests
This commit is contained in:
parent
404010839d
commit
ec2c015136
2 changed files with 16 additions and 3 deletions
|
|
@ -16,6 +16,7 @@
|
|||
<script src="../../../external/qunit.js"></script>
|
||||
|
||||
<script src="slider_events.js"></script>
|
||||
<script src="slider_core.js"></script>
|
||||
|
||||
<script src="../swarminject.js"></script>
|
||||
</head>
|
||||
|
|
@ -60,9 +61,10 @@
|
|||
<input type="range" name="onchange" id="onchange" value="25" min="0" max="100" step="10" onchange="onChangeCounter()" data-nstest-theme="b" data-nstest-track-theme="a" />
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div data-role="fieldcontain">
|
||||
<label for="slider">Input slider:</label>
|
||||
<input type="range" name="slider" id="slider" value="25" min="0" max="100" class="should-be-native"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="enhancetest">
|
||||
|
|
|
|||
11
tests/unit/slider/slider_core.js
Normal file
11
tests/unit/slider/slider_core.js
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
* mobile slider unit tests
|
||||
*/
|
||||
(function($){
|
||||
$.mobile.page.prototype.options.keepNative = "input.should-be-native";
|
||||
|
||||
// not testing the positive case here since's it's obviously tested elsewhere
|
||||
test( "slider elements in the keepNative set shouldn't be enhanced", function() {
|
||||
same( $("input.should-be-native").siblings("div.ui-slider").length, 0 );
|
||||
});
|
||||
})( jQuery );
|
||||
Loading…
Reference in a new issue