X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Fcore.js;h=ea687c8f8fad5b90a66048e494b64091188bf3cc;hb=90b25efa6c3c3676c5ae1dd782d04726e03a31e8;hp=a6ae6e415241a87bfdc95fc6c0605b31fc8d8932;hpb=67c7b46ea36946c85d119d2c513486d2b1a05a24;p=jquery.git diff --git a/test/unit/core.js b/test/unit/core.js index a6ae6e4..ea687c8 100644 --- a/test/unit/core.js +++ b/test/unit/core.js @@ -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 () { @@ -1054,11 +1058,13 @@ test("filter()", function() { }); test("not()", function() { - expect(5); + expect(7); ok( $("#main > p#ap > a").not("#google").length == 2, "not('selector')" ); + ok( $("#main > p#ap > a").not(document.getElementById("google")).length == 2, "not(DOMElement)" ); isSet( $("p").not(".result").get(), q("firstp", "ap", "sndp", "en", "sap", "first"), "not('.class')" ); isSet( $("p").not("#ap, #sndp, .result").get(), q("firstp", "en", "sap", "first"), "not('selector, selector')" ); isSet( $("p").not($("#ap, #sndp, .result")).get(), q("firstp", "en", "sap", "first"), "not(jQuery)" ); + ok( $("p").not(document.getElementsByTagName("p")).length == 0, "not(Array-like DOM collection)" ); isSet( $("#form option").not("option.emptyopt:contains('Nothing'),[selected],[value='1']").get(), q("option1c", "option1d", "option2c", "option3d" ), "not('complex selector')"); }); @@ -1368,4 +1374,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 +});