assertEquals("fluid.img.last", thumbArray[indexOfLastImage].id); 
assertEquals("fluid.img.last", thumbArray[numOfImages - 1].id); 
function testHandleArrowKeyPressForCtrlLeftAndCtrlRight() {		var lightbox = new fluid.Lightbox();	var defaultClass="image-container-default";	var focusClass="image-container-selected";	var draggingClass="image-container-dragging";	focusLightboxNode(lightbox, lightbox.domNode);	var evtCTRL = {keyCode: dojo.keys.CTRL, preventDefault: function(){}, stopPropagation: function(){} };	var evtRightArrow = {keyCode: dojo.keys.RIGHT_ARROW, ctrlKey: true, preventDefault: function(){}, stopPropagation: function(){} };	var evtLeftArrow = {keyCode: dojo.keys.LEFT_ARROW, ctrlKey: true, preventDefault: function(){}, stopPropagation: function(){} };		// Test: ctrl right arrow - expect first and second image to swap	lightbox.handleKeyDown(evtCTRL);		lightbox.handleArrowKeyPress(evtRightArrow);	assertTrue("thumbFirst should be in move state after ctrl-right", dojo.hasClass(document.getElementById("fluid.thumbFirst"), draggingClass));	assertTrue("thumbSecond should be in default state after ctrl-right", dojo.hasClass(document.getElementById("fluid.thumbSecond"), defaultClass));	assertTrue("thumbLast should be in default state after ctrl-right", dojo.hasClass(document.getElementById("fluid.thumbLast"), defaultClass));	var lightboxDOMNode = dojo.byId("gallery:::gallery-thumbs:::");	var thumbArray = lightboxDOMNode.getElementsByTagName("img");	assertEquals("after move right", "fluid.img.second", thumbArray[0].id);	assertEquals("after move right", "fluid.img.first", thumbArray[1].id);	assertEquals("after move right", "fluid.img.last", thumbArray[indexOfLastImage].id);		// ctrl up	lightbox.handleKeyUp(evtCTRL);		assertTrue("thumbFirst should be in selected state", dojo.hasClass(document.getElementById("fluid.thumbFirst"), focusClass));	assertTrue("thumbSecond should be in default state", dojo.hasClass(document.getElementById("fluid.thumbSecond"), defaultClass));	assertTrue("thumbLast should be in default state", dojo.hasClass(document.getElementById("fluid.thumbLast"), defaultClass));	thumbArray = lightboxDOMNode.getElementsByTagName("img");;	assertEquals("after move right ctrl up", "fluid.img.second", thumbArray[0].id);	assertEquals("after move right ctrl up", "fluid.img.first", thumbArray[1].id);	assertEquals("after move right ctrl up", "fluid.img.last", thumbArray[indexOfLastImage].id);	// Test: ctrl left arrow - expect first and second image to swap back to original order	lightbox.handleKeyDown(evtCTRL);		lightbox.handleArrowKeyPress(evtLeftArrow);	assertTrue("thumbFirst should be in move state after ctrl-left", dojo.hasClass(document.getElementById("fluid.thumbFirst"), draggingClass));	assertTrue("thumbSecond should be in default state after ctrl-left", dojo.hasClass(document.getElementById("fluid.thumbSecond"), defaultClass));	assertTrue("thumbLast should be in default state after ctrl-left", dojo.hasClass(document.getElementById("fluid.thumbLast"), defaultClass));	thumbArray = lightboxDOMNode.getElementsByTagName("img");;	assertEquals("after move left", "fluid.img.first", thumbArray[0].id);	assertEquals("after move left", "fluid.img.second", thumbArray[1].id);	assertEquals("after move left", "fluid.img.last", thumbArray[indexOfLastImage].id);		// ctrl up	lightbox.handleKeyUp(evtCTRL);		assertTrue("thumbFirst should be in selected state", dojo.hasClass(document.getElementById("fluid.thumbFirst"), focusClass));	assertTrue("thumbSecond should be in default state", dojo.hasClass(document.getElementById("fluid.thumbSecond"), defaultClass));	assertTrue("thumbLast should be in default state", dojo.hasClass(document.getElementById("fluid.thumbLast"), defaultClass));	// Test: ctrl left arrow - expect first image to move to last place,	//       second image to move to first place and third image to move to second place	lightbox.handleKeyDown(evtCTRL);		lightbox.handleArrowKeyPress(evtLeftArrow);	lightbox.handleKeyUp(evtCTRL);		thumbArray = lightboxDOMNode.getElementsByTagName("img");;	assertEquals("after another move right", "fluid.img.second", thumbArray[0].id);	assertEquals("after another move right", "fluid.img.3", thumbArray[1].id);	assertEquals("after another move right", "fluid.img.first", thumbArray[indexOfLastImage].id);	// Test: ctrl right arrow - expect thumbFirst to move to first place,	//       thumbSecond to move to second place and thumbLast to move to last place	lightbox.handleKeyDown(evtCTRL);		lightbox.handleArrowKeyPress(evtRightArrow);	lightbox.handleKeyUp(evtCTRL);		thumbArray = lightboxDOMNode.getElementsByTagName("img");;	assertEquals("fluid.img.first", thumbArray[0].id);	assertEquals("fluid.img.second", thumbArray[1].id);	assertEquals("fluid.img.last", thumbArray[indexOfLastImage].id);}
6971	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/6971/8354e12889c961437251ff351a33a881d65270b7/LightboxTests.js/clean/src/webapp/component-templates/test/tests/LightboxTests.js