Attaching a test that hangs
Created attachment 6835 [details] test that hangs
<rdar://problem/4454360> layout tests that use eventSender hang
Created attachment 6838 [details] Reduction The problem here is that when you mousedown in a native widget (in this case a text field), it enters its own mouse-tracking runloop until the mouse is released. (The reason this doesn't happen with the first mousedown in the first attachment is that the onfocus handler fires first; you will probably want to call test() only once, either as onfocus handler or from step1, and also add a mouseup between the two mousedowns, if you can get around this bug).
Vicki handed this testcase off to me, and I hadn't even looked at it when I brought it over to radar. She wanted to create a testcase for the fix for 7363. The fact that there is a mouseDown with no mouseUp just looks like a mistake, and not something that is necessary to test her fix. I'm closing this bug.
(In reply to comment #4) In case it wasn't clear from my previous comment, the missing mouseUp is not what's making the test hang. I think it might be possible to test the fix without mouse events by calling focus() on the text fields.
(In reply to comment #3) > The problem here is that when you mousedown in a native widget (in this case a > text field), it enters its own mouse-tracking runloop until the mouse is > released. I thought that this meant that we would just need to send a mouseUp event. Sending a mouseUp has no effect. I'm reopening. > I think it might be possible to test the fix without mouse events by calling > focus() on the text fields. I agree, I wrote two testcases for Vicki's fix for 7363 and I'll check them in once she reviews them.
This is b/c JS is suspended while the mouse is down over native widgets. Mitz's idea is to add a click method to eventSender. I'm going to let him work on this.
Created attachment 6943 [details] Add eventSender.click() for native widgets This implementation of click should only be used with native widgets. Implementing a second "convenience" code path that simply does a mouseDown followed by a mouseUp requires [WebHTMLView _hitViewForEvent:], which is internal.
Comment on attachment 6943 [details] Add eventSender.click() for native widgets OK, r=me