Add regression tests for 22413, 27211, 39211, and 41521.

This commit is contained in:
waterson%netscape.com 2000-06-21 02:37:05 +00:00
Родитель 49d2e6f519
Коммит 0fe3ac4e7a
8 изменённых файлов: 176 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,38 @@
<html>
<body>
<p>
This should be the only visible text when the page has loaded, and is with
M11.
</p>
<div id="DescriptionText1">
<p>This paragraph disappears.</p>
</div>
<layer>
<div id="DescriptionText2">
<p>This is visible in M12 -- it should have disappeared.</p>
</div>
</layer>
<div id="DescriptionText3">
<layer>
<p>This is visible in M12 -- it should have disappeared.</p>
<layer>
</div>
<script LANGUAGE="JavaScript" type="text/javascript">
var n = document.getElementById("DescriptionText1");
while (n.hasChildNodes())
n.removeChild(n.firstChild);
n = document.getElementById("DescriptionText2");
while (n.hasChildNodes())
n.removeChild(n.firstChild);
n = document.getElementById("DescriptionText3");
while (n.hasChildNodes())
n.removeChild(n.firstChild);
</script>
</body>
</html>

Просмотреть файл

@ -0,0 +1,21 @@
<HTML>
<HEAD>
<SCRIPT>
function doit()
{
var span = document.getElementById("foo")
document.body.removeChild(span)
document.body.appendChild(span)
}
</SCRIPT>
</HEAD>
<BODY onload='doit()'>
<SPAN ID=foo>
one
<P>
two
</P>
</SPAN>
<HR>
</BODY>
</HTML>

Просмотреть файл

@ -0,0 +1,24 @@
<html>
<head>
<script>
function m0 ()
{
document.getElementById('ds').innerHTML="<span>text before table <div style='display:block;'>block</div> text after table</span>";
}
</script>
</head>
<body onload="m0(); m0();">
<div id="ds">
orig contents of ds
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,18 @@
<html>
<head>
<script>
function doit()
{
var span = document.getElementById("span");
var div = span.parentNode;
div.removeChild(span);
div.appendChild(span);
}
</script>
</head>
<body onload="doit();">
<div id="div">
<span id="span">here is a span <div style="display:block;">with a block</div> in it</span>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,32 @@
<html>
<head>
<script>
function doit()
{
const Elements = ["span", "div", "a", "b", "c", "d", "e"];
for (id in Elements) {
var child = document.getElementById(Elements[id]);
var parent = child.parentNode;
var next = child.nextSibling;
parent.removeChild(child);
parent.insertBefore(child, next);
}
}
</script>
</head>
<body onload="doit();">
<div id="div">
<span id="span">
here <span id="a" style="color:green;">is</span> a span
<div id="div" style="display:block;">with a <span id="b" style="color:red;">block</span></div>
in
<span id="c" style="color:blue;">
it.
<span id="d" style="color:purple;">
And here is a much more <span id="e" style="color:pink;">deeply nested span</span>
</span>
</span>
</span>
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,24 @@
<html>
<head>
<script>
function mO ()
{
document.getElementById('ds').innerHTML="<span>text before table<TABLE BGCOLOR=red><TR><TD>table</TD></TR></TABLE>text after table<\/span>";
}
</script>
</head>
<body onload="mO();mO();">
<div id="ds">
orig contents of ds
</div>
</body>
</html>

Просмотреть файл

@ -0,0 +1,12 @@
<html>
<head>
<script>
function change()
{
document.getElementById("span").style.fontWeight = "bold";
}
</script>
<body onload="change();">
<span id="span">This is my happy span. <span style="display: block;">It's got an inline block.</span> It all should be bold.</span>
</body>
</html>

Просмотреть файл

@ -85,7 +85,14 @@ file:///s:/mozilla/layout/html/tests/block/bugs/17532.html
file:///s:/mozilla/layout/html/tests/block/bugs/17636.html
file:///s:/mozilla/layout/html/tests/block/bugs/17844.html
file:///s:/mozilla/layout/html/tests/block/bugs/22037.html
file:///s:/mozilla/layout/html/tests/block/bugs/22413.html
file:///s:/mozilla/layout/html/tests/block/bugs/27211.html
file:///s:/mozilla/layout/html/tests/block/bugs/36401-a.html
file:///s:/mozilla/layout/html/tests/block/bugs/36401-b.html
file:///s:/mozilla/layout/html/tests/block/bugs/36401-c.html
file:///s:/mozilla/layout/html/tests/block/bugs/36401.html
file:///s:/mozilla/layout/html/tests/block/bugs/39211.html
file:///s:/mozilla/layout/html/tests/block/bugs/39211-a.html
file:///s:/mozilla/layout/html/tests/block/bugs/39211-b.html
file:///s:/mozilla/layout/html/tests/block/bugs/39211-c.html
file:///s:/mozilla/layout/html/tests/block/bugs/41521.html