diff options
Diffstat (limited to 'test/unit/deprecated.js')
-rw-r--r-- | test/unit/deprecated.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/unit/deprecated.js b/test/unit/deprecated.js new file mode 100644 index 000000000..0f77040c1 --- /dev/null +++ b/test/unit/deprecated.js @@ -0,0 +1,28 @@ +module("deprecated"); + +// Start jQuery.browser tests +if ( jQuery.browser && jQuery.uaMatch ) { + if ( jQuery.get && !isLocal ) { + asyncTest( "browser", function() { + jQuery.get( "data/ua.txt", function( data ) { + var uas = data.split( "\n" ); + expect( (uas.length - 1) * 2 ); + + jQuery.each(uas, function() { + var parts = this.split( "\t" ), + agent = parts[2], + ua; + + if ( agent ) { + ua = jQuery.uaMatch( agent ); + equal( ua.browser, parts[0], "browser (" + agent + ")" ); + equal( ua.version, parts[1], "version (" + agent + ")" ); + } + }); + + start(); + }); + }); + } +} +// End of jQuery.browser tests |