blob: 5f1acb78f8c445351ad5ff7a19f6aa233538d2d1 [file] [log] [blame]
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