| <!DOCTYPE html> |
| <html> |
| <head> |
| <script> |
| |
| function performTest() |
| { |
| |
| // Need to make a copy of this array, because it is "live" and the P elements will disappear |
| // from it as we apply formatting changes, changing them into heading elements |
| var ps = arrayCopy(document.getElementsByTagName("P")); |
| |
| selectNode(ps[0]); |
| Formatting_applyFormattingChanges("",null); |
| selectNode(ps[1]); |
| Formatting_applyFormattingChanges("H1",null); |
| selectNode(ps[2]); |
| Formatting_applyFormattingChanges("H2",null); |
| selectNode(ps[3]); |
| Formatting_applyFormattingChanges("H3",null); |
| selectNode(ps[4]); |
| Formatting_applyFormattingChanges("H4",null); |
| selectNode(ps[5]); |
| Formatting_applyFormattingChanges("H5",null); |
| selectNode(ps[6]); |
| Formatting_applyFormattingChanges("H6",null); |
| selectNode(ps[7]); |
| Formatting_applyFormattingChanges(".hello",null); |
| selectNode(ps[8]); |
| Formatting_applyFormattingChanges(null,null); |
| |
| // An unrelated part of the code adds "id" attributes to heading elements to keep track of |
| // sections - we're not testing that functionality here, so we want to ignore them |
| removeIds(); |
| } |
| </script> |
| </head> |
| <body> |
| <p>Normal</p> |
| <p>Heading 1</p> |
| <p>Heading 2</p> |
| <p>Heading 3</p> |
| <p>Heading 4</p> |
| <p>Heading 5</p> |
| <p>Heading 6</p> |
| <p>Class "hello"</p> |
| <p>Unchanged (normal)</p> |
| </body> |
| </html> |