blob: 4cf5e866ced61761607c53ef690a4ad4c68e8641 [file] [log] [blame]
<!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 class="other">Normal</p>
<p class="other">Heading 1</p>
<p class="other">Heading 2</p>
<p class="other">Heading 3</p>
<p class="other">Heading 4</p>
<p class="other">Heading 5</p>
<p class="other">Heading 6</p>
<p class="other">Class "hello"</p>
<p class="other">Unchanged (class "other")</p>
</body>
</html>