Skip to content

Commit

Permalink
test for many class additions with many resolution breakpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbender committed Nov 19, 2010
1 parent 622eba4 commit 232926f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/unit/media/media_core.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,27 @@
});

test( "window widths smaller than the break points set max-width classes", function(){
expect( 1 );
$.fn.width = function(){ return 120; };

$.mobile.addResolutionBreakpoints([125]);
ok($('html').hasClass('max-width-125px'));
});

test( "window widths larger than the break points set min-width classes", function(){
expect( 1 );
$.fn.width = function(){ return 1900; };

$.mobile.addResolutionBreakpoints([125]);
ok($('html').hasClass('min-width-125px'));
});

test( "many break points result in many class additions", function(){
expect( 2 );
$.fn.width = function(){ return 1900; };
$.mobile.addResolutionBreakpoints([1, 2]);

ok($('html').hasClass('min-width-1px'));
ok($('html').hasClass('min-width-2px'));
});
})(jQuery);

0 comments on commit 232926f

Please sign in to comment.