| <!DOCTYPE html> |
| <html> |
| <head> |
| <script> |
| |
| function performTest() |
| { |
| |
| // Need to make a copy of this array, because it is "live" and the H1 elements will disappear |
| // from it as we apply formatting changes, changing them into heading elements |
| var h1s = arrayCopy(document.getElementsByTagName("H1")); |
| |
| selectNode(h1s[0]); |
| Formatting_applyFormattingChanges("",null); |
| selectNode(h1s[1]); |
| Formatting_applyFormattingChanges("H1",null); |
| selectNode(h1s[2]); |
| Formatting_applyFormattingChanges("H2",null); |
| selectNode(h1s[3]); |
| Formatting_applyFormattingChanges("H3",null); |
| selectNode(h1s[4]); |
| Formatting_applyFormattingChanges("H4",null); |
| selectNode(h1s[5]); |
| Formatting_applyFormattingChanges("H5",null); |
| selectNode(h1s[6]); |
| Formatting_applyFormattingChanges("H6",null); |
| selectNode(h1s[7]); |
| Formatting_applyFormattingChanges(".hello",null); |
| selectNode(h1s[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> |
| <h1>Normal</h1> |
| <h1>Heading 1</h1> |
| <h1>Heading 2</h1> |
| <h1>Heading 3</h1> |
| <h1>Heading 4</h1> |
| <h1>Heading 5</h1> |
| <h1>Heading 6</h1> |
| <h1>Class "hello"</h1> |
| <h1>Unchanged (heading 1)</h1> |
| </body> |
| </html> |