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 should be a c++ browser-side API that can be usable from Android Java and WebUI JS #18787

Closed
petemill opened this issue Oct 15, 2021 · 3 comments · Fixed by brave/brave-core#9946

Comments

@petemill
Copy link
Member

Description

Move Brave News fetching and parsing from Extension background page to c++ browser side Mojom API.

All Brave News functionality should be exactly the same before and after.

Test Plan

  • Feed renders
  • Images render
  • Repeating order of cards are the same
  • Display Ads render occasionally
  • Promoted items render
  • "Deals" render
  • Sources can be switched off and on by the user
  • Feed refreshes and removes sources from user-disabled sources
  • Feed refreshes periodically through the day
@GeetaSarvadnya
Copy link

GeetaSarvadnya commented Nov 26, 2021

Verification passed on


Brave | 1.33.90 Chromium: 96.0.4664.45 (Official Build) beta (64-bit)
-- | --
Revision | 76e4c1bb2ab4671b8beba3444e61c0f17584b2fc-refs/branch-heads/4664@{#947}
OS | Windows 10 Version 21H2 (Build 19044.1387)

Clean profile

Case 1: Feed renders and Images render
  • Confirmed https://brave-today-cdn.brave.com & https://pcdn.brave.com (via Charles) are contacted only when the user starts scrolling through the brave news feeds
  • Confirmed https://brave-today-cdn.brave.com downloads feed.json & sources.json (via Charles) when the user starts scrolling through the brave news feeds
  • Confirmed click on Show Brave News shows the brave news feeds
  • Confirmed content cards are loading the images correctly in feeds when the brave news feed is scrolled down
  • Confirmed click on any image/link on news feed redirects to correct target link
  • Confirmed images render properly on brave news feeds when any publisher is enabled/disabled via Sources
Case 2: Promoted items render
Promoted content Ad brave://rewards Ads history
image image image

Promoted content Ad

[15324:19168:1129/153324.852:VERBOSE3:promoted_content_ad_event_viewed.cc(23)] Viewed promoted content ad with uuid d3879968-7b70-4eb9-ae10-cd21184befbb and creative instance id 598d13ca-47ce-403b-a43d-b02e88057005
[15324:19168:1129/153324.853:VERBOSE1:confirmations.cc(93)] Confirming view for creative instance id 598d13ca-47ce-403b-a43d-b02e88057005
[15324:19168:1129/153324.862:VERBOSE1:redeem_unblinded_token.cc(53)] Redeem unblinded token
[15324:19168:1129/153324.864:VERBOSE1:redeem_unblinded_token.cc(67)] CreateConfirmation
[15324:19168:1129/153324.866:VERBOSE2:redeem_unblinded_token.cc(68)] POST /v1/confirmation/{confirmation_id}/{credential}
[15324:19168:1129/153324.868:VERBOSE6:redeem_unblinded_token.cc(72)] URL Request:
  URL: https://ads-serve.bravesoftware.com/v1/confirmation/e4fe858d-507a-4f8e-9fa3-120b9995dd5e/eyJwYXlsb2FkIjoie1wiYmxpbmRlZFBheW1lbnRUb2tlblwiOlwiWXJ1cHZaVnBEUmZhRC9wYUR2N2hlSFl1dXhDdXJONDM3VzRDTVpMMDhuaz1cIixcImJ1aWxkQ2hhbm5lbFwiOlwiYmV0YVwiLFwiY3JlYXRpdmVJbnN0YW5jZUlkXCI6XCI1OThkMTNjYS00N2NlLTQwM2ItYTQzZC1iMDJlODgwNTcwMDVcIixcInBheWxvYWRcIjp7fSxcInBsYXRmb3JtXCI6XCJ3aW5kb3dzXCIsXCJzdHVkaWVzXCI6W10sXCJ0eXBlXCI6XCJ2aWV3XCJ9Iiwic2lnbmF0dXJlIjoibmUvdXlqc0tWQXdnUWNtWVpnSllGMUtDR3BKT1Z3Q2Z4RlFUY2ZCTmYveUk5SnU5cER3R3dMM3k1LzFnOEEwaVMxRUpiNFZac1pMdUwrL2FGeDFoaWc9PSIsInQiOiJQVDZXMjl5YU0xeXBzN1RleE1ZbmVTbkYyUnllQjh4SGdvdm4xN1pHdTJpTlQrTE9VeDRXaUJOOEhsMUdRY1A0SkxOMjNCRE9SMkMzaHVHZEprdGJ4Zz09In0=
  Content: {"blindedPaymentToken":"YrupvZVpDRfaD/paDv7heHYuuxCurN437W4CMZL08nk=","buildChannel":"beta","creativeInstanceId":"598d13ca-47ce-403b-a43d-b02e88057005","payload":{},"platform":"windows","studies":[],"type":"view"}
  Content Type: application/json
  Method: kPost
[15324:19168:1129/153324.872:VERBOSE6:promoted_content_ad_event_viewed.cc(31)] Successfully logged promoted content ad viewed event
[15324:19168:1129/153324.885:VERBOSE3:promoted_content_ad_event_served.cc(23)] Served promoted content ad with uuid d3879968-7b70-4eb9-ae10-cd21184befbb and creative instance id 598d13ca-47ce-403b-a43d-b02e88057005
[15324:19168:1129/153324.897:VERBOSE6:promoted_content_ad_event_served.cc(31)] Successfully logged promoted content ad served event
[15324:19168:1129/153325.648:VERBOSE1:redeem_unblinded_token.cc(83)] OnCreateConfirmation
[15324:19168:1129/153325.649:VERBOSE6:redeem_unblinded_token.cc(85)] URL Response:
  URL: https://ads-serve.bravesoftware.com/v1/confirmation/e4fe858d-507a-4f8e-9fa3-120b9995dd5e/eyJwYXlsb2FkIjoie1wiYmxpbmRlZFBheW1lbnRUb2tlblwiOlwiWXJ1cHZaVnBEUmZhRC9wYUR2N2hlSFl1dXhDdXJONDM3VzRDTVpMMDhuaz1cIixcImJ1aWxkQ2hhbm5lbFwiOlwiYmV0YVwiLFwiY3JlYXRpdmVJbnN0YW5jZUlkXCI6XCI1OThkMTNjYS00N2NlLTQwM2ItYTQzZC1iMDJlODgwNTcwMDVcIixcInBheWxvYWRcIjp7fSxcInBsYXRmb3JtXCI6XCJ3aW5kb3dzXCIsXCJzdHVkaWVzXCI6W10sXCJ0eXBlXCI6XCJ2aWV3XCJ9Iiwic2lnbmF0dXJlIjoibmUvdXlqc0tWQXdnUWNtWVpnSllGMUtDR3BKT1Z3Q2Z4RlFUY2ZCTmYveUk5SnU5cER3R3dMM3k1LzFnOEEwaVMxRUpiNFZac1pMdUwrL2FGeDFoaWc9PSIsInQiOiJQVDZXMjl5YU0xeXBzN1RleE1ZbmVTbkYyUnllQjh4SGdvdm4xN1pHdTJpTlQrTE9VeDRXaUJOOEhsMUdRY1A0SkxOMjNCRE9SMkMzaHVHZEprdGJ4Zz09In0=
  Response Status Code: 201
  Response: {"id":"e4fe858d-507a-4f8e-9fa3-120b9995dd5e","payload":{},"createdAt":"2021-11-29T10:03:28.247Z","type":"view","modifiedAt":"2021-11-29T10:03:28.247Z","creativeInstanceId":"598d13ca-47ce-403b-a43d-b02e88057005"}
[15324:19168:1129/153325.650:VERBOSE1:redeem_unblinded_token.cc(111)] FetchPaymentToken
[15324:19168:1129/153325.659:VERBOSE2:redeem_unblinded_token.cc(112)] GET /v1/confirmation/{confirmation_id}/paymentToken
[15324:19168:1129/153325.660:VERBOSE6:redeem_unblinded_token.cc(116)] URL Request:
  URL: https://ads-serve.bravesoftware.com/v1/confirmation/e4fe858d-507a-4f8e-9fa3-120b9995dd5e/paymentToken
  Method: kGet
[15324:19168:1129/153326.009:VERBOSE1:redeem_unblinded_token.cc(127)] OnFetchPaymentToken
[15324:19168:1129/153326.009:VERBOSE6:redeem_unblinded_token.cc(129)] URL Response:
  URL: https://ads-serve.bravesoftware.com/v1/confirmation/e4fe858d-507a-4f8e-9fa3-120b9995dd5e/paymentToken
  Response Status Code: 200
  Response: {"id":"e4fe858d-507a-4f8e-9fa3-120b9995dd5e","createdAt":"2021-11-29T10:03:28.247Z","type":"view","modifiedAt":"2021-11-29T10:03:28.296Z","creativeInstanceId":"598d13ca-47ce-403b-a43d-b02e88057005","paymentToken":{"publicKey":"pICtiw5t71ACXVZQnNLJRKmNdlQs9J4jKXMQen5RQDk=","batchProof":"vDbMRpsINhhe5lHZq8YLh4u0w6ByFbnoJXq2PluEYAukiVMN2ADtBo3hYCyC3wDoYT3FMyTIAM7N7JAL7hBFAg==","signedTokens":["VH9mvNMKxitJS7xu5wMEgEIss2UXG0QM7AMx8PjeqGk="]}}
[15324:19168:1129/153326.011:VERBOSE1:confirmations.cc(260)] Successfully redeemed unblinded token with confirmation id e4fe858d-507a-4f8e-9fa3-120b9995dd5e, creative instance id 598d13ca-47ce-403b-a43d-b02e88057005 and view
[15324:19168:1129/153326.019:VERBOSE1:confirmations.cc(283)] Added 1 unblinded payment token with an estimated redemption value of 0.01 BAT, you now have 4 unblinded payment tokens
Case 3: Sources can be switched off and on by the user/Feed refreshes and removes sources from user-disabled sources
  • Click on Customize and ensure brave news Sources are shown in 1.33.x
  • Confirmed all the sources are shown in Beta (1.33.x) but the ordering of sources is not the same as RC (1.32.x), encountered Brave News' Sources ordering differs from current release #19731
  • Confirmed users can turn on/off the sources via Customize
  • Turn ON Car source switches via Brave News->Sources->Cars
  • Ensured brave news feed for Car sources are shown when brave news feed is scrolled up/down
  • Encountered Empty flyout dialog/button on WSJ / Car and Driver heading clicks #14196
  • Turn OFF Car source switches via Brave News->Sources->Cars
  • Ensured brave news feed refreshed and feed for Car sources are not shown when brave news feed is scrolled up/down
Car source switches ON Car source feeds
image image
Case 4: Repeating order of cards are the same
  • Open a NTP and click on Show brave news and ensure brave news feeds are shown
  • Scroll down through the brave news feeds and reload NTP and ensure brave news card order is shown correctly (feeds are shown from the beginning (from the scratch))
  • Restart the browser and ensure the card order is shown correctly
  • Open two NTP's and click on Show brave news, ensure that the order of cards is the same in both the tabs
  • Restart the browser and ensure that the order of cards is the same in both the tabs
Case 5: Display Ads render occasionally
  • Confirmed Inline content Ads are shown in the brave feed
  • Confirmed users are paid for viewing the Inline content Ad
  • Confirmed one Promoted content ad is shown per page on brave feeds
  • Confirmed users are paid for viewing the Promoted content Ad
  • Confirmed click on any Inline content ad redirects to correct landing page
Inline content Ad Promoted AD brave://rewards History
image image image image

Inline Content Ad

[17584:18240:1129/131037.780:VERBOSE1:inline_content_ad_serving.cc(129)] Serving inline content ad:
  uuid: a3cf9f67-cb91-4555-b3cd-86894b4f74f9
  creativeInstanceId: f3a96d62-3ff7-43b9-9220-6ac31c9cd322
  creativeSetId: 1810d327-7030-45ec-bdcd-396e2de447cc
  campaignId: d004394c-8277-492d-8904-80646f337c94
  advertiserId: 2e5e912c-8a9b-4d2c-878c-56c40c25d3e8
  segment: untargeted
  title: Be the first in a next big Defi ecosystem 
  description: Nervos
  imageUrl: https://pcdn.brave.com/brave-ads/8fed8993-3653-5c87-b2f5-e7237e2433a1.webp.pad
  dimensions: 900x750
  ctaText: Join GodWoken
  targetUrl: https://cointelegraph.com/news/nervos-debuts-mainnet-beta-layer-two-blockchain-project/amp
[17584:18240:1129/131037.782:VERBOSE1:inline_content_ad_serving.cc(98)] Served inline content ad
[17584:18240:1129/131037.784:VERBOSE3:inline_content_ad_event_served.cc(24)] Served inline content ad with uuid a3cf9f67-cb91-4555-b3cd-86894b4f74f9 and creative instance id f3a96d62-3ff7-43b9-9220-6ac31c9cd322
[17584:18240:1129/131037.795:VERBOSE1:inline_content_ad_event_served.cc(32)] Successfully logged inline content ad served event
[17584:18240:1129/131041.022:VERBOSE3:inline_content_ad_event_viewed.cc(24)] Viewed inline content ad with uuid a3cf9f67-cb91-4555-b3cd-86894b4f74f9 and creative instance id f3a96d62-3ff7-43b9-9220-6ac31c9cd322
[17584:18240:1129/131041.022:VERBOSE1:confirmations.cc(93)] Confirming view for creative instance id f3a96d62-3ff7-43b9-9220-6ac31c9cd322
[17584:18240:1129/131041.027:VERBOSE1:redeem_unblinded_token.cc(53)] Redeem unblinded token
[17584:18240:1129/131041.035:VERBOSE1:redeem_unblinded_token.cc(67)] CreateConfirmation
[17584:18240:1129/131041.035:VERBOSE2:redeem_unblinded_token.cc(68)] POST /v1/confirmation/{confirmation_id}/{credential}
[17584:18240:1129/131041.036:VERBOSE6:redeem_unblinded_token.cc(72)] URL Request:
  URL: https://ads-serve.brave.com/v1/confirmation/1e49b913-b06a-4a01-a940-dae579e0f733/eyJwYXlsb2FkIjoie1wiYmxpbmRlZFBheW1lbnRUb2tlblwiOlwiT3U3RXZvdlkyQUx2NFNnSDFlN3gwS3M0THdteitJK3grUlk3bnBsSVlrTT1cIixcImJ1aWxkQ2hhbm5lbFwiOlwiYmV0YVwiLFwiY3JlYXRpdmVJbnN0YW5jZUlkXCI6XCJmM2E5NmQ2Mi0zZmY3LTQzYjktOTIyMC02YWMzMWM5Y2QzMjJcIixcInBheWxvYWRcIjp7fSxcInBsYXRmb3JtXCI6XCJ3aW5kb3dzXCIsXCJzdHVkaWVzXCI6W10sXCJ0eXBlXCI6XCJ2aWV3XCJ9Iiwic2lnbmF0dXJlIjoiWXZSYzJVR0VKYnVKLzBnbzJKTytNaUowOXBsYW42R1VXam9RSkJySFZkUUJrT2g4QzdjbEpXQkx6NkZFOXFYMlZVVVM5RlZCM0hHeEJXV3ZiRXZxVlE9PSIsInQiOiIxRmg1YTAyODRMRmJtSEZCS1hOMmp4YkoybnZkN1BZWCtIMG9jQTBZK3NFVSsrb2dXWHk3Y0FxQlJYanJCVUhtZU0rRnJRQkE5NzlrZVVvSHg2Mk41Zz09In0=
  Content: {"blindedPaymentToken":"Ou7EvovY2ALv4SgH1e7x0Ks4Lwmz+I+x+RY7nplIYkM=","buildChannel":"beta","creativeInstanceId":"f3a96d62-3ff7-43b9-9220-6ac31c9cd322","payload":{},"platform":"windows","studies":[],"type":"view"}
  Content Type: application/json
  Method: kPost
[17584:18240:1129/131041.037:VERBOSE6:inline_content_ad_event_viewed.cc(32)] Successfully logged inline content ad viewed event
[17584:18240:1129/131041.463:VERBOSE1:redeem_unblinded_token.cc(83)] OnCreateConfirmation
[17584:18240:1129/131041.464:VERBOSE6:redeem_unblinded_token.cc(85)] URL Response:
  URL: https://ads-serve.brave.com/v1/confirmation/1e49b913-b06a-4a01-a940-dae579e0f733/eyJwYXlsb2FkIjoie1wiYmxpbmRlZFBheW1lbnRUb2tlblwiOlwiT3U3RXZvdlkyQUx2NFNnSDFlN3gwS3M0THdteitJK3grUlk3bnBsSVlrTT1cIixcImJ1aWxkQ2hhbm5lbFwiOlwiYmV0YVwiLFwiY3JlYXRpdmVJbnN0YW5jZUlkXCI6XCJmM2E5NmQ2Mi0zZmY3LTQzYjktOTIyMC02YWMzMWM5Y2QzMjJcIixcInBheWxvYWRcIjp7fSxcInBsYXRmb3JtXCI6XCJ3aW5kb3dzXCIsXCJzdHVkaWVzXCI6W10sXCJ0eXBlXCI6XCJ2aWV3XCJ9Iiwic2lnbmF0dXJlIjoiWXZSYzJVR0VKYnVKLzBnbzJKTytNaUowOXBsYW42R1VXam9RSkJySFZkUUJrT2g4QzdjbEpXQkx6NkZFOXFYMlZVVVM5RlZCM0hHeEJXV3ZiRXZxVlE9PSIsInQiOiIxRmg1YTAyODRMRmJtSEZCS1hOMmp4YkoybnZkN1BZWCtIMG9jQTBZK3NFVSsrb2dXWHk3Y0FxQlJYanJCVUhtZU0rRnJRQkE5NzlrZVVvSHg2Mk41Zz09In0=
  Response Status Code: 201
  Response: {"id":"1e49b913-b06a-4a01-a940-dae579e0f733","payload":{},"createdAt":"2021-11-29T07:40:44.078Z","type":"view","modifiedAt":"2021-11-29T07:40:44.078Z","creativeInstanceId":"f3a96d62-3ff7-43b9-9220-6ac31c9cd322"}
[17584:18240:1129/131041.472:VERBOSE1:redeem_unblinded_token.cc(111)] FetchPaymentToken
[17584:18240:1129/131041.474:VERBOSE2:redeem_unblinded_token.cc(112)] GET /v1/confirmation/{confirmation_id}/paymentToken
[17584:18240:1129/131041.481:VERBOSE6:redeem_unblinded_token.cc(116)] URL Request:
  URL: https://ads-serve.brave.com/v1/confirmation/1e49b913-b06a-4a01-a940-dae579e0f733/paymentToken
  Method: kGet
[17584:18240:1129/131041.847:VERBOSE1:redeem_unblinded_token.cc(127)] OnFetchPaymentToken
[17584:18240:1129/131041.847:VERBOSE6:redeem_unblinded_token.cc(129)] URL Response:
  URL: https://ads-serve.brave.com/v1/confirmation/1e49b913-b06a-4a01-a940-dae579e0f733/paymentToken
  Response Status Code: 200
  Response: {"id":"1e49b913-b06a-4a01-a940-dae579e0f733","createdAt":"2021-11-29T07:40:44.078Z","type":"view","modifiedAt":"2021-11-29T07:40:44.086Z","creativeInstanceId":"f3a96d62-3ff7-43b9-9220-6ac31c9cd322","paymentToken":{"publicKey":"ig6W18TL1LN6cVJ75VIrc1gtjdK279Uy7jMZtPM66jM=","batchProof":"tqoZDygHGwjsfZxFo7eIoND4sdnqk778/f8Dhc4HugpbMiFQut0usWW2njtOkrwME1f8GFPMytMSfhVDkR4SDQ==","signedTokens":["8minXkhYfdtpswofrD0FStC1+dQv5eIKsbNYichV10g="]}}
[17584:18240:1129/131041.850:VERBOSE1:confirmations.cc(260)] Successfully redeemed unblinded token with confirmation id 1e49b913-b06a-4a01-a940-dae579e0f733, creative instance id f3a96d62-3ff7-43b9-9220-6ac31c9cd322 and view
[17584:18240:1129/131041.857:VERBOSE1:confirmations.cc(283)] Added 1 unblinded payment token with an estimated redemption value of 0.01 BAT, you now have 1 unblinded payment tokens
Case 6: "Deals" render
  • Confirmed deal cards images are rendered correctly
  • Confirmed click on deal cards images opens up correct target link/page
  • Confirmed click on deal cards name/link opens up correct target link/page
  • Confirmed click on deal cards text opens up correct target link/page
Example Example
image image
Case 7: Feed refreshes periodically through the day
  • Confirmed feed refreshed when any new publisher is enabled via Sources
  • Confirmed feed refreshed when any new publisher is disabled via Sources
Example Example Example Example
image image image image

Upgrade profile

Case 1: Enable brave news in 1.32.x and disable it and upgrade profile to 1..33.x
  • Clean install 1.32.x
  • Open NTP and click on Show brave news
  • View brave news feeds
  • Disable Brave News via Customize
  • Upgrade the profile to 1.33.x
  • After the upgrade, confirmed that the Show brave news switch is still disabled in Customize
  • Enable Show brave news switch
  • Confirmed Brave news feeds are shown
Case 2: Enable brave news in 1.32.x and disable a few default publishers via Sources and then disable brave news and upgrade profile to 1.33.x
  • Clean install 1.32.x
  • Open NTP and click on Show brave news
  • View brave news feeds
  • Disable a few Publishers (e.g ABC News and Ahref from All Sources)
  • Disable Brave News via Customize
  • Upgrade the profile to 1.33.x
  • After the upgrade, confirmed that the Show brave news switch is still disabled in Customize
  • Enable Show brave news switch
  • Confirmed that ABC News and Ahref pubs are still in the disabled state, enable both the switches
  • Confirmed Brave news feeds are shown
Case 3: Verify feed fetch_enable brave news in 1.32.x and disable it, set the device clock ahead by one hour and upgrade profile to 1.33.x and enable brave news
  • Clean install 1.32.x
  • Open NTP and click on Show brave news
  • View brave news feeds
  • Disable the Show brave news switch via Customize
  • Move the system clock ahead by one hour
  • Upgrade the profile to 1.33.x
  • Confirmed Brave News is still in a disabled state
  • Enable the Show brave news switch via Customize
  • Confirm brave new is enabled and feed fetch is initiated
Case 4: Enable brave news 1.32.x and view Inline content ad and promoted content ad, disable brave news and upgrade profile to 1.33.x and enable brave news
  • Clean install 1.32.x
  • Open NTP and click on Show brave news
  • View brave news feeds
  • View inline content ads and promoted content ads
  • Disable the Show brave news switch via Customize
  • Upgrade the profile to 1.33.x
  • Confirmed Brave News is still in a disabled state
  • Enable the Show brave news switch via Customize
  • Confirmed brave news feeds are shown

Additional checks


Verified PASSED using

Brave 1.33.95 Chromium: 96.0.4664.45 (Official Build) dev (x86_64)
Revision 76e4c1bb2ab4671b8beba3444e61c0f17584b2fc-refs/branch-heads/4664@{#947}
OS macOS Version 11.6.1 (Build 20G224)

Clean profile

Case 1: Feed renders and Images render
  • Confirmed https://brave-today-cdn.brave.com & https://pcdn.brave.com (via Charles) are contacted only when the user starts scrolling through the brave news feeds
  • Confirmed https://brave-today-cdn.brave.com downloads feed.json & sources.json (via Charles) when the user starts scrolling through the brave news feeds
  • Confirmed click on Show Brave News shows the brave news feeds
  • Confirmed content cards are loading the images correctly in feeds when the brave news feed is scrolled down
  • Confirmed click on any image/link on news feed redirects to correct target link
  • Confirmed images render properly on brave news feeds when any publisher is enabled/disabled via Sources
Case 2: Promoted-content items render
Promoted-content Ad brave://rewards Ads history
Screen Shot 2021-11-30 at 10 56 29 AM Screen Shot 2021-11-30 at 11 07 13 AM Screen Shot 2021-11-30 at 11 07 03 AM

Promoted-content Ad

[53604:259:1130/105551.654751:VERBOSE3:promoted_content_ad_event_viewed.cc(23)] Viewed promoted content ad with uuid 83e3da4b-daab-4c55-bd4b-e1a6c4c3675d and creative instance id 598d13ca-47ce-403b-a43d-b02e88057005
[53604:259:1130/105551.654882:VERBOSE1:confirmations.cc(93)] Confirming view for creative instance id 598d13ca-47ce-403b-a43d-b02e88057005
[53604:259:1130/105551.655580:VERBOSE1:redeem_unblinded_token.cc(53)] Redeem unblinded token
[53604:259:1130/105551.655626:VERBOSE1:redeem_unblinded_token.cc(67)] CreateConfirmation
[53604:259:1130/105551.655656:VERBOSE2:redeem_unblinded_token.cc(68)] POST /v1/confirmation/{confirmation_id}/{credential}
[53604:259:1130/105551.655684:VERBOSE6:redeem_unblinded_token.cc(72)] URL Request:
  URL: https://ads-serve.bravesoftware.com/v1/confirmation/6163...QT09In0=
  Content: {"blindedPaymentToken":"RjjhvDWpicE6H00vuxNNUlTiya7XmwOo4/N8yTE/rws=","buildChannel":"dev","creativeInstanceId":"598d13ca-47ce-403b-a43d-b02e88057005","payload":{},"platform":"macos","studies":[],"type":"view"}
  Content Type: application/json
  Method: kPost
[53604:259:1130/105551.661890:VERBOSE6:promoted_content_ad_event_viewed.cc(31)] Successfully logged promoted content ad viewed event
[53604:259:1130/105551.677232:VERBOSE3:promoted_content_ad_event_served.cc(23)] Served promoted content ad with uuid 83e3da4b-daab-4c55-bd4b-e1a6c4c3675d and creative instance id 598d13ca-47ce-403b-a43d-b02e88057005
[53604:259:1130/105551.678372:VERBOSE6:promoted_content_ad_event_served.cc(31)] Successfully logged promoted content ad served event
[53604:259:1130/105551.812404:VERBOSE1:redeem_unblinded_token.cc(83)] OnCreateConfirmation
[53604:259:1130/105551.812482:VERBOSE6:redeem_unblinded_token.cc(85)] URL Response:
  URL: https://ads-serve.bravesoftware.com/v1/confirmation/6163b2...T09In0=
  Response Status Code: 201
  Response: {"id":"6163b2e3-8adb-4cf7-9982-1c2e0b362988","payload":{},"createdAt":"2021-11-30T18:55:51.772Z","type":"view","modifiedAt":"2021-11-30T18:55:51.772Z","creativeInstanceId":"598d13ca-47ce-403b-a43d-b02e88057005"}
[53604:259:1130/105551.812594:VERBOSE1:redeem_unblinded_token.cc(111)] FetchPaymentToken
[53604:259:1130/105551.812638:VERBOSE2:redeem_unblinded_token.cc(112)] GET /v1/confirmation/{confirmation_id}/paymentToken
[53604:259:1130/105551.812673:VERBOSE6:redeem_unblinded_token.cc(116)] URL Request:
  URL: https://ads-serve.bravesoftware.com/v1/confirmation/6163b2e3-8adb-4cf7-9982-1c2e0b362988/paymentToken
  Method: kGet
[53604:259:1130/105551.926384:VERBOSE1:redeem_unblinded_token.cc(127)] OnFetchPaymentToken
[53604:259:1130/105551.926455:VERBOSE6:redeem_unblinded_token.cc(129)] URL Response:
  URL: https://ads-serve.bravesoftware.com/v1/confirmation/6163b2e3-8adb-4cf7-9982-1c2e0b362988/paymentToken
  Response Status Code: 200
  Response: {"id":"6163b2e3-8adb-4cf7-9982-1c2e0b362988","createdAt":"2021-11-30T18:55:51.772Z","type":"view","modifiedAt":"2021-11-30T18:55:51.794Z","creativeInstanceId":"598d13ca-47ce-403b-a43d-b02e88057005","paymentToken":{"publicKey":"pICtiw5t71ACXVZQnNLJRKmNdlQs9J4jKXMQen5RQDk=","batchProof":"ZCrZCV0x5qLCJT1XAo7XCyGvA9Y3rklS+19mH0haXgKQHx3zy6FjMgWgSTA5coPUHdXY+rtRFOeH63miIFf+Cg==","signedTokens":["MoBJkIx9J3AbgdUMOg5qH3odxe0vrpXGjcQ7HujjRXo="]}}
[53604:259:1130/105551.927048:VERBOSE1:confirmations.cc(260)] Successfully redeemed unblinded token with confirmation id 6163b2e3-8adb-4cf7-9982-1c2e0b362988, creative instance id 598d13ca-47ce-403b-a43d-b02e88057005 and view
[53604:259:1130/105551.927545:VERBOSE1:confirmations.cc(283)] Added 1 unblinded payment token with an estimated redemption value of 0.01 BAT, you now have 2 unblinded payment tokens

Case 3: Sources can be switched off and on by the user; Feed refreshes and removes sources from user-disabled sources
  • Click on Customize and ensure Brave News Sources are shown in 1.33.x
  • Confirmed all the sources are shown in Beta (1.33.x) but the ordering of sources is not the same as RC (1.32.x), encountered Brave News' Sources ordering differs from current release #19731
  • Confirmed users can turn on/off the sources via Customize link
  • Turn ON Car source switches via Brave News -> Sources -> Cars
  • Ensured Brave News feed for Car sources are shown when the feed is scrolled up/down
  • Encountered Empty flyout dialog/button on WSJ / Car and Driver heading clicks #14196
  • Turn OFF Car source switches via Brave News -> Sources -> Cars
  • Ensured feed refreshed and feeds for Car sources weren't shown when brave news feed is scrolled up/down
Car source switches ON Car source feeds
Screen Shot 2021-11-30 at 11 21 52 AM Screen Shot 2021-11-30 at 11 24 43 AM
Case 4: Repeating order of cards are the same
  • Open a NTP and click on Show Brave News and ensure Brave News feeds are shown
  • Scroll down through the brave news feeds and reload NTP and ensure brave news card order is shown correctly (feeds are shown from the beginning (from scratch))
  • Restart the browser and ensure the card order is shown correctly
  • Open two NTP's and click on Show Brave News, ensure that the order of cards is the same in both the tabs
  • Restart the browser and ensure that the order of cards is the same in both the tabs
Case 5: Display Ads render occasionally
  • Confirmed Inline-content Ads are shown in the Brave feed
  • Confirmed users are paid for viewing the Inline-content Ad
  • Confirmed one Promoted-content ad is shown per page on Brave feeds
  • Confirmed users are paid for viewing the Promoted-content Ad
  • Confirmed click on any Inline-content ad redirects to correct landing page
Inline-content Ad Promoted-content Ad brave://rewards History
Screen Shot 2021-11-30 at 10 36 21 AM See Case 2: Promoted items render above Ditto Ditto

Inline-Content Ad

[53297:259:1130/103428.976521:VERBOSE1:inline_content_ad_serving.cc(129)] Serving inline content ad:
  uuid: 75be4e3c-3201-45d9-a13e-af58d752acd3
  creativeInstanceId: e4958d00-e35c-4134-a408-1fbcf274d5ae
  creativeSetId: 8b848823-c47f-43de-a753-2efa8dea6863
  campaignId: 07de7f05-ab32-4af0-a350-a1bce4427eac
  advertiserId: 93130af3-2def-4ecb-b836-b3772e73b3c9
  segment: untargeted
  title: Staging - Inline Test 1
  description: Fung Brave News Inline Display Ad - mac/linux
  imageUrl: https://pcdn.brave.com/brave-ads/468beb93-2458-5d3e-8d7b-bc1f387d2e9b.webp.pad
  dimensions: 900x750
  ctaText: Work at Brave
  targetUrl: https://brave.com/careers
[53297:259:1130/103428.976745:VERBOSE1:inline_content_ad_serving.cc(98)] Served inline content ad
[53297:259:1130/103428.980743:VERBOSE3:inline_content_ad_event_served.cc(24)] Served inline content ad with uuid 75be4e3c-3201-45d9-a13e-af58d752acd3 and creative instance id e4958d00-e35c-4134-a408-1fbcf274d5ae
[53297:259:1130/103428.988531:VERBOSE1:inline_content_ad_event_served.cc(32)] Successfully logged inline content ad served event
[53297:259:1130/103429.258209:VERBOSE5:ledger_impl.cc(119)] 
[ REQUEST ]
> URL: https://grant.rewards.bravesoftware.com/v1/promotions?migrate=true&paymentId=882610fa-81bb-4477-9469-98096eb512cc&platform=osx
> Method: GET
[53297:259:1130/103429.259156:VERBOSE1:uphold.cc(114)] Uphold wallet is not VERIFIED.
[53297:259:1130/103429.267698:VERBOSE6:logging_util.cc(136)] 
[ RESPONSE - OnRequest ]
> Url: https://grant.rewards.bravesoftware.com/v1/promotions?migrate=true&paymentId=882610fa-81bb-4477-9469-98096eb512cc&platform=osx
> Result: Success
> HTTP Code: 200
> Body: {"promotions":[{"id":"f05568e6-f4a1-4438-8e81-cc0490fd14f7","createdAt":"2021-11-24T20:56:23.229588Z","expiresAt":"2022-02-24T20:56:23.229588Z","version":5,"suggestionsPerGrant":120,"approximateValue":"30","type":"ugp","available":true,"platform":"desktop","publicKeys":["6AphTvx13IgxVRG1nljV2ql1Y7yGUol6yrVMhEP85wI="],"legacyClaimed":false}]}

[53297:259:1130/103429.305231:VERBOSE3:inline_content_ad_event_viewed.cc(24)] Viewed inline content ad with uuid 75be4e3c-3201-45d9-a13e-af58d752acd3 and creative instance id e4958d00-e35c-4134-a408-1fbcf274d5ae
[53297:259:1130/103429.305614:VERBOSE1:confirmations.cc(93)] Confirming view for creative instance id e4958d00-e35c-4134-a408-1fbcf274d5ae
[53297:259:1130/103429.306599:VERBOSE1:redeem_unblinded_token.cc(53)] Redeem unblinded token
[53297:259:1130/103429.306651:VERBOSE1:redeem_unblinded_token.cc(67)] CreateConfirmation
[53297:259:1130/103429.306685:VERBOSE2:redeem_unblinded_token.cc(68)] POST /v1/confirmation/{confirmation_id}/{credential}
[53297:259:1130/103429.306726:VERBOSE6:redeem_unblinded_token.cc(72)] URL Request:
  URL: https://ads-serve.bravesoftware.com/v1/confirmation/cba5da2f-6f98-4d96-8af4-db30069d49ce/eyJwYXlsb2FkIjoie1wiYmxpbmRlZFBheW1lbnRUb2tlblwiOlwiVG4xOEl0NlpqL1N2VFBDNTFweVNJQkxWLzNwYmFiaUpNWUp0akRQSUZnOD1cIixcImJ1aWxkQ2hhbm5lbFwiOlwiZGV2XCIsXCJjcmVhdGl2ZUluc3RhbmNlSWRcIjpcImU0OTU4ZDAwLWUzNWMtNDEzNC1hNDA4LTFmYmNmMjc0ZDVhZVwiLFwicGF5bG9hZFwiOnt9LFwicGxhdGZvcm1cIjpcIm1hY29zXCIsXCJzdHVkaWVzXCI6W10sXCJ0eXBlXCI6XCJ2aWV3XCJ9Iiwic2lnbmF0dXJlIjoic2c4WFRnR3FxbnMvM1g0cjNYdFZzNnZZSFZqMFIyT0lIczBOYzBaaHpmV3BOUHhVb0NHaXRSL1VVdW1ab2dhdDVwM05qR0pZWGwrMGpRR3NrTExpUVE9PSIsInQiOiJ4ak9MTFA0RGRMUmx0TFNwUTBhV3EvZnpvMUphRzFFcHJwTG9SK05PVzdGTXhJb0xvdHhyUzFWR2ZJNkZOQ1YzalZHQWVGdUZ2RmdmTEorQTRNeEE3UT09In0=
  Content: {"blindedPaymentToken":"Tn18It6Zj/SvTPC51pySIBLV/3pbabiJMYJtjDPIFg8=","buildChannel":"dev","creativeInstanceId":"e4958d00-e35c-4134-a408-1fbcf274d5ae","payload":{},"platform":"macos","studies":[],"type":"view"}
  Content Type: application/json
  Method: kPost
[53297:259:1130/103429.307449:VERBOSE6:inline_content_ad_event_viewed.cc(32)] Successfully logged inline content ad viewed event
[53297:259:1130/103429.444198:VERBOSE1:redeem_unblinded_token.cc(83)] OnCreateConfirmation
[53297:259:1130/103429.444351:VERBOSE6:redeem_unblinded_token.cc(85)] URL Response:
  URL: https://ads-serve.bravesoftware.com/v1/confirmation/cba5da2f-6f98-4d96-8af4-db30069d49ce/eyJwYXlsb2FkIjoie1wiYmxpbmRlZFBheW1lbnRUb2tlblwiOlwiVG4xOEl0NlpqL1N2VFBDNTFweVNJQkxWLzNwYmFiaUpNWUp0akRQSUZnOD1cIixcImJ1aWxkQ2hhbm5lbFwiOlwiZGV2XCIsXCJjcmVhdGl2ZUluc3RhbmNlSWRcIjpcImU0OTU4ZDAwLWUzNWMtNDEzNC1hNDA4LTFmYmNmMjc0ZDVhZVwiLFwicGF5bG9hZFwiOnt9LFwicGxhdGZvcm1cIjpcIm1hY29zXCIsXCJzdHVkaWVzXCI6W10sXCJ0eXBlXCI6XCJ2aWV3XCJ9Iiwic2lnbmF0dXJlIjoic2c4WFRnR3FxbnMvM1g0cjNYdFZzNnZZSFZqMFIyT0lIczBOYzBaaHpmV3BOUHhVb0NHaXRSL1VVdW1ab2dhdDVwM05qR0pZWGwrMGpRR3NrTExpUVE9PSIsInQiOiJ4ak9MTFA0RGRMUmx0TFNwUTBhV3EvZnpvMUphRzFFcHJwTG9SK05PVzdGTXhJb0xvdHhyUzFWR2ZJNkZOQ1YzalZHQWVGdUZ2RmdmTEorQTRNeEE3UT09In0=
  Response Status Code: 201
  Response: {"id":"cba5da2f-6f98-4d96-8af4-db30069d49ce","payload":{},"createdAt":"2021-11-30T18:34:29.402Z","type":"view","modifiedAt":"2021-11-30T18:34:29.402Z","creativeInstanceId":"e4958d00-e35c-4134-a408-1fbcf274d5ae"}
[53297:259:1130/103429.444434:VERBOSE1:redeem_unblinded_token.cc(111)] FetchPaymentToken
[53297:259:1130/103429.444465:VERBOSE2:redeem_unblinded_token.cc(112)] GET /v1/confirmation/{confirmation_id}/paymentToken
[53297:259:1130/103429.444492:VERBOSE6:redeem_unblinded_token.cc(116)] URL Request:
  URL: https://ads-serve.bravesoftware.com/v1/confirmation/cba5da2f-6f98-4d96-8af4-db30069d49ce/paymentToken
  Method: kGet
[53297:259:1130/103429.494003:VERBOSE1:redeem_unblinded_token.cc(127)] OnFetchPaymentToken
[53297:259:1130/103429.494071:VERBOSE6:redeem_unblinded_token.cc(129)] URL Response:
  URL: https://ads-serve.bravesoftware.com/v1/confirmation/cba5da2f-6f98-4d96-8af4-db30069d49ce/paymentToken
  Response Status Code: 200
  Response: {"id":"cba5da2f-6f98-4d96-8af4-db30069d49ce","createdAt":"2021-11-30T18:34:29.402Z","type":"view","modifiedAt":"2021-11-30T18:34:29.431Z","creativeInstanceId":"e4958d00-e35c-4134-a408-1fbcf274d5ae","paymentToken":{"publicKey":"pICtiw5t71ACXVZQnNLJRKmNdlQs9J4jKXMQen5RQDk=","batchProof":"fAinkb2K6HqdqWV63SngccmbX7RyiOW/WqJL5An8oA6P4b9a0aGE87X994t5fQA7sEyhwmSRURoP1f0yqQwiDw==","signedTokens":["VErHphPqwexKzKR4O9ZifCiFlWmK1L6G48otvv5hdBw="]}}
[53297:259:1130/103429.494685:VERBOSE1:confirmations.cc(260)] Successfully redeemed unblinded token with confirmation id cba5da2f-6f98-4d96-8af4-db30069d49ce, creative instance id e4958d00-e35c-4134-a408-1fbcf274d5ae and view
[53297:259:1130/103429.495239:VERBOSE1:confirmations.cc(283)] Added 1 unblinded payment token with an estimated redemption value of 0.01 BAT, you now have 4 unblinded payment tokens

Case 6: "Deals" cards render
  • Confirmed deal cards images are rendered correctly
  • Confirmed click on deal cards images opens up correct target link/page
  • Confirmed click on deal cards name/link opens up correct target link/page
  • Confirmed click on deal cards text opens up correct target link/page

Filed #19658

Example Example Example
Screen Shot 2021-11-30 at 10 47 11 AM Screen Shot 2021-11-30 at 10 47 31 AM Screen Shot 2021-11-30 at 10 48 50 AM
Case 7: Feed refreshes periodically throughout the day
  • Confirmed feed refreshed when any new publisher is enabled via Sources
  • Confirmed feed refreshed when any new publisher is disabled via Sources
Example Example Example Example Example
Screen Shot 2021-11-30 at 11 17 54 AM Screen Shot 2021-11-30 at 11 18 01 AM Screen Shot 2021-11-30 at 11 18 08 AM Screen Shot 2021-11-30 at 11 27 46 AM Screen Shot 2021-11-30 at 11 28 05 AM
Example Example Example
Screen Shot 2021-11-30 at 2 30 54 PM Screen Shot 2021-11-30 at 5 32 03 PM Screen Shot 2021-11-30 at 5 32 12 PM

Upgrade profile

Case 1: Enable Brave News in 1.32.x, disable it, and then upgrade profile to 1.33.x
  • Clean-install 1.32.x
  • Open NTP and click on Show Brave News
  • View Brave News feeds
  • Disable Brave News via Customize
  • Upgrade the profile to 1.33.x
  • After the upgrade, confirmed that the Show Brave News switch is still disabled in Customize
  • Enable Show Brave News switch
  • Confirmed Brave News feeds are shown
Case 2: Enable Brave News in 1.32.x and disable a few default publishers via `Sources` and then disable Brave News and upgrade profile to 1.33.x
  • Clean install 1.32.x
  • Open NTP and click on Show Brave News
  • View Brave News feeds
  • Disable a few Publishers (e.g ABC News and Ahref from `All Sources)
  • Disable Brave News via Customize
  • Upgrade the profile to 1.33.x
  • After the upgrade, confirmed that the Show Brave News switch is still disabled in Customize
  • Enable Show Brave News switch
  • Confirmed that ABC News and Ahref pubs are still in the disabled state, enable both the switches
  • Confirmed Brave News feeds are shown
Case 3: Verify feed fetch_enable Brave News in 1.32.x and disable it, set the device clock ahead by three (3) hours, upgrade the profile to 1.33.x and enable Brave News
  • Clean-install 1.32.x
  • Open NTP and click on Show Brave News
  • View Brave News feeds
  • Disable the Show Brave News switch via Customize
  • Move the system clock ahead by three (3) hours
  • Upgrade the profile to 1.33.x
  • Confirmed Brave News is still in a disabled state
  • Enable the Show Brave News switch via Customize
  • Confirm Brave News is enabled and feed fetch is initiated
Case 4: Enable brave news 1.32.x and view Inline content ad and promoted content ad, disable brave news and upgrade profile to 1.33.x and enable brave news
  • Clean install 1.32.x
  • Open NTP and click on Show Brave News
  • View Brave News feeds
  • View inline-content ads and promoted-content ads
  • Disable the Show brave news switch via Customize
  • Upgrade the profile to 1.33.x
  • Confirmed Brave News is still in a disabled state
  • Enable the Show Brave News switch via Customize
  • Confirmed Brave News feeds are shown

Additional checks


Verification passed on

Brave 1.33.83 Chromium: 96.0.4664.45 (Official Build) beta (64-bit)
Revision 76e4c1bb2ab4671b8beba3444e61c0f17584b2fc-refs/branch-heads/4664@{#947}
OS Ubuntu 18.04 LTS

Verified as part of #18843

@GeetaSarvadnya GeetaSarvadnya added QA Pass-Win64 and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Nov 30, 2021
@stephendonner stephendonner added QA/In-Progress Indicates that QA is currently in progress for that particular issue QA Pass-macOS and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Nov 30, 2021
@LaurenWags
Copy link
Member

For Android: QA should confirm that Brave News is not available on 1.33.x (per https://bravesoftware.slack.com/archives/C0816QH3R/p1638550052373600?thread_ts=1638549875.371900&cid=C0816QH3R)

cc @brave/legacy_qa

@LaurenWags
Copy link
Member

Verified using Pixel 3 XL with Android 11 running 1.33.100.

Per https://bravesoftware.slack.com/archives/C0816QH3R/p1638551089375400?thread_ts=1638549875.371900&cid=C0816QH3R, executed tests from brave/brave-core#11121 (comment).

  • ensured that Brave News isn't available/visible under NTP (attempt to scroll down and ensure it's not possible)
  • ensured that NTP & NTP-SI load without any issues
  • ensured that tapping on the logos under NTP-SI correctly loads the sponsored website within the same tab without any issues
  • ensured that tapping on the image attribution links at the bottom correctly loads within the same tab (note: some are pointing to https://community.brave.com)
  • ensured that you can switch between the Top Sites & Privacy Stats widget stacks without any issues
  • ensured that Brave News isn't being displayed when tapping on the Hamburger Menu
  • ensured that Brave News isn't being displayed under Settings via the Features section

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment