Tests that whitespace is correctly handled in textArea with xml:space
applied.
There are two text areas, one with xml:space="default" and one with xml:space="preserve".
The first line is a line with no leading or trailing whitespace.
The second line has four leading spaces.
The third line has two leading tabs.
The fourth line has leading whitespaces as follows: one linebreak, one tab, two spaces.
The fifth line has trailing whitespace.
For the test to pass the following criteria must be met.
For the upper textArea:
- The first line must not have any leading space.
- The second line must have one leading space, which means that text will start at 14.4 user units relative to the textArea position (this is indicated by the blue rects, one shade per space).
- The third line must have one leading space, which means that text will start at 14.4 user units relative to the textArea position (this is indicated by the blue rects, one shade per space).
- The fourth line must have one leading space, which means that text will start at 14.4 user units relative to the textArea position (this is indicated by the blue rects, one shade per space).
- The fifth line must not have any leading space, and all the text "Trailing whitespace more text" must be on the same line.
For the bottom textArea:
- The first line must not have any leading space.
- The second line must have four leading spaces, which means that text will start at 57.6 user units relative to the textArea position (this is indicated by the blue rects, one shade per space).
- The third line must have two leading spaces, which means that text will start at 28.8 user units relative to the textArea position (this is indicated by the blue rects, one shade per space).
- The fourth line must have four leading spaces, which means that text will start at 57.6 user units relative to the textArea position (this is indicated by the blue rects, one shade per space).
- The fifth line must not have any leading space, and all the text "more text" must be on the next line.