Bug 183394 - http/tests/dom/window-open-about-webkit-org-and-access-document.html is failing with async policy delegates
Summary: http/tests/dom/window-open-about-webkit-org-and-access-document.html is faili...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on:
Blocks: 180568
  Show dependency treegraph
 
Reported: 2018-03-06 19:12 PST by Chris Dumez
Modified: 2018-03-07 11:40 PST (History)
6 users (show)

See Also:


Attachments
Patch (8.27 KB, patch)
2018-03-06 19:31 PST, Chris Dumez
commit-queue: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2018-03-06 19:12:44 PST
http/tests/dom/window-open-about-webkit-org-and-access-document.html is failing with async policy delegates.
Comment 1 Chris Dumez 2018-03-06 19:31:10 PST
Created attachment 335169 [details]
Patch
Comment 2 Alex Christensen 2018-03-07 09:43:47 PST
Comment on attachment 335169 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=335169&action=review

> LayoutTests/ChangeLog:10
> +        newWindow.document, expecting it to throw. However, there is no guarantee that the cross origin URL has

What is the behavior of other browsers in this case?
Comment 3 Chris Dumez 2018-03-07 09:52:05 PST
Comment on attachment 335169 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=335169&action=review

>> LayoutTests/ChangeLog:10
>> +        newWindow.document, expecting it to throw. However, there is no guarantee that the cross origin URL has
> 
> What is the behavior of other browsers in this case?

This exact URL is not easily testable in other browsers.

Firefox does not allow loading such URL:
$ window.open("about://webkit.org")
Error: Access to 'about://webkit.org' from script denied

In Chrome:
$ window.open("about://webkit.org").document.URL
about://webkit.org"

but the URL bar of the popup says about:blank. They also do not treat such window as being cross-origin. John tells me Chrome rewrites the URL to about:blank in such cases.

If I try a proper cross-origin URL:

Firefox and Chrome but return:
$ window.open("https://www.webkit.org").document.URL
"about:blank"

So the behavior for cross-origin URLs is consistent and this is why I believe my change is correct. The issue with "about://webkit.org" is that Chrome does not treat it as cross-origin and Firefox does not even allow opening a window with such URL.
Comment 4 WebKit Commit Bot 2018-03-07 10:38:55 PST
Comment on attachment 335169 [details]
Patch

Rejecting attachment 335169 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-01', 'land-attachment', '--force-clean', '--non-interactive', '--parent-command=commit-queue', 335169, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
st, rewinding head to replay your work on top of it...
Fast-forwarded master to refs/remotes/origin/master.
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
error: The last gc run reported the following. Please correct the root cause
and remove /Volumes/Data/EWS/WebKit/.git/gc.log.
Automatic cleanup will not be performed until the file is removed.

warning: There are too many unreachable loose objects; run 'git prune' to remove them.


Full output: http://webkit-queues.webkit.org/results/6841309
Comment 5 WebKit Commit Bot 2018-03-07 10:50:09 PST
Comment on attachment 335169 [details]
Patch

Rejecting attachment 335169 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-01', 'apply-attachment', '--no-update', '--non-interactive', 335169, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
outTests/http/tests/dom/window-open-about-webkit-org-and-access-document-expected.txt.rej
patching file LayoutTests/http/tests/dom/window-open-about-webkit-org-and-access-document.html
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file LayoutTests/http/tests/dom/window-open-about-webkit-org-and-access-document.html.rej

Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force', '--reviewer', u'Alex Christensen']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

Full output: http://webkit-queues.webkit.org/results/6841433
Comment 6 WebKit Commit Bot 2018-03-07 11:01:23 PST
Comment on attachment 335169 [details]
Patch

Rejecting attachment 335169 [details] from commit-queue.

Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-01', 'apply-attachment', '--no-update', '--non-interactive', 335169, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit

Last 500 characters of output:
outTests/http/tests/dom/window-open-about-webkit-org-and-access-document-expected.txt.rej
patching file LayoutTests/http/tests/dom/window-open-about-webkit-org-and-access-document.html
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file LayoutTests/http/tests/dom/window-open-about-webkit-org-and-access-document.html.rej

Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force', '--reviewer', u'Alex Christensen']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit

Full output: http://webkit-queues.webkit.org/results/6841558
Comment 7 Chris Dumez 2018-03-07 11:40:39 PST
Looks like the CQ committed it anyway in 229369.