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

Brave News: do not request ad content multiple times for the same ad unit #9743

Merged
merged 1 commit into from
Aug 13, 2021

Conversation

petemill
Copy link
Member

Resolves brave/brave-browser#17471

Submitter Checklist:

  • I confirm that no security/privacy review is needed, or that I have requested one
  • There is a ticket for my issue
  • Used Github auto-closing keywords in the PR description above
  • Wrote a good PR/commit description
  • Added appropriate labels (QA/Yes or QA/No; release-notes/include or release-notes/exclude; OS/...) to the associated issue
  • Checked the PR locally: npm run test -- brave_browser_tests, npm run test -- brave_unit_tests, npm run lint, npm run gn_check, npm run tslint
  • Ran git rebase master (if needed)

Reviewer Checklist:

  • A security review is not needed, or a link to one is included in the PR description
  • New files have MPL-2.0 license header
  • Adequate test coverage exists to prevent regressions
  • Major classes, functions and non-trivial code blocks are well-commented
  • Changes in component dependencies are properly reflected in gn
  • Code follows the style guide
  • Test plan is specified in PR before merging

After-merge Checklist:

Test Plan:

  • Open NTP
  • Open DevTools and ensure "debug" messages are being shown. Feel free to filter to "Brave News"
    image
  • When scrolling down to Brave Today, ensure that only a single "Brave News: asking for an ad" is logged.

@petemill petemill self-assigned this Aug 12, 2021
Copy link
Contributor

@nullhook nullhook left a comment

Choose a reason for hiding this comment

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

LGTM

@petemill petemill merged commit fe48aec into master Aug 13, 2021
@petemill petemill deleted the news-displayads-fix-double-get branch August 13, 2021 06:46
@bsclifton
Copy link
Member

A bit late - but I did pull the code, build it, and ran through the test plan. Works great! 😄 👍

@petemill
Copy link
Member Author

Thanks @bsclifton !

@stephendonner
Copy link
Contributor

stephendonner commented Aug 17, 2021

Verified PASSED using the test plan here and build

Brave 1.30.27 Chromium: 92.0.4515.159 (Official Build) nightly (x86_64)
Revision 0185b8a19c88c5dfd3e6c0da6686d799e9bc3b52-refs/branch-heads/4515@{#2052}
OS macOS Version 11.5.2 (Build 20G95)

Steps:

  1. new profile
  2. launched Brave
  3. opened the "hamburger" menu, and chose More Tools -> Developer Tools
  4. from the All levels dropdown, added Verbose
  5. opened a new-tab page
  6. scrolled down until I saw an ad
  7. examined console
  8. kept scrolling
  9. examined console

Confirmed I only had a single request for the initial ad: asking for an ad 0; in the logs in that screenshot, is shown asking for an ad 1, after I scrolled down a bit (thus queuing up the next ad).

example example
Screen Shot 2021-08-17 at 3 34 29 PM Screen Shot 2021-08-17 at 3 42 50 PM

Verification PASSED on Win 10 x64 using the following build:

Brave | 1.30.38 Chromium: 93.0.4577.51 (Official Build) nightly (64-bit)
--- | ---
Revision | 762d21050e2da59930c784c09b134d0b0b148188-refs/branch-heads/4577@{#915}
OS | Windows 10 OS Version 2009 (Build 19042.1165)

asking

kjozwiak added a commit that referenced this pull request Aug 20, 2021
…29.x

Uplift #9743 from brave/news-displayads-fix-double-get
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Brave News Display Ad gets served more than once
4 participants