blob: 5a09262dbdfa8ef3d014f6ce0e4deb8e52aa1de3 [file] [log] [blame]
<!DOCTYPE html>
<html>
<p>This test ensures context click around meter won't crash.</p>
<div id='container' style="width:100px; height: 100px"></div>
<p>PASS</p>
<script src="../editing.js"></script>
<script>
if (window.testRunner)
testRunner.dumpAsText();
var container = document.getElementById('container');
var shadowRoot = container.createShadowRoot();
var meter = document.createElement('meter');
shadowRoot.appendChild(meter);
// Do doubleclick at various points.
doubleClick(meter.offsetLeft, meter.offsetTop);
doubleClick(meter.offsetLeft - 1, meter.offsetTop);
doubleClick(meter.offsetLeft, meter.offsetTop - 1);
doubleClick(meter.offsetLeft - 1, meter.offsetTop - 1);
doubleClick(meter.offsetLeft + 1, meter.offsetTop);
doubleClick(meter.offsetLeft, meter.offsetTop + 1);
doubleClick(meter.offsetLeft + 1, meter.offsetTop + 1);
doubleClick(meter.offsetLeft + meter.offsetWidth / 2, meter.offsetTop + meter.offsetHeight / 2);
doubleClick(meter.offsetLeft + meter.offsetWidth - 1, meter.offsetTop + meter.offsetHeight - 1);
doubleClick(meter.offsetLeft + meter.offsetWidth + 1, meter.offsetTop + meter.offsetHeight + 1);
</script>
</body>
</html>