|
|
Chromium Code Reviews|
Created:
6 years, 6 months ago by raymes Modified:
6 years, 5 months ago Reviewers:
Nate Chapin CC:
blink-reviews, gavinp+loader_chromium.org, chrome-apps-syd-reviews_chromium.org Base URL:
https://chromium.googlesource.com/chromium/blink.git@master Project:
blink Visibility:
Public. |
DescriptionGive the RequestFetcher access to cross-origin URLs when allowed
Previously even if the URL loader was configured to have cross origin access
this bit was not sent through to the RequestFetcher so that access could be
granted. This CL adds that information to the FetchRequest so that
RequestFetcher::canRequest gives the correct result in these cases.
BUG=386920
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=178029
Patch Set 1 #Patch Set 2 : #Patch Set 3 : #Patch Set 4 : #Patch Set 5 : #
Total comments: 1
Patch Set 6 : #
Messages
Total messages: 35 (0 generated)
Starting with japhet@ - please point me to the right place! Thanks!
LGTM. Test?
Can you give me a suggestion as to where to add a test? Ideally we could just unit-test this change...but I'm guessing it's not easy to do. Thanks!
On 2014/06/23 03:35:03, raymes wrote: > Can you give me a suggestion as to where to add a test? Ideally we could just > unit-test this change...but I'm guessing it's not easy to do. > > Thanks! I'd guess this could be done via Source/web/tests/WebFrameTest using WebFrame::createAssociatedURLLoader?
On 2014/06/23 17:39:32, Nate Chapin wrote: > On 2014/06/23 03:35:03, raymes wrote: > > Can you give me a suggestion as to where to add a test? Ideally we could just > > unit-test this change...but I'm guessing it's not easy to do. > > > > Thanks! > > I'd guess this could be done via Source/web/tests/WebFrameTest using > WebFrame::createAssociatedURLLoader? Using createAssociatedURLLoader was going to be harder because it only supports async requests. It was much easier to test the DocumentThreadableLoader directly. As such this could actually be a unittest for DocumentThreadableLoader but I couldn't work out how to spin up enough of the frame to get it to work.
On 2014/06/24 05:18:57, raymes wrote: > On 2014/06/23 17:39:32, Nate Chapin wrote: > > On 2014/06/23 03:35:03, raymes wrote: > > > Can you give me a suggestion as to where to add a test? Ideally we could > just > > > unit-test this change...but I'm guessing it's not easy to do. > > > > > > Thanks! > > > > I'd guess this could be done via Source/web/tests/WebFrameTest using > > WebFrame::createAssociatedURLLoader? > > Using createAssociatedURLLoader was going to be harder because it only supports > async requests. It was much easier to test the DocumentThreadableLoader > directly. As such this could actually be a unittest for DocumentThreadableLoader > but I couldn't work out how to spin up enough of the frame to get it to work. Unfortunately, we don't have good ways to create tests that can do real loads in Source/core, so I usually dump them into Source/web/tests (WebFrameTest or WebViewTest). Those can mock out loads in ways that look completely real to blink, and you should be able to reach in and grab the Document to create a ThreadableLoader. You could also check whether Source/web/tests/AssociatedURLLoaderTest is close enough to your purposes. I forgot that existed.
Thanks - I did upload a new patchset with the last comment (not sure if you saw it) but it might be along the lines of what you were suggesting :) On Wed, Jun 25, 2014 at 4:00 AM, <japhet@chromium.org> wrote: > On 2014/06/24 05:18:57, raymes wrote: >> >> On 2014/06/23 17:39:32, Nate Chapin wrote: >> > On 2014/06/23 03:35:03, raymes wrote: >> > > Can you give me a suggestion as to where to add a test? Ideally we >> > > could >> just >> > > unit-test this change...but I'm guessing it's not easy to do. >> > > >> > > Thanks! >> > >> > I'd guess this could be done via Source/web/tests/WebFrameTest using >> > WebFrame::createAssociatedURLLoader? > > >> Using createAssociatedURLLoader was going to be harder because it only > > supports >> >> async requests. It was much easier to test the DocumentThreadableLoader >> directly. As such this could actually be a unittest for > > DocumentThreadableLoader >> >> but I couldn't work out how to spin up enough of the frame to get it to >> work. > > > Unfortunately, we don't have good ways to create tests that can do real > loads in > Source/core, so I usually dump them into Source/web/tests (WebFrameTest or > WebViewTest). Those can mock out loads in ways that look completely real to > blink, and you should be able to reach in and grab the Document to create a > ThreadableLoader. > > You could also check whether Source/web/tests/AssociatedURLLoaderTest is > close > enough to your purposes. I forgot that existed. > > https://codereview.chromium.org/344883006/ To unsubscribe from this group and stop receiving emails from it, send an email to blink-reviews+unsubscribe@chromium.org.
ping
On 2014/06/30 00:25:28, raymes wrote: > ping LGTM
The CQ bit was checked by raymes@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/raymes@chromium.org/344883006/60001
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_blink_dbg on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_dbg/builds/1...) linux_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/1...) mac_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/mac_blink_rel/builds/13887) win_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/14984)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/1...)
The CQ bit was checked by raymes@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/raymes@chromium.org/344883006/60001
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_blink_dbg on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_dbg/builds/1...) linux_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/1...) mac_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/mac_blink_rel/builds/13897) win_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/14984)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/1...)
Hey Nate, Could you please take a look at the patch one more time. One of the layout tests failed. It's in web inspector. The test assumes that loading a local file should fail from the inspector. I'm not quite sure why that is assumed to be the case? Is there anyone who would know more about this. Note that I verified in this case that the DocumentThreadableLoader has its crossOriginRequestPolicy set to be AllowCrossOriginRequests. This should allow it to load local files, correct? I don't want to get this wrong :) Note that in Pepper it assumed that AllowCrossOriginRequests grants universal permissions to the URL loader (which is what this change permits). This may not be the case though. Thanks!
LGTM Sorry for the perpetual delays, I've been on leave and only checking reviews sporadically. https://codereview.chromium.org/344883006/diff/80001/Source/web/tests/WebFram... File Source/web/tests/WebFrameTest.cpp (right): https://codereview.chromium.org/344883006/diff/80001/Source/web/tests/WebFram... Source/web/tests/WebFrameTest.cpp:5634: // requires spin-up of a frame. It may be possible to remove that requirement FWIW, this is a nearly universal problem with anything in core/loader/ or core/fetch/.
On 2014/07/07 17:24:52, Nate Chapin wrote: > LGTM > > Sorry for the perpetual delays, I've been on leave and only checking reviews > sporadically. > > https://codereview.chromium.org/344883006/diff/80001/Source/web/tests/WebFram... > File Source/web/tests/WebFrameTest.cpp (right): > > https://codereview.chromium.org/344883006/diff/80001/Source/web/tests/WebFram... > Source/web/tests/WebFrameTest.cpp:5634: // requires spin-up of a frame. It may > be possible to remove that requirement > FWIW, this is a nearly universal problem with anything in core/loader/ or > core/fetch/. No worries, thanks!
The CQ bit was checked by raymes@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/raymes@chromium.org/344883006/80001
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_blink_compile_dbg on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/android_blink_compile_db...) android_blink_compile_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/android_blink_compile_re...) android_chromium_gn_compile_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/android_chromium_gn_comp...) blink_presubmit on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/blink_presubmit/builds/9523) linux_blink_dbg on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_dbg/builds/1...) linux_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_blink_rel/builds/1...) linux_chromium_gn_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/linux_chromium_gn_rel/bu...) mac_blink_compile_dbg on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/mac_blink_compile_dbg/bu...) mac_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/mac_blink_rel/builds/14519) win_blink_compile_dbg on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/win_blink_compile_dbg/bu...) win_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/15781) linux_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/linux_gpu/builds/...) mac_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu/builds/25650)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: mac_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/mac_gpu/builds/25681)
The CQ bit was checked by raymes@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/raymes@chromium.org/344883006/100001
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/16664)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_blink_rel on tryserver.blink (http://build.chromium.org/p/tryserver.blink/builders/win_blink_rel/builds/16670)
The CQ bit was checked by raymes@chromium.org
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/raymes@chromium.org/344883006/100001
Message was sent while issue was closed.
Change committed as 178029 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
