lightbox.handleArrowKeyPress(evtRightArrow); lightbox.handleArrowKeyPress(evtRightArrow); lightbox.handleArrowKeyPress(evtRightArrow); lightbox.handleArrowKeyPress(evtRightArrow); lightbox.handleArrowKeyPress(evtRightArrow); lightbox.handleArrowKeyPress(evtRightArrow); lightbox.handleArrowKeyPress(evtRightArrow); lightbox.handleArrowKeyPress(evtRightArrow); lightbox.handleArrowKeyPress(evtRightArrow); lightbox.handleArrowKeyPress(evtRightArrow); lightbox.handleArrowKeyPress(evtRightArrow); lightbox.handleArrowKeyPress(evtRightArrow); 
for (focusPosition = 2; focusPosition < numOfImages; focusPosition++ ) { lightbox.handleArrowKeyPress(evtRightArrow); } 
function testHandleArrowKeyPressForLeftAndRight()	 {	var lightbox = new fluid.Lightbox();	var defaultClass="image-container-default";	var focusedClass="image-container-selected";	var draggingClass="image-container-dragging";	focusLightboxNode(lightbox, lightbox.domNode);		// set the focus on the first image	assertTrue("fluid.thumbFirst should be focused",dojo.hasClass(document.getElementById("fluid.thumbFirst"), focusedClass));	assertFalse("fluid.thumbFirst should not be default", dojo.hasClass(document.getElementById("fluid.thumbFirst"), defaultClass));	assertTrue("fluid.thumbSecond should be not focused",dojo.hasClass(document.getElementById("fluid.thumbSecond"), defaultClass));	assertFalse("fluid.thumbSecond should not be focused", dojo.hasClass(document.getElementById("fluid.thumbSecond"), focusedClass));	// Test: right arrow to the second image	var evtRightArrow = {keyCode: dojo.keys.RIGHT_ARROW, preventDefault: function(){}, stopPropagation: function(){} };	lightbox.handleArrowKeyPress(evtRightArrow);	assertTrue("fluid.thumbFirst should be default",dojo.hasClass(document.getElementById("fluid.thumbFirst"), defaultClass));	assertFalse("fluid.thumbFirst should not be focused", dojo.hasClass(document.getElementById("fluid.thumbFirst"), focusedClass));	assertTrue("fluid.thumbSecond should be focused",dojo.hasClass(document.getElementById("fluid.thumbSecond"), focusedClass));	assertFalse("fluid.thumbSecond should not be default", dojo.hasClass(document.getElementById("fluid.thumbSecond"), defaultClass));	// Test: right arrow to the last image	lightbox.handleArrowKeyPress(evtRightArrow);	lightbox.handleArrowKeyPress(evtRightArrow);	lightbox.handleArrowKeyPress(evtRightArrow);	lightbox.handleArrowKeyPress(evtRightArrow);	lightbox.handleArrowKeyPress(evtRightArrow);	lightbox.handleArrowKeyPress(evtRightArrow);	lightbox.handleArrowKeyPress(evtRightArrow);	lightbox.handleArrowKeyPress(evtRightArrow);	lightbox.handleArrowKeyPress(evtRightArrow);	lightbox.handleArrowKeyPress(evtRightArrow);	lightbox.handleArrowKeyPress(evtRightArrow);	lightbox.handleArrowKeyPress(evtRightArrow);	assertTrue("fluid.thumbFirst should be default", dojo.hasClass(document.getElementById("fluid.thumbFirst"), defaultClass));	assertTrue("fluid.thumbSecond should be default", dojo.hasClass(document.getElementById("fluid.thumbSecond"), defaultClass));	assertTrue("fluid.thumbLast should be focused", dojo.hasClass(document.getElementById("fluid.thumbLast"), focusedClass));	// Test: left arrow to the previous image	var evtLeftArrow = {keyCode: dojo.keys.LEFT_ARROW, preventDefault: function(){}, stopPropagation: function(){} };	lightbox.handleArrowKeyPress(evtLeftArrow);	assertTrue("left arrow to second fluid.thumbFirst should be default", dojo.hasClass(document.getElementById("fluid.thumbFirst"), defaultClass));	assertTrue("left arrow to second fluid.thumbSecondLast should be focused", dojo.hasClass(document.getElementById("fluid.thumbSecondLast"), focusedClass));	assertTrue("left arrow to second fluid.thumbLast should be default", dojo.hasClass(document.getElementById("fluid.thumbLast"), defaultClass));		// Test: right arrow past the last image - expect wrap to the first image	lightbox.handleArrowKeyPress(evtRightArrow);	lightbox.handleArrowKeyPress(evtRightArrow);	assertTrue("fluid.thumbFirst should be focused after wrapping", dojo.hasClass(document.getElementById("fluid.thumbFirst"), focusedClass));	assertFalse("fluid.thumbFirst should not be default after wrapping", dojo.hasClass(document.getElementById("fluid.thumbFirst"), defaultClass));	assertTrue("fluid.thumbSecond should be default", dojo.hasClass(document.getElementById("fluid.thumbSecond"), defaultClass));	assertFalse("fluid.thumbSecond should not be focused after wrapping", dojo.hasClass(document.getElementById("fluid.thumbLast"), focusedClass));	assertTrue("fluid.thumbLast should be default", dojo.hasClass(document.getElementById("fluid.thumbSecondLast"), defaultClass));	assertFalse("fluid.thumbLast should not be focused after wrapping", dojo.hasClass(document.getElementById("fluid.thumbLast"), focusedClass));		// Test: left arrow on the first image - expect wrap to the last image	lightbox.handleArrowKeyPress(evtLeftArrow);	assertTrue("fluid.thumbFirst should be default", dojo.hasClass(document.getElementById("fluid.thumbFirst"), defaultClass));	assertTrue("fluid.thumbSecond should be default", dojo.hasClass(document.getElementById("fluid.thumbSecond"), defaultClass));	assertTrue("fluid.thumbLast should be focused", dojo.hasClass(document.getElementById("fluid.thumbLast"), focusedClass));}
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