Make this test actually test the right thing

This commit is contained in:
Boris Zbarsky 2009-07-28 13:19:17 -04:00
parent d8e3f09412
commit d5f00639ad
2 changed files with 5 additions and 31 deletions

View File

@ -10,25 +10,6 @@
vertical-align: top;
}
</style>
<script type="text/javascript" language="JavaScript">
/**
* Display the element 'idShow' and hide the element 'idHide'.
*
* @param idShow the id of the element to show.
* @param idHide the id of the element to hide.
*/
toggleElements = function(idShow, idHide)
{
var elementHide = document.getElementById(idHide);
var elementShow = document.getElementById(idShow);
if (elementHide && elementShow)
{
elementHide.style.display = 'none';
elementShow.style.display = '';
}
}
</script>
</head>
<body>
@ -47,10 +28,7 @@
hello
</td>
<td >
<span id="A" style="" onclick="toggleElements('B', 'A')">
Click me!
</span>
<span id="B" style="display: none;" onclick="toggleElements('A', 'B')">
<span id="B" >
Now I am<br />
higher.<br />

View File

@ -31,14 +31,10 @@
}
function doTest()
{
toggleElements('B', 'A');
document.documentElement.removeAttribute("class");
}
function toggleElements2()
{
toggleElements('B', 'A');
}
document.addEventListener("MozReftestInvalidate", doTest, false);
setTimeout(toggleElements2, 200);
window.addEventListener("MozReftestInvalidate", doTest, false);
</script>
</head>
@ -58,10 +54,10 @@
hello
</td>
<td >
<span id="A" style="" onclick="toggleElements('B', 'A')">
<span id="A">
Click me!
</span>
<span id="B" style="display: none;" onclick="toggleElements('A', 'B')">
<span id="B" style="display: none;" >
Now I am<br />
higher.<br />