-
Notifications
You must be signed in to change notification settings - Fork 839
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto-load via IPFS notification isn't sticky when loading an IPFS/IPNS page #22329
Auto-load via IPFS notification isn't sticky when loading an IPFS/IPNS page #22329
Conversation
browser/ipfs/ipfs_tab_helper.cc
Outdated
@@ -523,6 +532,9 @@ void IPFSTabHelper::DidFinishNavigation(content::NavigationHandle* handle) { | |||
block_redirect_nav_data && block_redirect_nav_data->enable_redirect_block; | |||
|
|||
MaybeCheckDNSLinkRecord(handle->GetResponseHeaders(), auto_redirect_blocked); | |||
if(IsRedirectToSubLevelUrl(handle, GetCurrentPageURL())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why it doesn't work as is?
UpdateLocationBar is also called to update IPFS button state in the omnibar and i see that in the video there is an IPFS button after redirect to /wiki/. Was UpdateLocationBar called?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was UpdateLocationBar called?
No, It wasn't called because after redirect to /wiki/ the host is the same, and only path changed.
For now we have only this condition: resolver_->host() != current.host()
, which prevents us from UpdateLocationBar()
calling.
I propose add the additional one: (resolver_->host() == current.host() && ipfs_resolved_url_.path() != current.path())
to cover the situation when we have only URL's path changed after redirect
71b4868
to
6391368
Compare
Signed-off-by: Vadym Struts <vstruts@brave.com>
6391368
to
46f38f4
Compare
@@ -458,6 +458,7 @@ void IPFSTabHelper::MaybeCheckDNSLinkRecord( | |||
|
|||
if (!IsDNSLinkCheckEnabled() || !headers || ipfs_resolved_url_.is_valid() || | |||
!CanResolveURL(dnslink_target)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a test for this case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
…side redirect Signed-off-by: Vadym Struts <vstruts@brave.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++
Verification PASSED on
Using the STR/Cases outlined via brave/brave-browser#36347 (comment), ensured that loading |
Resolves brave/brave-browser#36347
The problem is related to hiding the auto-load via IPFS infobar because of some redirect.
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
wikinpm run presubmit
wiki,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan: