-
Notifications
You must be signed in to change notification settings - Fork 813
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
[ads] Fixes error page should not trigger NotifyTab[Text/Html]ContentDidChange #23631
Conversation
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.
LGTM
{ | ||
tab.shouldNotifyAdsServiceTabDidChange = false | ||
let isErrorPage = InternalURL(responseURL)?.isErrorPage == true || response.statusCode >= 400 | ||
let isSessionRestorePage = InternalURL(responseURL)?.isSessionRestore == true |
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.
nit: 'isSessionRestore'
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.
Fixed
let isErrorPage = InternalURL(responseURL)?.isErrorPage == true || response.statusCode >= 400 | ||
let isSessionRestore = InternalURL(responseURL)?.isSessionRestore == true |
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.
Rather than calling InternalUrl(responseURL)? twice, maybe assign to url
and then in the condition call url.isErrorPage and url.isSessionRestore?
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.
Fixed
2aad935
to
7725af9
Compare
Resolves brave/brave-browser#38271
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:
Test Case 1
EXPECTATION:
NotifyTab[Text/Html]ContentDidChange
is not triggeredThere shouldn't be following logs:
Tab id 204824608 HTML content changed
Tab id 204824608 text content changed
Test Case 2
EXPECTATION:
NotifyTab[Text/Html]ContentDidChange
is not triggeredThere shouldn't be following logs:
Tab id 204824608 HTML content changed
Tab id 204824608 text content changed
Test Case 3
EXPECTATION:
NotifyTab[Text/Html]ContentDidChange
is not triggeredThere shouldn't be following logs:
Tab id 204824608 HTML content changed
Tab id 204824608 text content changed