mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 670058 part.2 Add regression test r=smaug
This commit is contained in:
parent
45e96cf000
commit
0e4868c8d9
@ -137,6 +137,7 @@ _CHROME_FILES = \
|
||||
file_bug514732_window.xul \
|
||||
test_selection_scrolling.html \
|
||||
window_selection_scrolling.html \
|
||||
test_bug670058.html \
|
||||
$(NULL)
|
||||
|
||||
libs:: $(_TEST_FILES)
|
||||
|
52
layout/generic/test/test_bug670058.html
Normal file
52
layout/generic/test/test_bug670058.html
Normal file
@ -0,0 +1,52 @@
|
||||
<!DOCTYPE>
|
||||
<html>
|
||||
<head>
|
||||
<title>test for bug 670058</title>
|
||||
<script type="text/javascript"
|
||||
src="chrome://mochikit/content/MochiKit/packed.js"></script>
|
||||
<script type="text/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="chrome://mochikit/content/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
<textarea id="textarea" style="width: 200px; height: 100px;"></textarea>
|
||||
<pre id="test">
|
||||
<script class="testbody" type="text/javascript">
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
var textarea = document.getElementById('textarea');
|
||||
|
||||
var x = 50;
|
||||
var y = 50;
|
||||
|
||||
var timer = 0;
|
||||
|
||||
function doTest() {
|
||||
synthesizeMouse(textarea, x, y, { type: "mousedown" });
|
||||
|
||||
timer = setInterval(function()
|
||||
{
|
||||
if (textarea.style.display == 'block') {
|
||||
synthesizeMouse(textarea, x++, y++, { type: "mousemove" });
|
||||
textarea.style.display = '';
|
||||
} else {
|
||||
textarea.style.display = 'block';
|
||||
synthesizeMouse(textarea, x++, y++, { type: "mousemove" });
|
||||
}
|
||||
if (x == 70) {
|
||||
ok(true, "not crashed");
|
||||
clearInterval(timer);
|
||||
SimpleTest.finish();
|
||||
}
|
||||
}, 200);
|
||||
}
|
||||
|
||||
SimpleTest.waitForFocus(doTest, window);
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user