Set Up, Callbacks, Appending
----------------------------

The choice/list should contain "Alpha" "Beta" and "Gamma" for
 starters, unless and empty choice/list was created. In a choice,
 "Alpha" should be initially selected.

If there are no items:

   * Click on the choice box. Make sure that nothing prints to the
     console as a result. 

   * Click "Append"; "Extra 1" should appear in the list of items.
     For a choice, it should be immediately selected.

   * Click "Append" again. The selection should not change.
   
   * Start over with a fresh frame. Click the "Clear" button and
     nothing should happen.

   * If its an empty list, start over with a fresh frame. Click the
     "Reset" button and make sure "Alpha" "Beta" and "Gamma" are
     added.

   * Start over with a fresh frame again; jump down to the `Clearing'
     section (but don't click "Clear").

For a multi-selection list, jump down to "Multiple Selections".

If there are items, select each once in order (single-click for
 lists). After each selection, "Changed N" should appear in the
 console (where N is the position of the item, counting from 0) for a
 choice item, "Change (N)" for a list box; in either case, the
 "Changed" line is followed by "Callback Ok". This should be printed
 even if the selection is technically unchanged. Select the last one a
 second time to make sure.

For a choice, click to pop-up the menu, but don't select anything. for
 a list, click in an area without items and in the scroll bar(s). In
 both cases, the selection should not change and nothing should print
 in the console.

Click the "Append" button. The selection should not change, but a new
 item "Extra 1" should appear.

Click the "Append" button again.

Select the first newly added item.

Click on the "check" button. In the console, "content: " would be
 printed along with a list of strings. That list should match the
 items in the choice/list.

Selections
----------

Click "Select First". The selection should change to "Alpha", but
 nothing should appear in the console.

Click "Select Middle".  The selection should change to "Gamma", but
 nothing should appear in the console.

Click "Select Last".  The selection should change to "Extra 2"", but
 nothing should appear in the console.

Click "Select Bad -1" and Select Bad X". In both cases, nothing should
 happen, and nothing should appear in the console.

Repeat the above four steps for the "by name" buttons. (There's
 nothing equivalent to -1 for the "by name" buttons.)

Repeat the four steps for the "by Simulate" buttons; in addition to
 having the selections change, the "Changed N" and "Callback Ok"
 messages should print in the console. For the -1 and X cases, "event
 selection value mismatch" should print in the console, and the
 selection should not change.

Click on the "check" button and check the content list.

Clearing
--------

Choose clear. All items should disappear.

Choose clear again. Nothing should happen.

Click on all parts of the control. The callback should never be
 invoked.

Click on all the "Select" buttons. For the top buttons and "by
 Simulate" buttons (but not the "bad" ones), an exception should be
 reported. Nothing should happened for the "by Name" buttons.

Click on "Check". The empty item list should be reported in the
 console.

Click on "Append". For a choice, "Extra 3" should be immediately
 selected. For a list box, nothing should be selected.

Click "Append" again. The selection should not change.

Select the second item, "Extra 4". Note the callback message in
 the console for item 1.

Click "Check" and see the list in the console: ("Extra 3" "Extra 4")

Append one more, "Extra 5", and try all the selecting buttons again.

Append 5 more items. The last one is very long, but it should look ok:
 "This is a Really Long Named Item That Would Have Used the Short
 Name, Yes This is a Really Long Named Item That Would Have Used the
 Short Name Extra 10"

Select the long-name item.

Click "Check". The long name should be printed ok in the console.

>> No More Tests for Choice Frames <<

Visible Range >> Lists Only <<
-------------

Scroll to the top and select the first item. Click "Visible
 Indices". In the console, the top should be 0, and the visible count
 equal to the number of items that are completely visible in the
 item. If an item is only partly visible, it should not be counted.

Scroll down exactly one item's height without changing the
 selection. Click "Visible Indices" again. The top should change to 1
 but the count should be the same.

On some platforms, you can scroll to partially show the first item.
 Try it and hit "Visible Indices"; the partially shown item should
 count as unshown. The visible count should not change.

Make the window taller to show at least one more item. Try "Visible
 Indices" again and make sure it changed.

Click "Select Last". The list should scroll to the end. Try "Visible
 Indices" again.

Make the list box taller than all its items. (It may be necessary to
 delete some items by selecting them and hitting the "Delete" button.)
 Click "Visible Indices" and make sure that the visible count is still
 more than the number of items.

Deleting  >> Lists Only <<
--------

Select an item in the middle of the list.

Hit "Delete". The item should disappear, and nothing should be
 selected.

Append a new item.

Select the third item in the list. Hit "Delete Above"; the second item
 should disappear, and the selection should stick with its item as it
 moves into 2nd place. Hit "Delete Above" again and the first item
 should disappear, and the new first item should still be selected.
 Click "Delete Above" one more time, and nothing should happen.

Append two new items.

Select the third to last item in the list. Test "Delete Below" by
 clicking it three times, just like to "Delete Above".

Append two new items.

Click "Check" and inspect the item list in the console.

Select the first item. Click the "Reset" button. The list should
 contain "Alpha" "Beta" and "Gamma" with no selection.

Click "Check" and inspect the item list in the console.

Double-Click  >> Lists Only <<
------------

Double-click on "Alpha". The console should report the first click
 in the normal way, and then report "Changed -1" followed by
 "Double-click", then "Callback Ok".

Double-click on "Gamma". Same as above, except that the initial
 click is reported for position 2 instead of 0.

Click "Check" and inspect the item list in the console.

>> No More Tests for Single-Selection List Frames <<

Multiple Selections >> Multiple-Selection Lists Only <<
-------------------

Click on each of the three items and make sure that "Changed"
 and "Callback Ok" are printed in the console:

  * For regular MultiLists, each click should unhilite the
    old selection as it hilites the new one

  * For MultiExtendLists, each click should extend the
    selection.

Click on a selected item to make sure "Changed" is printed again.

Click "Check" and verify the item list *and* the selection list.
 (Remember that the items are numbered from 0).

Clear the selection except for one item, somehow. (You may need to use
 the Ctl key)

Use the shift key to select a second item. The console should show
 "Changed" and "Callback Ok" as usual.

Click "Check" and verify that the selection list now has the right
 two items.

Shift-click on a selected item. The console should show "Changed"
 and "Callback Ok" as usual.

Shift-click to select the remaining item. The console should show
 "Changed" and "Callback Ok" as usual.

Control-click on a selected item. It should become unselected (and the
 other two selected items should remain so). The console should report
 "Changed" and "Callback Ok".

Click "Check" and verify the selection list.

Try the "Select N" buttons. They should always extend the selection.

Try the "by Simulate" buttons; they should should act like clicking,
 either extending the selection or restarting it.

Try dragging (and shift-dragging and ctl-dragging) and make sure the
 console reports are appropriate.

