Adding tests.

This commit is contained in:
bzbarsky%mit.edu 2006-08-16 06:03:30 +00:00
parent 6ff38e953b
commit 25141f56ff
14 changed files with 268 additions and 0 deletions

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<style>
span { color: green }
:checked + span { color: red }
input { display: none }
</style>
<body>
<input checked="checked" id="foo"><span>There should be no red</span>
</body>
</html>

View File

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<style>
span { color: green }
:default + span { color: red }
span.reverse { color: red }
:default + span.reverse { color: green }
button { display: none }
</style>
<body onload='document.getElementById("foo").setAttribute("type", "button");'>
<form>
<div>
<button type="submit" checked="checked" id="foo"></button>
<span>There should be no red.</span>
</div>
<div>
<button type="submit"></button><span class="reverse">There should be no red.</span>
</div>
</form>
</body>
</html>

View File

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<style>
span { color: green }
:default + span { color: red }
span.reverse { color: red }
:default + span.reverse { color: green }
input { display: none }
</style>
<body onload='document.getElementById("foo").removeAttribute("type"); document.getElementById("bar").setAttribute("type", "checkbox");'>
<form>
<div>
<input type="checkbox" checked="checked" id="foo">
<span>There should be no red.</span>
</div>
<div>
<input checked="checked" id="bar">
<span class="reverse">There should be no red.</span>
</div>
</form>
</body>
</html>

View File

@ -0,0 +1,24 @@
<!DOCTYPE html>
<html>
<head>
<style>
span { color: green }
:default + span { color: red }
span.reverse { color: red }
:default + span.reverse { color: green }
input { display: none }
</style>
<body onload='document.getElementById("foo").removeAttribute("type"); document.getElementById("bar").setAttribute("type", "radio");'>
<form>
<div>
<input type="radio" checked="checked" id="foo">
<span>There should be no red.</span>
</div>
<div>
<input checked="checked" id="bar">
<span class="reverse">There should be no red.</span>
</div>
</form>
</body>
</html>

View File

@ -0,0 +1,19 @@
<!DOCTYPE html>
<html>
<head>
<style>
span { color: green }
:default:checked + span { color: red }
input { display: none }
</style>
<body onload='dump("aaa"); document.getElementById("foo").setAttribute("type", "submit");'>
<form>
<div>
<input type="submit">
<input type="radio" checked="checked" id="foo">
<span>There should be no red.</span>
</div>
</form>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<style>
span { color: red }
:checked + span { color: green }
input { display: none }
</style>
<body>
<input type="checkbox" checked="checked" id="foo"><span>There should be no red</span>
</body>
</html>

View File

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<style>
span { color: red }
:default + span { color: green }
span.reverse { color: green }
:default + span.reverse { color: red }
input { display: none }
</style>
<body>
<form>
<div>
<input type="submit" checked="checked" id="foo"><span>There should be no red.</span>
</div>
<div>
<input type="submit"><span class="reverse">There should be no red.</span>
</div>
</form>
</body>
</html>

View File

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<style>
span { color: red }
:default + span { color: green }
span.reverse { color: green }
:default + span.reverse { color: red }
button { display: none }
</style>
<body>
<form>
<div>
<button type="submit" checked="checked" id="foo"></button>
<span>There should be no red.</span>
</div>
<div>
<button type="submit"></button><span class="reverse">There should be no red.</span>
</div>
</form>
</body>
</html>

View File

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<style>
span { color: red }
:default + span { color: green }
span.reverse { color: green }
:default + span.reverse { color: red }
input { display: none }
</style>
<body>
<form>
<div>
<input type="checkbox" checked="checked" id="foo">
<span>There should be no red.</span>
</div>
<div>
<input checked="checked"><span class="reverse">There should be no red.</span>
</div>
</form>
</body>
</html>

View File

@ -0,0 +1,23 @@
<!DOCTYPE html>
<html>
<head>
<style>
span { color: red }
:default + span { color: green }
span.reverse { color: green }
:default + span.reverse { color: red }
input { display: none }
</style>
<body>
<form>
<div>
<input type="radio" checked="checked" id="foo">
<span>There should be no red.</span>
</div>
<div>
<input checked="checked"><span class="reverse">There should be no red.</span>
</div>
</form>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<style>
span { color: green }
:checked + span { color: red }
input { display: none }
</style>
<body onload='document.getElementById("foo").removeAttribute("type");'>
<input type="checkbox" checked="checked" id="foo"><span>There should be no red</span>
</body>
</html>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<style>
span { color: red }
:checked + span { color: green }
input { display: none }
</style>
<body onload='document.getElementById("foo").setAttribute("type", "checkbox");'>
<input checked="checked" id="foo"><span>There should be no red</span>
</body>
</html>

View File

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>
<head>
<style>
span { color: green }
:default + span { color: red }
span.reverse { color: red }
:default + span.reverse { color: green }
input { display: none }
</style>
<body onload='document.getElementById("foo").removeAttribute("type");'>
<form>
<div>
<input type="submit" checked="checked" id="foo"><span>There should be no red.</span>
</div>
<div>
<input type="submit"><span class="reverse">There should be no red.</span>
</div>
</form>
</body>
</html>

View File

@ -4,3 +4,16 @@ bug273719.html
bug84400-1.html
bug84400-2.html
bug84400-3.html
bug348809-1.html
bug348809-2.html
bug348809-3.html
bug348809-4.html
bug348809-5.html
bug348809-6.html
bug348809-7.html
bug348809-8.html
bug348809-9.html
bug348809-10.html
bug348809-11.html
bug348809-12.html
bug348809-13.html