Bug 924972 - Enforce the focus before running every subtest of test_reftests_with_caret.html

This commit is contained in:
Ehsan Akhgari 2014-01-21 15:45:18 -05:00
parent c285ba396d
commit a750d4ee2a
2 changed files with 2 additions and 3 deletions

View File

@ -1,7 +1,6 @@
<html class="reftest-wait">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
</head>
<body onload="start()">
<iframe src="data:text/html,<body contenteditable>foo bar"></iframe>
@ -12,7 +11,7 @@
var doc = iframe.contentDocument;
setTimeout(function() {
synthesizeMouse(iframe, 10, 10, {});
doc.body.focus();
// Now try to set the caret without moving it
win.getSelection().collapse(doc.body.firstChild, 1);

View File

@ -39,7 +39,7 @@ function callbackTestCanvas(canvas)
reference.parentNode.removeChild(reference);
}
canvases = [];
nextTest();
SimpleTest.waitForFocus(nextTest);
}
function doSnapShot(iframe) {