Adding tests that make sure bug 352980 doesn't regress anything.

git-svn-id: svn://10.0.0.236/trunk@230970 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu 2007-07-25 21:47:22 +00:00
parent 827db87f90
commit edbd43fcf9
28 changed files with 522 additions and 0 deletions

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<style>
span { color: green }
</style>
</head>
<body>
<form>
<span>This should be green</span>
</form>
</body>
</html>

View File

@ -0,0 +1,17 @@
<!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>
</head>
<body>
<form>
<input type="image"><span>This should be green</span>
</form>
</body>
</html>

View File

@ -0,0 +1,18 @@
<!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>
</head>
<body>
<form>
<input type="image"><span>This should be green</span>
<input type="submit">
</form>
</body>
</html>

View File

@ -0,0 +1,18 @@
<!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>
</head>
<body>
<form>
<input type="submit"><span>This should be green</span>
<input type="image">
</form>
</body>
</html>

View File

@ -0,0 +1,17 @@
<!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>
</head>
<body>
<form>
<input><input type="image"><span>This should be green</span>
</form>
</body>
</html>

View File

@ -0,0 +1,20 @@
<!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>
</head>
<body onload="var foo = document.getElementById('foo');
var bar = document.createElement('input');
bar.type = 'submit';
foo.insertBefore(bar, foo.firstChild)">
<form id="foo">
<input type="image"><span class="reverse">This should be green</span>
</form>
</body>
</html>

View File

@ -0,0 +1,20 @@
<!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>
</head>
<body onload="var foo = document.getElementById('foo');
var bar = document.createElement('input');
bar.type = 'submit';
foo.insertBefore(bar, foo.firstChild)">
<form id="foo"><span>This should be green</span>
<input type="image">
</form>
</body>
</html>

View File

@ -0,0 +1,20 @@
<!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>
</head>
<body onload="var foo = document.getElementById('foo');
var bar = document.createElement('input');
bar.type = 'image';
foo.insertBefore(bar, foo.firstChild)">
<form id="foo">
<input type="submit"><span class="reverse">This should be green</span>
</form>
</body>
</html>

View File

@ -0,0 +1,20 @@
<!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>
</head>
<body onload="var foo = document.getElementById('foo');
var bar = document.createElement('input');
bar.type = 'image';
foo.insertBefore(bar, foo.firstChild)">
<form id="foo"><span>This should be green</span>
<input type="submit">
</form>
</body>
</html>

View File

@ -0,0 +1,20 @@
<!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>
</head>
<body onload="var foo = document.getElementById('foo');
var bar = document.createElement('input');
bar.type = 'submit';
foo.appendChild(bar)">
<form id="foo">
<input type="image"><span>This should be green</span>
</form>
</body>
</html>

View File

@ -0,0 +1,20 @@
<!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>
</head>
<body onload="var foo = document.getElementById('foo');
var bar = document.createElement('input');
bar.type = 'image';
foo.appendChild(bar)">
<form id="foo">
<input type="image"><span>This should be green</span>
</form>
</body>
</html>

View File

@ -0,0 +1,20 @@
<!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>
</head>
<body onload="var foo = document.getElementById('foo');
var bar = document.createElement('input');
bar.type = 'submit';
foo.appendChild(bar)">
<form id="foo">
<input type="submit"><span>This should be green</span>
</form>
</body>
</html>

View File

@ -0,0 +1,20 @@
<!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>
</head>
<body onload="var foo = document.getElementById('foo');
var bar = document.createElement('input');
bar.type = 'image';
foo.appendChild(bar)">
<form id="foo">
<input type="submit"><span>This should be green</span>
</form>
</body>
</html>

View File

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<style>
span { color: green }
</style>
</head>
<body>
<form>
<span>This should be green</span>
<span>This should be green</span>
</form>
</body>
</html>

View File

@ -0,0 +1,18 @@
<!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>
</head>
<body onload="document.getElementById('foo').type = 'submit'">
<form>
<input id="foo"><span>This should be green</span>
<input type="image"><span class="reverse">This should be green</span>
</form>
</body>
</html>

View File

@ -0,0 +1,18 @@
<!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>
</head>
<body onload="document.getElementById('foo').type = 'image'">
<form>
<input id="foo"><span>This should be green</span>
<input type="submit"><span class="reverse">This should be green</span>
</form>
</body>
</html>

View File

@ -0,0 +1,18 @@
<!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>
</head>
<body onload="document.getElementById('foo').type = 'submit'">
<form>
<input id="foo"><span>This should be green</span>
<input type="image"><span class="reverse">This should be green</span>
</form>
</body>
</html>

View File

