blob: 1ca0d9fadacddd4423853fca88d45d38a5435d5f [file] [log] [blame]
<!DOCTYPE HTML>
<html>
<head>
</head>
<body>
<p id="description">&lt;select> test for opening two popup menus.</p>
<div id="console"></div>
<p id="debug">PASS if the test didn't crash.</p>
<script>
if (window.testRunner)
testRunner.dumpAsText();
var parent = document.createElement('div');
parent.innerHTML = '<select id="sl1">'
+ '<option>one</option>'
+ '<option>two</option>'
+ '<option>three</option>'
+ '<option>four</option>'
+ '<option>five</option>'
+ '<option>six</option>'
+ '<option>seven</option>'
+ '<option>eight</option>'
+ '<option>nine</option>'
+ '<option>ten</option>'
+ '<option>eleven</option>'
+ '<option>twelve</option>'
+ '<option>thirteen</option>'
+ '<option>fourteen</option>'
+ '<option>fifteen</option>'
+ '<option>sixteen</option>'
+ '<option>seventeen</option>'
+ '</select>'
+ '<select id="sl2">'
+ '<option>one</option>'
+ '<option>two</option>'
+ '<option>three</option>'
+ '</select>';
document.body.appendChild(parent);
function mouseDownOnSelect(selId)
{
var sl = document.getElementById(selId);
var event = document.createEvent("MouseEvent");
event.initMouseEvent("mousedown", true, true, document.defaultView, 1, sl.offsetLeft, sl.offsetTop, sl.offsetLeft, sl.offsetTop, false, false, false, false, 0, document);
sl.dispatchEvent(event);
}
mouseDownOnSelect("sl1");
mouseDownOnSelect("sl2");
</script>
</body>
</html>