/** Test for Bug 635465 **/
function showSubmenu(event) { var item = document.getElementById('item');
var width = item.offsetWidth; // IT WORKS IF YOU REMOVE THIS LINE
item.className='open';
}
function hideSubmenu(event) {
document.getElementById('item').className='';
}
SimpleTest.waitForExplicitFinish();
function executeTests() {
// First flush out layout of firsthover
ok($("firsthover").getBoundingClientRect().height > 0, "Should have a nonzero height before hover");
// Now trigger a mouseover on firsthover
synthesizeMouseAtCenter($("firsthover"), { type: "mousemove" });
ok($("secondhover").getBoundingClientRect().height > 0, "Should have a nonzero height for submenu after hover");
// Now determine where secondhover is hanging out var rect = $("secondhover").getBoundingClientRect();
synthesizeMouseAtCenter($("secondhover"), { type: "mousemove" });
// And another mouseover one pixel to the right of where the center used to be
synthesizeMouseAtPoint(rect.left + rect.width/2 + 1,
rect.top + rect.height/2,
{ type: "mousemove" });
ok($("secondhover").getBoundingClientRect().height > 0, "Should have a nonzero height for submenu after second hover");
// And check computed display of the menu
is(getComputedStyle($("menu"), "").display, "block", "Should have block display");
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.