@ -0,0 +1,18 @@
<!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>
</head>
<body onload="document.getElementById('foo').type = 'image'">
<form>
<input id="foo"><span>This should be green</span>
<input type="submit"><span class="reverse">This should be green</span>
</form>
</body>
</html>

View File

@ -0,0 +1,18 @@
<!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>
</head>
<body onload="document.getElementById('foo').type = 'submit'">
<form>
<input id="foo"><span>This should be green</span>
<input type="submit"><span class="reverse">This should be green</span>
</form>
</body>
</html>

View File

@ -0,0 +1,18 @@
<!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>
</head>
<body onload="document.getElementById('foo').type = 'image'">
<form>
<input id="foo"><span>This should be green</span>
<input type="image"><span class="reverse">This should be green</span>
</form>
</body>
</html>

View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<style>
span { color: green }
</style>
</head>
<body>
<form>
<span>This should be green</span>
<span>This should be green</span>
<span>This should be green</span>
</form>
</body>
</html>

View File

@ -0,0 +1,19 @@
<!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>
</head>
<body onload="document.getElementById('foo').type = 'image'">
<form>
<input type="submit"><span>This should be green</span>
<input id="foo"><span class="reverse">This should be green</span>
<input type="image"><span class="reverse">This should be green</span>
</form>
</body>
</html>

View File

@ -0,0 +1,19 @@
<!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>
</head>
<body onload="document.getElementById('foo').type = 'submit'">
<form>
<input type="image"><span>This should be green</span>
<input id="foo"><span class="reverse">This should be green</span>
<input type="submit"><span class="reverse">This should be green</span>
</form>
</body>
</html>

View File

@ -0,0 +1,20 @@
<!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>
</head>
<body onload="document.getElementById('foo').type = 'submit';
document.getElementById('bar').type = ''">
<form>
<input id="bar" type="image"><span class="reverse">This should be green</span>
<input id="foo"><span>This should be green</span>
<input type="submit"><span class="reverse">This should be green</span>
</form>
</body>
</html>

View File

@ -0,0 +1,20 @@
<!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>
</head>
<body onload="document.getElementById('foo').type = 'image';
document.getElementById('bar').type = ''">
<form>
<input id="bar" type="image"><span class="reverse">This should be green</span>
<input id="foo"><span>This should be green</span>
<input type="submit"><span class="reverse">This should be green</span>
</form>
</body>
</html>

View File

@ -0,0 +1,20 @@
<!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>
</head>
<body onload="document.getElementById('foo').type = 'image';
document.getElementById('bar').type = ''">
<form>
<input id="bar" type="submit"><span class="reverse">This should be green</span>
<input id="foo"><span>This should be green</span>
<input type="image"><span class="reverse">This should be green</span>
</form>
</body>
</html>

View File

@ -0,0 +1,20 @@
<!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>
</head>
<body onload="document.getElementById('foo').type = 'submit';
document.getElementById('bar').type = ''">
<form>
<input id="bar" type="submit"><span class="reverse">This should be green</span>
<input id="foo"><span>This should be green</span>
<input type="image"><span class="reverse">This should be green</span>
</form>
</body>
</html>

View File

@ -168,6 +168,30 @@ fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") == 336736-1.html 336736-1-ref.html # somet
== 351641-1b.html 351641-1-ref.html
== 351641-2a.html 351641-2-ref.html
== 351641-2b.html 351641-2-ref.html
== 352980-1a.html 352980-1-ref.html
== 352980-1b.html 352980-1-ref.html
== 352980-1c.html 352980-1-ref.html
== 352980-1d.html 352980-1-ref.html
== 352980-1e.html 352980-1-ref.html
fails == 352980-1f.html 352980-1-ref.html
== 352980-1g.html 352980-1-ref.html
fails == 352980-1h.html 352980-1-ref.html
== 352980-1i.html 352980-1-ref.html
== 352980-1j.html 352980-1-ref.html
== 352980-1k.html 352980-1-ref.html
== 352980-1l.html 352980-1-ref.html
== 352980-2a.html 352980-2-ref.html
== 352980-2b.html 352980-2-ref.html
== 352980-2c.html 352980-2-ref.html
== 352980-2d.html 352980-2-ref.html
== 352980-2e.html 352980-2-ref.html
== 352980-2f.html 352980-2-ref.html
== 352980-3a.html 352980-3-ref.html
== 352980-3b.html 352980-3-ref.html
== 352980-3c.html 352980-3-ref.html
== 352980-3d.html 352980-3-ref.html
== 352980-3e.html 352980-3-ref.html
== 352980-3f.html 352980-3-ref.html
fails-if(MOZ_WIDGET_TOOLKIT=="cocoa") == 359903-1.html 359903-1-ref.html # bug 381835
== 359869-1.html 359869-1-ref.html
== 359903-2.html 359903-2-ref.html