|
|
Chromium Code Reviews
DescriptionAdds HTTP check to PresentationRequest creation.
BUG=670848
Review-Url: https://codereview.chromium.org/2566503002
Cr-Commit-Position: refs/heads/master@{#444586}
Committed: https://chromium.googlesource.com/chromium/src/+/a65f8aef002b29053fcd5ef52d118018c596d1c5
Patch Set 1 #
Total comments: 4
Patch Set 2 : Removes protocolIsAbout check. #Patch Set 3 : Adds unittest #
Total comments: 2
Patch Set 4 : Updates to accept cast urls #Patch Set 5 : Updates browser test. #
Messages
Total messages: 33 (14 generated)
lethalantidote@chromium.org changed reviewers: + mfoltz@chromium.org, skonig@chromium.org
Let me know what you think.
mfoltz@chromium.org changed reviewers: + zhaobin@chromium.org - skonig@chromium.org
Thanks, Looks good. Can you update PresentationRequestTest to verify this? Note, pending patch by zhaobin@ is also touching this code. https://codereview.chromium.org/2552343009
lgtm
Thanks for doing this. Could you please double check it works fine for relative url (I think it would be ok)? This will cause merge conflict with my patch. Could you please let me know when you land this? Thanks! https://codereview.chromium.org/2566503002/diff/1/third_party/WebKit/Source/m... File third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp (right): https://codereview.chromium.org/2566503002/diff/1/third_party/WebKit/Source/m... third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp:73: if (!parsedUrl.isValid() || !parsedUrl.protocolIsInHTTPFamily() || Remove parsedUrl.protocolIsAbout() check if we already checked protocolIsInHTTPFamily()?
On 2016/12/09 18:53:02, zhaobin wrote: > Thanks for doing this. Could you please double check it works fine for relative > url (I think it would be ok)? > > This will cause merge conflict with my patch. Could you please let me know when > you land this? Thanks! > > https://codereview.chromium.org/2566503002/diff/1/third_party/WebKit/Source/m... > File third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp > (right): > > https://codereview.chromium.org/2566503002/diff/1/third_party/WebKit/Source/m... > third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp:73: if > (!parsedUrl.isValid() || !parsedUrl.protocolIsInHTTPFamily() || > Remove parsedUrl.protocolIsAbout() check if we already checked > protocolIsInHTTPFamily()? Hi, I am new to this area of the code. I don't see any test files... How does one usually go about testing these sort of things?
https://codereview.chromium.org/2566503002/diff/1/third_party/WebKit/Source/m... File third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp (right): https://codereview.chromium.org/2566503002/diff/1/third_party/WebKit/Source/m... third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp:73: if (!parsedUrl.isValid() || !parsedUrl.protocolIsInHTTPFamily() || On 2016/12/09 18:53:02, zhaobin wrote: > Remove parsedUrl.protocolIsAbout() check if we already checked > protocolIsInHTTPFamily()? I'm not seeing how they overlap with each other. Please explain?
Mark addes a unit test for PresentationRequest (not landed yet https://codereview.chromium.org/2552343009/). You may wait for that or create a unit test for PresentationRequest. https://codereview.chromium.org/2566503002/diff/1/third_party/WebKit/Source/m... File third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp (right): https://codereview.chromium.org/2566503002/diff/1/third_party/WebKit/Source/m... third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp:73: if (!parsedUrl.isValid() || !parsedUrl.protocolIsInHTTPFamily() || On 2016/12/13 02:12:38, CJ wrote: > On 2016/12/09 18:53:02, zhaobin wrote: > > Remove parsedUrl.protocolIsAbout() check if we already checked > > protocolIsInHTTPFamily()? > > I'm not seeing how they overlap with each other. Please explain? !protocolIsInHTTPFamily() means not http or https. about is not http or https, so no need to check protocolIsAbout() again?
@mfoltz, please let me know when ur unittests land. https://codereview.chromium.org/2566503002/diff/1/third_party/WebKit/Source/m... File third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp (right): https://codereview.chromium.org/2566503002/diff/1/third_party/WebKit/Source/m... third_party/WebKit/Source/modules/presentation/PresentationRequest.cpp:73: if (!parsedUrl.isValid() || !parsedUrl.protocolIsInHTTPFamily() || On 2016/12/13 19:06:02, zhaobin wrote: > On 2016/12/13 02:12:38, CJ wrote: > > On 2016/12/09 18:53:02, zhaobin wrote: > > > Remove parsedUrl.protocolIsAbout() check if we already checked > > > protocolIsInHTTPFamily()? > > > > I'm not seeing how they overlap with each other. Please explain? > > !protocolIsInHTTPFamily() means not http or https. about is not http or https, > so no need to check protocolIsAbout() again? Done.
lgtm
The CQ bit was checked by lethalantidote@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The unit tests are landing as part of https://codereview.chromium.org/2552343009.
On 2016/12/15 at 22:12:29, mark a. foltz wrote: > The unit tests are landing as part of https://codereview.chromium.org/2552343009. https://codereview.chromium.org/2552343009/ just landed which adds PresentationRequestTest.cpp. If you rebase and add a unit test, I think this will be ready to land.
On 2017/01/17 21:37:15, mark a. foltz wrote: > On 2016/12/15 at 22:12:29, mark a. foltz wrote: > > The unit tests are landing as part of > https://codereview.chromium.org/2552343009. > > https://codereview.chromium.org/2552343009/ just landed which adds > PresentationRequestTest.cpp. If you rebase and add a unit test, I think this > will be ready to land. PTAL Added unittest.
Could you please verify that presentation layout tests still pass? Instruction for layout tests: https://chromium.googlesource.com/chromium/src/+/master/docs/testing/layout_t... https://codereview.chromium.org/2566503002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/modules/presentation/PresentationRequestTest.cpp (right): https://codereview.chromium.org/2566503002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/modules/presentation/PresentationRequestTest.cpp:50: urls.append("cast://deadbeef?param=foo"); Some layout tests uses url with "cast://". They may break if we are rejecting those urls now. Could you please double check? src/third_party/WebKit/LayoutTests/presentation/presentation-start.html src/third_party/WebKit/LayoutTests/presentation/presentation-navigation-multipleurls.html
https://codereview.chromium.org/2566503002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/modules/presentation/PresentationRequestTest.cpp (right): https://codereview.chromium.org/2566503002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/modules/presentation/PresentationRequestTest.cpp:50: urls.append("cast://deadbeef?param=foo"); On 2017/01/18 at 18:58:22, zhaobin wrote: > Some layout tests uses url with "cast://". They may break if we are rejecting those urls now. Could you please double check? > > src/third_party/WebKit/LayoutTests/presentation/presentation-start.html > src/third_party/WebKit/LayoutTests/presentation/presentation-navigation-multipleurls.html Yeah, now that we have tests for cast:// we should allow it in PresentationRequest.cpp.
On 2017/01/18 20:26:01, mark a. foltz wrote: > https://codereview.chromium.org/2566503002/diff/40001/third_party/WebKit/Sour... > File third_party/WebKit/Source/modules/presentation/PresentationRequestTest.cpp > (right): > > https://codereview.chromium.org/2566503002/diff/40001/third_party/WebKit/Sour... > third_party/WebKit/Source/modules/presentation/PresentationRequestTest.cpp:50: > urls.append("cast://deadbeef?param=foo"); > On 2017/01/18 at 18:58:22, zhaobin wrote: > > Some layout tests uses url with "cast://". They may break if we are rejecting > those urls now. Could you please double check? > > > > src/third_party/WebKit/LayoutTests/presentation/presentation-start.html > > > src/third_party/WebKit/LayoutTests/presentation/presentation-navigation-multipleurls.html > > Yeah, now that we have tests for cast:// we should allow it in > PresentationRequest.cpp. Updated things so that it should work with cast:// and that the layouttests work. PTAL
The CQ bit was checked by lethalantidote@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
lgtm
lgtm
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by lethalantidote@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from mfoltz@chromium.org Link to the patchset: https://codereview.chromium.org/2566503002/#ps80001 (title: "Updates browser test.")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 80001, "attempt_start_ts": 1484788529887540,
"parent_rev": "c11dd43622d564f950c0d1f3e940507e32e25a87", "commit_rev":
"a65f8aef002b29053fcd5ef52d118018c596d1c5"}
Message was sent while issue was closed.
Description was changed from ========== Adds HTTP check to PresentationRequest creation. BUG=670848 ========== to ========== Adds HTTP check to PresentationRequest creation. BUG=670848 Review-Url: https://codereview.chromium.org/2566503002 Cr-Commit-Position: refs/heads/master@{#444586} Committed: https://chromium.googlesource.com/chromium/src/+/a65f8aef002b29053fcd5ef52d11... ==========
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as https://chromium.googlesource.com/chromium/src/+/a65f8aef002b29053fcd5ef52d11... |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
