3446N/A @summary Mouse cursor must remain DEFAULT over scrollbar when text is typed 3446N/A @author Andrei Dmitriev: area=TextArea 3446N/A "1. Place keyboard cursor inside TextArea.",
3446N/A "2. Repeat steps 2.* for each of two TextArea's scrollbars.",
3446N/A "2.1. Place mouse cursor over TextArea's scrollbar.",
3446N/A "2.2. If mouse cursor is not HAND_CURSOR, test failed.",
3446N/A "2.3. Type any symbol into TextArea.",
3446N/A "2.4. Type ENTER symbol into TextArea.",
3446N/A "2.5. If mouse cursor changes, test failed",
3446N/A "(if cursor disappears on Windows, it's OK).",
3446N/A /***************************************************** 3446N/A * Standard Test Machinery Section 3446N/A * DO NOT modify anything in this section -- it's a 3446N/A * standard chunk of code which has all of the 3446N/A * synchronisation necessary for the test harness. 3446N/A * By keeping it the same in all tests, it is easier 3446N/A * to read and understand someone else's test, as 3446N/A * well as insuring that all tests behave correctly 3446N/A * There is a section following this for test-defined 3446N/A ******************************************************/ 3446N/A //The test passed, so just return from main and harness will 3446N/A // interepret this return as a pass 3446N/A //At this point, neither test passed nor test failed has been 3446N/A // called -- either would have thrown an exception and ended the 3446N/A // test, so we know we have multiple threads. 3446N/A //Test involves other threads, so sleep and wait for them to 3446N/A //Timed out, so fail the test 3446N/A //reset flag in case hit this code more than once for some reason (just safety) 3446N/A //first check if this is executing in main thread 3446N/A //Still in the main thread, so set the flag just for kicks, 3446N/A // and throw a test passed exception which will be caught 3446N/A //pass was called from a different thread, so set the flag and interrupt 3446N/A //test writer didn't specify why test failed, so give generic 3446N/A //check if this called from main thread 3446N/A //If main thread, fail now 'cause not sleeping 3446N/A//This exception is used to exit from any level of call nesting 3446N/A// when it's determined that the test has passed, and immediately 3446N/A//*********** End Standard Test Machinery Section ********** 3446N/A//************ Begin classes defined for the test **************** 3446N/A// make listeners in a class defined here, and instantiate them in init() 3446N/A/* Example of a class which may be written as part of a test 3446N/Aclass NewClass implements anInterface 3446N/A public void eventDispatched(AWTEvent e) 3446N/A //Counting events to see if we get enough 3446N/A //got enough events, so pass 3446N/A //tried too many times without getting enough events so fail 3446N/A//************** End classes defined for the test ******************* 3446N/A/**************************************************** 3446N/A DO NOT modify anything below -- it's a standard 3446N/A chunk of code whose purpose is to make user 3446N/A interaction uniform, and thereby make it simpler 3446N/A to read and understand someone else's test. 3446N/A ****************************************************/ 3446N/A This is part of the standard test machinery. 3446N/A It creates a dialog (with the instructions), and is the interface 3446N/A for sending text messages to the user. 3446N/A To print the instructions, send an array of strings to Sysout.createDialog 3446N/A WithInstructions method. Put one line of instructions per array entry. 3446N/A To display a message for the tester to see, simply call Sysout.println 3446N/A with the string to be displayed. 3446N/A This mimics System.out.println but works within the test harness as well 3446N/A /* Enables message counting for the tester. */ 3446N/A This is part of the standard test machinery. It provides a place for the 3446N/A test instructions to be displayed, and a place for interactive messages 3446N/A to the user to be displayed. 3446N/A To have the test instructions displayed, see Sysout. 3446N/A To have a message to the user be displayed, see Sysout. 3446N/A Do not call anything in this dialog directly. 3446N/A //DO NOT call this directly, go through Sysout 3446N/A //DO NOT call this directly, go through Sysout 3446N/A //Clear out any current instructions 3446N/A //Go down array of instruction strings 3446N/A //chop up each into pieces maxSringLength long 3446N/A //if longer than max then chop off first max chars to print 3446N/A //Try to chop on a word boundary 3446N/A //DO NOT call this directly, go through Sysout 3446N/A //catch presses of the passed and failed buttons. 3446N/A //simply call the standard pass() or fail() static methods of