Skip to content
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

Fix wrong location icon and page info bubble of brave page #1722

Closed
wants to merge 3 commits into from

Conversation

simonhong
Copy link
Member

@simonhong simonhong commented Feb 19, 2019

Currently we use brave schemed url as a virtual url of navigation entry.
However, Location area uses virtual url to check whether it is chrome page
or not. So, our webui bypassed. To show proper icon and bubble for brave page,
brave scheme url should be also checked.

Fix brave/brave-browser#3411

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Verified that these changes build without errors on
    • Windows
    • macOS
    • Linux
  • Verified that these changes pass automated tests (npm test brave_unit_tests && npm test brave_browser_tests) on
    • Windows
    • macOS
    • Linux
  • Ran git rebase master (if needed).
  • Ran git rebase -i to squash commits (if needed).
  • Tagged reviewers and labelled the pull request as needed.
  • Request a security/privacy review as needed.
  • Add appropriate QA labels (QA/Yes or QA/No) to include the closed issue in milestone

Test Plan:

Please refer to STR in brave/brave-browser#3411
PageInfoBubbleViewTest.BraveURLTest
BraveLocationIconViewTest.BraveURLTest
BraveBrowserLocationBarModelDelegateTest.VectorIconOverrideTest

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

@simonhong simonhong added this to the 0.62.x - Dev milestone Feb 19, 2019
@simonhong simonhong self-assigned this Feb 19, 2019
@simonhong simonhong force-pushed the fix_location_icon_and_page_info_bubble branch 2 times, most recently from 21c582a to 85692c8 Compare February 19, 2019 10:17
Currently we use brave schemed url as a virtual url of navigation entry.
However, Location area uses virtual url to check whether it is chrome page
or not. So, our webui bypassed. To show proper icon and bubble for brave page,
brave scheme url should be also checked.
@simonhong simonhong force-pushed the fix_location_icon_and_page_info_bubble branch from 85692c8 to e612f10 Compare February 19, 2019 10:38
@simonhong simonhong changed the title WIP: Fix wrong location icon and page info bubble of brave page Fix wrong location icon and page info bubble of brave page Feb 19, 2019
@@ -0,0 +1,24 @@
diff --git a/chrome/browser/ui/views/page_info/page_info_bubble_view.cc b/chrome/browser/ui/views/page_info/page_info_bubble_view.cc
index ebe5987d5b4239e09a9b255b0d73ec9f7ad74fe9..933b15b53b86376e63a425701ae8cb8571d8b692 100644
--- a/chrome/browser/ui/views/page_info/page_info_bubble_view.cc
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't avoid this patch file because multiple PageInfoBubbleView::CreatePageInfoBubble() is used in this file and InternalPageInfoBubbleView class is in anonymous namespace.

Add test cases for BraveBrowserLocationBarModelDelegate,
BraveLocationIconView and PageInfoBubbleView.

All new tests check whether these classes handle brave url properly.
@simonhong simonhong force-pushed the fix_location_icon_and_page_info_bubble branch from ef98cfc to d399680 Compare February 22, 2019 22:06
@simonhong
Copy link
Member Author

kindly ping..

@petemill
Copy link
Member

@simonhong please can we squash the 3 commits since they're all the same feature

@petemill
Copy link
Member

...at least for the tests. For the lint if it's fixing unrelated changes that were required because you modified those files then IMO good to keep separate commit 👍

@petemill
Copy link
Member

I'm going to defer review to @bridiver as long as he can get to it before 0.62.x hits beta, for the following reasons:

  • He worked on the PR which introduced this, so may have an opinion
  • Can speak to whether it's better to take this approach of all these subclasses, or to do a couple small patches to make sure chromium's conditionals include brave:// when they look for chrome://

@simonhong
Copy link
Member Author

@petemill Thanks for review! I'll wait @bridiver and then do PR cleanup you suggested :)

@simonhong
Copy link
Member Author

Wrote closed reason for record. @bridiver will fix this issue with another approach.

@simonhong simonhong deleted the fix_location_icon_and_page_info_bubble branch May 28, 2019 12:40
fmarier pushed a commit that referenced this pull request Oct 29, 2019
docs/installing: Add new public key URL for new signing key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong location icon and page info bubble of brave page
3 participants