| This tests the parser and serializer for draggable region values. |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| |
| PASS parseDraggableRegion('drag') is 'drag' |
| PASS parseDraggableRegion('no-drag') is 'no-drag' |
| |
| Tests for variations in whitespace that are allowed. |
| |
| PASS parseDraggableRegion(' drag ') is 'drag' |
| PASS parseDraggableRegion(' no-drag ') is 'no-drag' |
| |
| Tests for case insensitivity. |
| |
| PASS parseDraggableRegion('Drag') is 'drag' |
| PASS parseDraggableRegion('DrAG') is 'drag' |
| PASS parseDraggableRegion('NO-DrAG') is 'no-drag' |
| PASS parseDraggableRegion('NO-DRAG') is 'no-drag' |
| |
| Some expected failures. |
| |
| PASS parseDraggableRegion('') is null |
| PASS parseDraggableRegion(' ') is null |
| PASS parseDraggableRegion('x') is null |
| PASS parseDraggableRegion('x-') is null |
| PASS parseDraggableRegion('x()') is null |
| PASS parseDraggableRegion('x(a)') is null |
| PASS parseDraggableRegion('none x') is null |
| PASS parseDraggableRegion('none x()') is null |
| PASS parseDraggableRegion('none x(a)') is null |
| |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |