});\r
\r
test("index(Object)", function() {\r
- expect(8);\r
- equals( $([window, document]).index(window), 0, "Check for index of elements" );\r
- equals( $([window, document]).index(document), 1, "Check for index of elements" );\r
- var inputElements = $('#radio1,#radio2,#check1,#check2');\r
+ expect(10);\r
+ \r
+ var elements = $([window, document]),\r
+ inputElements = $('#radio1,#radio2,#check1,#check2');\r
+ \r
+ equals( elements.index(window), 0, "Check for index of elements" );\r
+ equals( elements.index(document), 1, "Check for index of elements" );\r
equals( inputElements.index(document.getElementById('radio1')), 0, "Check for index of elements" );\r
equals( inputElements.index(document.getElementById('radio2')), 1, "Check for index of elements" );\r
equals( inputElements.index(document.getElementById('check1')), 2, "Check for index of elements" );\r
equals( inputElements.index(document.getElementById('check2')), 3, "Check for index of elements" );\r
equals( inputElements.index(window), -1, "Check for not found index" );\r
equals( inputElements.index(document), -1, "Check for not found index" );\r
+ \r
+ // enabled since [5500]\r
+ equals( elements.index( elements ), 0, "Pass in a jQuery object" );\r
+ equals( elements.index( elements.eq(1) ), 1, "Pass in a jQuery object" );\r
});\r
\r
test("attr(String)", function() {\r