Bug 171740 - EventSender dispatches events to the main web view even when running in a popup window
Summary: EventSender dispatches events to the main web view even when running in a pop...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-05-05 11:25 PDT by Andy Estes
Modified: 2017-05-05 11:25 PDT (History)
2 users (show)

See Also:


Attachments
test case (432 bytes, text/html)
2017-05-05 11:25 PDT, Andy Estes
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Estes 2017-05-05 11:25:03 PDT
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.
Comment 1 Radar WebKit Bug Importer 2017-05-05 11:25:42 PDT
<rdar://problem/32020281>