Skip to content

Commit c4491d2

Browse files
author
scottjehl
committed
fixed unit tests to use new orientationchange logic, which no longer binds to resize event.
1 parent ee424f5 commit c4491d2

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

tests/unit/media/media_core.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,29 +68,26 @@
6868
});
6969
});
7070

71-
test( "binds remove of portrait and landscape classes resize/orientation fired", function(){
72-
expect( 2 );
71+
test( "binds remove of portrait and landscape classes orientation fired", function(){
72+
expect( 1 );
7373

7474
$.Event.prototype.orientation = "foo";
7575

76-
$(window).bind("orientationchange.htmlclass resize.htmlclass", function(event){
76+
$(window).bind("orientationchange.htmlclass", function(event){
7777
ok(!$("html").hasClass("portrait landscape"));
7878
start();
7979
});
8080

81-
$("html").addClass("portrait landscape");
82-
$(window).trigger("resize.htmlclass");
83-
8481
$("html").addClass("portrait landscape");
8582
$(window).trigger("orientationchange.htmlclass");
8683
stop();
8784
});
8885

89-
test( "sets break point class additions on resize/orientation change", function(){
86+
test( "sets break point class additions on orientation change", function(){
9087
$.fn.width = function(){ return 1900; };
9188

9289
$("html").removeClass("min-width-320px");
93-
$(window).trigger("resize.htmlclass");
90+
$(window).trigger("orientationchange.htmlclass");
9491
ok($("html").hasClass("min-width-320px"));
9592
});
9693
})(jQuery);

0 commit comments

Comments
 (0)