+ t( "Is Visible", "#form input:visible", [] );
+ t( "Is Visible", "div:visible:not(.testrunner-toolbar):lt(2)", ["nothiddendiv", "nothiddendivchild"] );
+ t( "Is Hidden", "#form input:hidden", ["text1","text2","radio1","radio2","check1","check2","hidden1","hidden2","name","search"] );
+ t( "Is Hidden", "#main:hidden", ["main"] );
+ t( "Is Hidden", "#dl:hidden", ["dl"] );
+
+ var $div = jQuery('#nothiddendivchild');
+ $div.css({ fontSize: 0, lineHeight: 0 });// IE also needs to set font-size and line-height to 0
+ $div.width(0).height(0);
+ t( "Is Hidden", '#nothiddendivchild:hidden', ['nothiddendivchild'] );
+ t( "Is Not Hidden", '#nothiddendivchild:visible', [] );
+ $div.width(1).height(0);
+ t( "Is Visible", '#nothiddendivchild:visible', ['nothiddendivchild'] );
+ t( "Is Not Visible", '#nothiddendivchild:hidden', [] );
+ $div.width(0).height(1);
+ t( "Is Visible", '#nothiddendivchild:visible', ['nothiddendivchild'] );
+ t( "Is Not Visible", '#nothiddendivchild:hidden', [] );
+ $div.width(1).height(1);
+ t( "Is Visible", '#nothiddendivchild:visible', ['nothiddendivchild'] );
+ t( "Is Not Visible", '#nothiddendivchild:hidden', [] );
+ $div.width('').height('').css({ fontSize: '', lineHeight: '' });
+
+ t( "Check position filtering", "div#nothiddendiv:eq(0)", ["nothiddendiv"] );
+ t( "Check position filtering", "div#nothiddendiv:last", ["nothiddendiv"] );
+ t( "Check position filtering", "div#nothiddendiv:not(:gt(0))", ["nothiddendiv"] );
+ t( "Check position filtering", "#foo > :not(:first)", ["en", "sap"] );
+ t( "Check position filtering", "select > :not(:gt(2))", ["option1a", "option1b", "option1c"] );
+ t( "Check position filtering", "select:lt(2) :not(:first)", ["option1b", "option1c", "option1d", "option2a", "option2b", "option2c", "option2d"] );
+ t( "Check position filtering", "div.nothiddendiv:eq(0)", ["nothiddendiv"] );
+ t( "Check position filtering", "div.nothiddendiv:last", ["nothiddendiv"] );
+ t( "Check position filtering", "div.nothiddendiv:not(:lt(0))", ["nothiddendiv"] );
+
+ t( "Check element position", "div div:eq(0)", ["nothiddendivchild"] );
+ t( "Check element position", "div div:eq(5)", ["t2037"] );
+ t( "Check element position", "div div:eq(27)", ["hide"] );
+ t( "Check element position", "div div:first", ["nothiddendivchild"] );
+ t( "Check element position", "div > div:first", ["nothiddendivchild"] );
+ t( "Check element position", "#dl div:first div:first", ["foo"] );
+ t( "Check element position", "#dl div:first > div:first", ["foo"] );
+ t( "Check element position", "div#nothiddendiv:first > div:first", ["nothiddendivchild"] );