RESOLVED FIXED 32761
upstream LayoutTests/http/tests/misc/set-window-opener-to-null.html
https://bugs.webkit.org/show_bug.cgi?id=32761
Summary upstream LayoutTests/http/tests/misc/set-window-opener-to-null.html
Dirk Pranke
Reported 2009-12-18 18:27:18 PST
upstreaming a test from Chromium.org - it seems to rely on some Chromium-specific timing issues, so I'm putting it in platform/chromium for now.
Attachments
Patch (3.44 KB, patch)
2009-12-18 18:28 PST, Dirk Pranke
no flags
Patch (3.05 KB, patch)
2009-12-21 15:37 PST, Dirk Pranke
no flags
Patch (3.39 KB, patch)
2009-12-21 17:54 PST, Dirk Pranke
abarth: review-
Dirk Pranke
Comment 1 2009-12-18 18:28:10 PST
WebKit Review Bot
Comment 2 2009-12-18 18:31:47 PST
style-queue ran check-webkit-style on attachment 45216 [details] without any errors.
Eric Seidel (no email)
Comment 3 2009-12-19 11:56:15 PST
Looks OK. Seems we might want some sort of comment in the test that it need not be chromium specific.
Dirk Pranke
Comment 4 2009-12-21 15:37:54 PST
Dirk Pranke
Comment 5 2009-12-21 15:39:23 PST
Actually, it looks like it's not a platform-specific test, so I've revised the patch (which is good, because run_webkit_tests isn't set up to handle platform-specific http tests)
WebKit Review Bot
Comment 6 2009-12-21 15:42:33 PST
style-queue ran check-webkit-style on attachment 45355 [details] without any errors.
Adam Barth
Comment 7 2009-12-21 15:44:57 PST
Comment on attachment 45355 [details] Patch 22 // We might want to change it to using postMessage when it 23 // is supported. postMessage is supported. Can we use that instead of polling?
Dirk Pranke
Comment 8 2009-12-21 17:52:06 PST
okay, it looks like the key thing is simply to check whether or not window.opener stays null. Unfortunately, there doesn't seem to be a way to do this without using some sort of a timeout or a poll, since by setting window.opener to NULL, we prevent the target window from having a handle to the source. So, the source window has to send a message to the target, giving it a reference. But, if you post a message immediately after window.open(), the message gets dropped on the floor because the target window hasn't initialized yet. Sigh. Anyway, revised patch uploaded.
Dirk Pranke
Comment 9 2009-12-21 17:54:31 PST
Adam Barth
Comment 10 2009-12-21 18:03:38 PST
Comment on attachment 45361 [details] Patch I actually like the previous version better. Julie will kill me if we land this one.
Dirk Pranke
Comment 11 2009-12-21 18:30:05 PST
heh. At least I got to spend some time learning how to use PostMessage() as a result of this ...
Adam Barth
Comment 12 2009-12-21 18:43:15 PST
Sorry for the wild goose chase. :(
WebKit Commit Bot
Comment 13 2009-12-21 20:31:23 PST
Comment on attachment 45355 [details] Patch Clearing flags on attachment: 45355 Committed r52477: <http://trac.webkit.org/changeset/52477>
WebKit Commit Bot
Comment 14 2009-12-21 20:31:29 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.