mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
78 lines
2.8 KiB
HTML
78 lines
2.8 KiB
HTML
<html>
|
|
<head>
|
|
<title>Test case for block inside inline layout</title>
|
|
<style>
|
|
body { font-family: "Arial", monospace; font-size: 12pt; }
|
|
div { margin: 1em; border: 1px solid grey; }
|
|
div.test { border: 2px solid green; padding: 2px; display: none; }
|
|
p { background: lightgreen; }
|
|
input.blue { background: rgb(128,128,255); }
|
|
span.outer { }
|
|
span.block { display: block; background: rgb(180,180,180); }
|
|
</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 disabled>
|
|
<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">
|
|
<span class="outer" name="it">
|
|
<span class="block">
|
|
Twas brillig and the slithey toves...And Bush one.
|
|
</span>
|
|
</span>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|