Created attachment 309191 [details] test case Consider the following test: <!DOCTYPE html> <body contenteditable> <script> testRunner.dumpAsText(); testRunner.waitUntilDone(); testRunner.setCanOpenWindows(true); document.body.focus(); var popupDocument = window.open("about:blank", "new").document; var script = popupDocument.createElement("script"); script.innerText = "eventSender.keyDown('a'); testRunner.notifyDone();"; popupDocument.body.appendChild(script); </script> The test result will be "a", which means the keyDown event from the popup window went to the originating window instead. This problem exists in both DumpRenderTree and WebKitTestRunner.
<rdar://problem/32020281>