mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-03-16 22:10:25 +00:00
added unit test for IE version check in Mobile ( doesn't use UA detection like jQuery Core's)
This commit is contained in:
parent
b2ea5e99e5
commit
4c199a5ce6
1 changed files with 17 additions and 0 deletions
|
|
@ -69,6 +69,23 @@ $.testHelper.excludeFileProtocol(function(){
|
|||
$.testHelper.reloadLib(libName);
|
||||
ok(!$.support.dynamicBaseTag);
|
||||
});
|
||||
|
||||
test( "jQM's IE browser check properly detects IE versions", function(){
|
||||
$.testHelper.reloadLib(libName);
|
||||
|
||||
//here we're just comparing our version to what the conditional compilation finds
|
||||
var ie = !!$.browser.msie, //get a boolean
|
||||
version = parseInt( $.browser.version, 10),
|
||||
jqmdetectedver = $.mobile.browser.ie;
|
||||
|
||||
if( ie ){
|
||||
same(version, jqmdetectedver, "It's IE and the version is correct");
|
||||
}
|
||||
else{
|
||||
same(ie, jqmdetectedver, "It's not IE");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
//TODO propExists testing, refactor propExists into mockable method
|
||||
//TODO scrollTop testing, refactor scrollTop logic into mockable method
|
||||
|
|
|
|||
Loading…
Reference in a new issue