mirror of
https://github.com/rn10950/RetroZilla.git
synced 2024-11-14 11:40:13 +01:00
93 lines
3.4 KiB
HTML
93 lines
3.4 KiB
HTML
<html>
|
|
<head>
|
|
<title>Test case for bug #xxxxx</title>
|
|
<style>
|
|
body { font-family: "Arial", monospace; font-size: 12pt; }
|
|
div:first-letter { color: green; font-size: 36pt; background-color: khaki; }
|
|
.fl:first-letter {
|
|
font-size: 72pt; background-color: gold; float: left;
|
|
margin-right: 5px;
|
|
}
|
|
:first-letter { color: red; }
|
|
div { margin: 1em; border: 1px solid grey; }
|
|
span { text-decoration: underline; }
|
|
div.test { border: 2px solid green; padding: 2px; display: none; }
|
|
p { background: lightgreen; }
|
|
input.blue { background: rgb(128,128,255); }
|
|
</style>
|
|
<script src=testlogic.js></script>
|
|
<script>
|
|
function RunTest() {
|
|
RandomTests();
|
|
}
|
|
|
|
function SetupTest() {
|
|
// Create input buttons
|
|
if (false) {
|
|
var it = document.getElementById("form");
|
|
if (it) {
|
|
for (var i = 0; i < tests.length; i++) {
|
|
var s = tests[i] + "";
|
|
s = s.slice(10, s.indexOf("("));
|
|
var b = NewButton(s, tests[i]);
|
|
it.appendChild(b);
|
|
}
|
|
}
|
|
}
|
|
document.getElementsByName("0")[0].style.display = "block";
|
|
}
|
|
|
|
var currentTest = 0;
|
|
var numTests = 2;
|
|
function NextTest() {
|
|
document.getElementsByName(currentTest)[0].style.display = "none";
|
|
currentTest = (currentTest + 1) % numTests;
|
|
document.getElementsByName(currentTest)[0].style.display = "block";
|
|
}
|
|
</script>
|
|
</head>
|
|
<body onload="SetupTest();">
|
|
<form id="form">
|
|
<input type=button value="NextTest" onclick="NextTest();" class=blue>
|
|
<input type=button value="RunTest" onclick="RunTest();" class=blue><br>
|
|
<input type=button value="0: InsertText" onclick="InsertText();">
|
|
<input type=button value="1: AppendText" onclick="AppendText();">
|
|
<input type=button value="2: InsertComment" onclick="InsertComment();">
|
|
<input type=button value="3: AppendComment" onclick="AppendComment();">
|
|
<input type=button value="4: InsertImage" onclick="InsertImage();">
|
|
<input type=button value="5: AppendImage" onclick="AppendImage();">
|
|
<input type=button value="6: InsertBlock" onclick="InsertBlock();">
|
|
<input type=button value="7: AppendBlock" onclick="AppendBlock();">
|
|
<input type=button value="8: InsertInline" onclick="InsertInline();">
|
|
<input type=button value="9: AppendInline" onclick="AppendInline();">
|
|
<input type=button value="10: ShrinkText" onclick="ShrinkText();">
|
|
<input type=button value="11: GrowText" onclick="GrowText();">
|
|
<input type=button value="12: RemoveNode0" onclick="RemoveNode0();">
|
|
<input type=button value="13: RemoveNode1" onclick="RemoveNode1();">
|
|
<input type=button value="14: RemoveNode2" onclick="RemoveNode2();">
|
|
<input type=button value="15: RemoveNode3" onclick="RemoveNode3();">
|
|
<input type=button value="16: RemoveNodeN" onclick="RemoveNodeN();">
|
|
</form>
|
|
<hr>
|
|
|
|
<div class="test" name="0">
|
|
Simple first-letter; direct child of the block
|
|
<div name="it">
|
|
Twas brillig and the slithey toves...And Bush one.
|
|
Twas brillig and the slithey toves...And Bush one.
|
|
Twas brillig and the slithey toves...And Bush one.
|
|
</div><br clear=all>
|
|
</div>
|
|
|
|
<div class="test" name="1">
|
|
Floating first-letter; direct child of the block
|
|
<div class="fl" name="it">
|
|
Twas brillig and the slithey toves...And Bush one.
|
|
Twas brillig and the slithey toves...And Bush one.
|
|
Twas brillig and the slithey toves...And Bush one.
|
|
</div><br clear=all>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|