Fixed #2037 where Opera would mis-state the value of 'display' after an innerHTML...
[jquery.git] / test / unit / core.js
index a6ae6e4..088726f 100644 (file)
@@ -420,7 +420,7 @@ test("css(String|Hash)", function() {
 });
 
 test("css(String, Object)", function() {
-       expect(20);
+       expect(21);
        ok( $('#foo').is(':visible'), 'Modifying CSS display: Assert element is visible');
        $('#foo').css('display', 'none');
        ok( !$('#foo').is(':visible'), 'Modified CSS display: Assert element is hidden');
@@ -454,6 +454,10 @@ test("css(String, Object)", function() {
        var j = $("#nonnodes").contents();
        j.css("padding-left", "1px");
        equals( j.css("padding-left"), "1px", "Check node,textnode,comment css works" );
+
+       // opera sometimes doesn't update 'display' correctly, see #2037
+       $("#t2037")[0].innerHTML = $("#t2037")[0].innerHTML
+       equals( $("#t2037 .hidden").css("display"), "none", "Make sure browser thinks it is hidden" );
 });
 
 test("jQuery.css(elem, 'height') doesn't clear radio buttons (bug #1095)", function () {
@@ -1368,4 +1372,4 @@ test("contents()", function() {
        var c = $("#nonnodes").contents().contents();
        equals( c.length, 1, "Check node,textnode,comment contents is just one" );
        equals( c[0].nodeValue, "hi", "Check node,textnode,comment contents is just the one from span" );
-});
\ No newline at end of file
+});