blob: 19f1522975f4bc4ed2530aa3371a71da0c1f402b [file] [log] [blame]
function runTest(frame, offsetInFrame, runAsync)
{
if (!window.testRunner)
return;
offsetInFrame = offsetInFrame || 5;
// FIXME: For some reason the (x, y) coordinates of the hyperlink "Run test" is offset 2 pixels
// in legacy WebKit (why?).
var fudgeFactor = UIHelper.isWebKit2() ? 0 : 2;
var promise = UIHelper.activateAt(frame.offsetLeft + offsetInFrame + fudgeFactor, frame.offsetTop + offsetInFrame + fudgeFactor);
if (runAsync)
return promise;
UIHelper.wait(promise);
}