Skip to content

Create a JS API for requesting ads enabled #16964

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

Closed
aseren opened this issue Jul 15, 2021 · 6 comments · Fixed by brave/brave-core#9611
Closed

Create a JS API for requesting ads enabled #16964

aseren opened this issue Jul 15, 2021 · 6 comments · Fixed by brave/brave-core#9611

Comments

@aseren
Copy link

aseren commented Jul 15, 2021

API should ask the user for permission to enable ads.

@aseren aseren added QA/Yes feature/ads OS/Android Fixes related to Android browser functionality OS/Desktop labels Jul 15, 2021
@aseren aseren self-assigned this Jul 15, 2021
@aseren aseren changed the title make an API for requesting ads enabled Create a JS API for requesting ads enabled Jul 15, 2021
@diracdeltas
Copy link
Member

diracdeltas commented Jul 23, 2021

is this the work for https://bravesoftware.slack.com/archives/CELA35G5S/p1624627578005000?

please file a security review when the code is ready, thanks. https://github.com/brave/security/issues/new/choose

@aseren
Copy link
Author

aseren commented Jul 26, 2021

is this the work for https://bravesoftware.slack.com/archives/CELA35G5S/p1624627578005000?

Yes, it is.

please file a security review when the code is ready, thanks. https://github.com/brave/security/issues/new/choose

Okay, I will do, thank you!

aseren added a commit to brave/brave-core that referenced this issue Aug 2, 2021
aseren added a commit to brave/brave-core that referenced this issue Aug 2, 2021
aseren added a commit to brave/brave-core that referenced this issue Aug 13, 2021
aseren added a commit to brave/brave-core that referenced this issue Aug 13, 2021
aseren added a commit to brave/brave-core that referenced this issue Aug 16, 2021
aseren added a commit to brave/brave-core that referenced this issue Aug 16, 2021
aseren added a commit to brave/brave-core that referenced this issue Aug 16, 2021
aseren added a commit to brave/brave-core that referenced this issue Aug 16, 2021
aseren added a commit to brave/brave-core that referenced this issue Aug 18, 2021
aseren added a commit to brave/brave-core that referenced this issue Aug 18, 2021
aseren added a commit to brave/brave-core that referenced this issue Aug 18, 2021
aseren added a commit to brave/brave-core that referenced this issue Aug 18, 2021
aseren added a commit to brave/brave-core that referenced this issue Aug 18, 2021
aseren added a commit to brave/brave-core that referenced this issue Aug 18, 2021
aseren added a commit to brave/brave-core that referenced this issue Aug 18, 2021
aseren added a commit to brave/brave-core that referenced this issue Sep 29, 2021
aseren added a commit to brave/brave-core that referenced this issue Sep 29, 2021
aseren added a commit to brave/brave-core that referenced this issue Sep 29, 2021
aseren added a commit to brave/brave-core that referenced this issue Sep 29, 2021
aseren added a commit to brave/brave-core that referenced this issue Sep 29, 2021
@tmancey tmancey added this to the 1.32.x - Nightly milestone Sep 30, 2021
@jsecretan jsecretan added the 5_points For Agile sizing label Oct 5, 2021
@stephendonner stephendonner added the QA/In-Progress Indicates that QA is currently in progress for that particular issue label Oct 20, 2021
@stephendonner
Copy link

stephendonner commented Oct 20, 2021

Verified PASSED using

Brave 1.32.75 Chromium: 95.0.4638.54 (Official Build) beta (x86_64)
Revision d31a821ec901f68d0d34ccdbaea45b4c86ce543e-refs/branch-heads/4638@{#871}
OS macOS Version 11.6 (Build 20G165)

1. API not available on non-Brave Talk hosts

  1. new profile
  2. launch Brave using --enable-logging=stderr --vmodule="*/variations/*"=6,"*/bat-native-ledger/*"=6,"*/brave_rewards/*"=6,"*/bat-native-ads/*"=6,"*/bat-native-confirmations/*"=6,"*/brave_ads/*"=9,"*/brave_user_model/*"=6 --brave-ads-staging --brave-ads-debug --rewards=staging=true,reconcile-interval=3 --enable-features=RequestAdsEnabledApi
  3. open a new-tab page
  4. click on the Start using Rewards button
  5. load www.brave.com
  6. open Developer Tools and switch to the Console tab
  7. enter chrome.braveRequestAdsEnabled().then(value => console.log(value)) and ensure it throws Uncaught TypeError: chrome.braveRequestAdsEnabled is not a function
  8. load brave://rewards/
  9. toggle Ads to Off
  10. enter chrome.braveRequestAdsEnabled().then(value => console.log(value)) and ensure it throws Uncaught TypeError: chrome.braveRequestAdsEnabled is not a function
example example
Screen Shot 2021-10-20 at 4 00 13 PM Screen Shot 2021-10-20 at 4 00 38 PM

2a. Brave Talk, Rewards & Ads enabled

  1. new profile
  2. launch Brave using --enable-logging=stderr --vmodule="*/variations/*"=6,"*/bat-native-ledger/*"=6,"*/brave_rewards/*"=6,"*/bat-native-ads/*"=6,"*/bat-native-confirmations/*"=6,"*/brave_ads/*"=9,"*/brave_user_model/*"=6 --brave-ads-staging --brave-ads-debug --rewards=staging=true,reconcile-interval=3 --enable-features=RequestAdsEnabledApi
  3. on a new-tab page, click on Start using Rewards (or via other methods)
  4. load talk.brave.software
  5. click on Start free 1:1 call
  6. confirm after clicking the button the dialog is dismissed and you are able to Start a free 1:1 call without further prompts
example example example
Screen Shot 2021-10-20 at 4 03 00 PM Screen Shot 2021-10-20 at 4 04 02 PM Screen Shot 2021-10-20 at 4 03 22 PM

2b. Brave Talk, Rewards enabled, Ads disabled

  1. new profile
  2. launch Brave using --enable-logging=stderr --vmodule="*/variations/*"=6,"*/bat-native-ledger/*"=6,"*/brave_rewards/*"=6,"*/bat-native-ads/*"=6,"*/bat-native-confirmations/*"=6,"*/brave_ads/*"=9,"*/brave_user_model/*"=6 --brave-ads-staging --brave-ads-debug --rewards=staging=true,reconcile-interval=3 --enable-features=RequestAdsEnabledApi
  3. on a new-tab page, turn on Rewards (& Ads)
  4. disable Ads via the brave://rewards page’s toggle; Rewards should still be on)
  5. load talk.brave.software
  6. click on Start free 1:1 call
  7. confirm the doorhanger notification pops up and prompts you with a button to Turn on Brave Private Ads
  8. confirm after clicking the button the dialog is dismissed and you are able to Start a free 1:1 call without further prompts
example example example example example
Screen Shot 2021-10-20 at 4 08 11 PM Screen Shot 2021-10-20 at 4 08 19 PM Screen Shot 2021-10-20 at 4 08 41 PM Screen Shot 2021-10-20 at 4 09 07 PM Screen Shot 2021-10-20 at 4 09 15 PM

2c. Brave Talk, Rewards disabled (never enabled), Ads disabled

  1. new profile
  2. launch Brave using --enable-logging=stderr --vmodule="*/variations/*"=6,"*/bat-native-ledger/*"=6,"*/brave_rewards/*"=6,"*/bat-native-ads/*"=6,"*/bat-native-confirmations/*"=6,"*/brave_ads/*"=9,"*/brave_user_model/*"=6 --brave-ads-staging --brave-ads-debug --rewards=staging=true,reconcile-interval=3 --enable-features=RequestAdsEnabledApi
  3. load talk.brave.software
  4. click on Start free 1:1 call
  5. confirm the doorhanger notification popups up and prompts you with a button to Turn on Rewards
  6. confirm after clicking the button the dialog is dismissed and you are able to Start a free 1:1 call without further prompts
example example example example
Screen Shot 2021-10-20 at 4 15 05 PM Screen Shot 2021-10-20 at 4 12 37 PM Screen Shot 2021-10-20 at 4 12 58 PM Screen Shot 2021-10-20 at 4 13 14 PM

3a. Brave Talk, Private Window

  1. new profile
  2. launch Brave using --enable-logging=stderr --vmodule="*/variations/*"=6,"*/bat-native-ledger/*"=6,"*/brave_rewards/*"=6,"*/bat-native-ads/*"=6,"*/bat-native-confirmations/*"=6,"*/brave_ads/*"=9,"*/brave_user_model/*"=6 --brave-ads-staging --brave-ads-debug --rewards=staging=true,reconcile-interval=3 --enable-features=RequestAdsEnabledApi
  3. click on Start using Rewards on the new-tab page
  4. open a new Private Window
  5. load talk.brave.software
  6. click on the Start free 1:1 call button
  7. confirm the Enable Rewards doorhanger dialog doesn't display
  8. open Developer Tools and switch to the Console tab
  9. enter chrome.braveRequestAdsEnabled().then(value => console.log(value)) and ensure it returns false
Screen Shot 2021-10-20 at 3 53 16 PM

3b. Brave Talk, Private Window with Tor

  1. new profile
  2. launch Brave using --enable-logging=stderr --vmodule="*/variations/*"=6,"*/bat-native-ledger/*"=6,"*/brave_rewards/*"=6,"*/bat-native-ads/*"=6,"*/bat-native-confirmations/*"=6,"*/brave_ads/*"=9,"*/brave_user_model/*"=6 --brave-ads-staging --brave-ads-debug --rewards=staging=true,reconcile-interval=3 --enable-features=RequestAdsEnabledApi
  3. open a New Private Window with Tor
  4. load talk.brave.software
  5. click on the Start free 1:1 call button
  6. confirm the Enable Rewards doorhanger dialog doesn't display
  7. open Developer Tools and switch to the Console tab
  8. enter chrome.braveRequestAdsEnabled().then(value => console.log(value)) and ensure it returns false
Screen Shot 2021-10-20 at 3 37 45 PM

3c. Guest window

  1. new profile
  2. launch Brave using --enable-logging=stderr --vmodule="*/variations/*"=6,"*/bat-native-ledger/*"=6,"*/brave_rewards/*"=6,"*/bat-native-ads/*"=6,"*/bat-native-confirmations/*"=6,"*/brave_ads/*"=9,"*/brave_user_model/*"=6 --brave-ads-staging --brave-ads-debug --rewards=staging=true,reconcile-interval=3 --enable-features=RequestAdsEnabledApi
  3. open a Guest Window
  4. load talk.brave.software
  5. click on the Start free 1:1 call button
  6. confirm the Enable Rewards doorhanger dialog doesn't display
  7. open Developer Tools and switch to the Console tab
  8. enter chrome.braveRequestAdsEnabled().then(value => console.log(value)) and ensure it returns false
Screen Shot 2021-10-20 at 3 36 41 PM

4. API called without user gesture

(Skipped)

5. Brave Talk, dark mode

  1. on a new-tab page, click on Start using Rewards
  2. open brave://settings/appearance and change to Dark mode
  3. load talk.brave.software
  4. click on the Start free 1:1 call button
  5. ensure the popup dialogs are dark-themed
example example
Screen Shot 2021-10-20 at 3 56 19 PM Screen Shot 2021-10-20 at 3 56 23 PM

Verified PASSED using

Brave 1.32.84 Chromium: 95.0.4638.54 (Official Build) beta (64-bit)
Revision d31a821ec901f68d0d34ccdbaea45b4c86ce543e-refs/branch-heads/4638@{#871}
OS Windows 10 Version 20H2 (Build 19042.1288)

1. API not available on non-Brave Talk hosts

  1. new profile
  2. launch Brave using --enable-logging=stderr --vmodule="*/variations/*"=6,"*/bat-native-ledger/*"=6,"*/brave_rewards/*"=6,"*/bat-native-ads/*"=6,"*/bat-native-confirmations/*"=6,"*/brave_ads/*"=9,"*/brave_user_model/*"=6 --brave-ads-staging --brave-ads-debug --rewards=staging=true,reconcile-interval=3 --enable-features=RequestAdsEnabledApi
  3. open a new-tab page
  4. click on the Start using Rewards button
  5. load www.brave.com
  6. open Developer Tools and switch to the Console tab
  7. enter chrome.braveRequestAdsEnabled().then(value => console.log(value)) and ensure it throws Uncaught TypeError: chrome.braveRequestAdsEnabled is not a function
  8. load brave://rewards/
  9. toggle Ads to Off
  10. enter chrome.braveRequestAdsEnabled().then(value => console.log(value)) and ensure it throws Uncaught TypeError: chrome.braveRequestAdsEnabled is not a function
example example
1api1 1api2

2a. Brave Talk, Rewards & Ads enabled

  1. new profile
  2. launch Brave using --enable-logging=stderr --vmodule="*/variations/*"=6,"*/bat-native-ledger/*"=6,"*/brave_rewards/*"=6,"*/bat-native-ads/*"=6,"*/bat-native-confirmations/*"=6,"*/brave_ads/*"=9,"*/brave_user_model/*"=6 --brave-ads-staging --brave-ads-debug --rewards=staging=true,reconcile-interval=3 --enable-features=RequestAdsEnabledApi
  3. on a new-tab page, click on Start using Rewards (or via other methods)
  4. load talk.brave.software
  5. click on Start free 1:1 call
  6. confirm after clicking the button the dialog is dismissed and you are able to Start a free 1:1 call without further prompts
example example
2a1 2a2

2b. Brave Talk, Rewards enabled, Ads disabled

  1. new profile
  2. launch Brave using --enable-logging=stderr --vmodule="*/variations/*"=6,"*/bat-native-ledger/*"=6,"*/brave_rewards/*"=6,"*/bat-native-ads/*"=6,"*/bat-native-confirmations/*"=6,"*/brave_ads/*"=9,"*/brave_user_model/*"=6 --brave-ads-staging --brave-ads-debug --rewards=staging=true,reconcile-interval=3 --enable-features=RequestAdsEnabledApi
  3. on a new-tab page, turn on Rewards (& Ads)
  4. disable Ads via the brave://rewards page’s toggle; Rewards should still be on)
  5. load talk.brave.software
  6. click on Start free 1:1 call
  7. confirm the doorhanger notification pops up and prompts you with a button to Turn on Brave Private Ads
  8. confirm after clicking the button the dialog is dismissed and you are able to Start a free 1:1 call without further prompts
example example example example example
2b1 2b2 2b3 2b4 2b5

2c. Brave Talk, Rewards disabled (never enabled), Ads disabled

  1. new profile
  2. launch Brave using --enable-logging=stderr --vmodule="*/variations/*"=6,"*/bat-native-ledger/*"=6,"*/brave_rewards/*"=6,"*/bat-native-ads/*"=6,"*/bat-native-confirmations/*"=6,"*/brave_ads/*"=9,"*/brave_user_model/*"=6 --brave-ads-staging --brave-ads-debug --rewards=staging=true,reconcile-interval=3 --enable-features=RequestAdsEnabledApi
  3. load talk.brave.software
  4. click on Start free 1:1 call
  5. confirm the doorhanger notification popups up and prompts you with a button to Turn on Rewards
  6. confirm after clicking the button the dialog is dismissed and you are able to Start a free 1:1 call without further prompts
example example example example
2c1 2c2 2c3 2c4

3a. Brave Talk, Private Window

  1. new profile
  2. launch Brave using --enable-logging=stderr --vmodule="*/variations/*"=6,"*/bat-native-ledger/*"=6,"*/brave_rewards/*"=6,"*/bat-native-ads/*"=6,"*/bat-native-confirmations/*"=6,"*/brave_ads/*"=9,"*/brave_user_model/*"=6 --brave-ads-staging --brave-ads-debug --rewards=staging=true,reconcile-interval=3 --enable-features=RequestAdsEnabledApi
  3. click on Start using Rewards on the new-tab page
  4. open a new Private Window
  5. load talk.brave.software
  6. click on the Start free 1:1 call button
  7. confirm the Enable Rewards doorhanger dialog doesn't display
  8. open Developer Tools and switch to the Console tab
  9. enter chrome.braveRequestAdsEnabled().then(value => console.log(value)) and ensure it returns false
example example
3a1 3a2

3b. Brave Talk, Private Window with Tor

  1. new profile
  2. launch Brave using --enable-logging=stderr --vmodule="*/variations/*"=6,"*/bat-native-ledger/*"=6,"*/brave_rewards/*"=6,"*/bat-native-ads/*"=6,"*/bat-native-confirmations/*"=6,"*/brave_ads/*"=9,"*/brave_user_model/*"=6 --brave-ads-staging --brave-ads-debug --rewards=staging=true,reconcile-interval=3 --enable-features=RequestAdsEnabledApi
  3. open a New Private Window with Tor
  4. load talk.brave.software
  5. click on the Start free 1:1 call button
  6. confirm the Enable Rewards doorhanger dialog doesn't display
  7. open Developer Tools and switch to the Console tab
  8. enter chrome.braveRequestAdsEnabled().then(value => console.log(value)) and ensure it returns false
example example
3b1 3b2

3c. Guest window

  1. new profile
  2. launch Brave using --enable-logging=stderr --vmodule="*/variations/*"=6,"*/bat-native-ledger/*"=6,"*/brave_rewards/*"=6,"*/bat-native-ads/*"=6,"*/bat-native-confirmations/*"=6,"*/brave_ads/*"=9,"*/brave_user_model/*"=6 --brave-ads-staging --brave-ads-debug --rewards=staging=true,reconcile-interval=3 --enable-features=RequestAdsEnabledApi
  3. open a Guest Window
  4. load talk.brave.software
  5. click on the Start free 1:1 call button
  6. confirm the Enable Rewards doorhanger dialog doesn't display
  7. open Developer Tools and switch to the Console tab
  8. enter chrome.braveRequestAdsEnabled().then(value => console.log(value)) and ensure it returns false
example example
3c1 3c2

4. API called without user gesture

(Skipped)

5. Brave Talk, dark mode

  1. on a new-tab page, click on Start using Rewards
  2. open brave://settings/appearance and change to Dark mode
  3. load talk.brave.software
  4. click on the Start free 1:1 call button
  5. ensure the popup dialogs are dark-themed
example example
5-1 5-2

Verified PASSED using

Brave 1.32.87 Chromium: 95.0.4638.69 (Official Build) beta (64-bit)
Revision 6a1600ed572fedecd573b6c2b90a22fe6392a410-refs/branch-heads/4638@{#984}
OS Linux

1. API not available on non-Brave Talk hosts

  1. new profile
  2. launch Brave using --enable-logging=stderr --vmodule="*/variations/*"=6,"*/bat-native-ledger/*"=6,"*/brave_rewards/*"=6,"*/bat-native-ads/*"=6,"*/bat-native-confirmations/*"=6,"*/brave_ads/*"=9,"*/brave_user_model/*"=6 --brave-ads-staging --brave-ads-debug --rewards=staging=true,reconcile-interval=3 --enable-features=RequestAdsEnabledApi
  3. open a new-tab page
  4. click on the Start using Rewards button
  5. load www.brave.com
  6. open Developer Tools and switch to the Console tab
  7. enter chrome.braveRequestAdsEnabled().then(value => console.log(value)) and ensure it throws Uncaught TypeError: chrome.braveRequestAdsEnabled is not a function
  8. load brave://rewards/
  9. toggle Ads to Off
  10. enter chrome.braveRequestAdsEnabled().then(value => console.log(value)) and ensure it throws Uncaught TypeError: chrome.braveRequestAdsEnabled is not a function
example example
Screen Shot 2021-11-01 at 10 57 49 AM Screen Shot 2021-11-01 at 10 58 31 AM

2a. Brave Talk, Rewards & Ads enabled

  1. new profile
  2. launch Brave using --enable-logging=stderr --vmodule="*/variations/*"=6,"*/bat-native-ledger/*"=6,"*/brave_rewards/*"=6,"*/bat-native-ads/*"=6,"*/bat-native-confirmations/*"=6,"*/brave_ads/*"=9,"*/brave_user_model/*"=6 --brave-ads-staging --brave-ads-debug --rewards=staging=true,reconcile-interval=3 --enable-features=RequestAdsEnabledApi
  3. on a new-tab page, click on Start using Rewards (or via other methods)
  4. load talk.brave.software
  5. click on Start free 1:1 call
  6. confirm after clicking the button the dialog is dismissed and you are able to Start a free 1:1 call without further prompts
example example example
Screen Shot 2021-11-01 at 11 04 45 AM Screen Shot 2021-11-01 at 11 05 25 AM Screen Shot 2021-11-01 at 11 05 37 AM

2b. Brave Talk, Rewards enabled, Ads disabled

  1. new profile
  2. launch Brave using --enable-logging=stderr --vmodule="*/variations/*"=6,"*/bat-native-ledger/*"=6,"*/brave_rewards/*"=6,"*/bat-native-ads/*"=6,"*/bat-native-confirmations/*"=6,"*/brave_ads/*"=9,"*/brave_user_model/*"=6 --brave-ads-staging --brave-ads-debug --rewards=staging=true,reconcile-interval=3 --enable-features=RequestAdsEnabledApi
  3. on a new-tab page, turn on Rewards (& Ads)
  4. disable Ads via the brave://rewards page’s toggle; Rewards should still be on)
  5. load talk.brave.software
  6. click on Start free 1:1 call
  7. confirm the doorhanger notification pops up and prompts you with a button to Turn on Brave Private Ads
  8. confirm after clicking the button the dialog is dismissed and you are able to Start a free 1:1 call without further prompts
example example example example example
Screen Shot 2021-11-01 at 11 07 17 AM Screen Shot 2021-11-01 at 11 07 35 AM Screen Shot 2021-11-01 at 11 07 55 AM Screen Shot 2021-11-01 at 11 08 00 AM Screen Shot 2021-11-01 at 11 08 12 AM

2c. Brave Talk, Rewards disabled (never enabled), Ads disabled

  1. new profile
  2. launch Brave using --enable-logging=stderr --vmodule="*/variations/*"=6,"*/bat-native-ledger/*"=6,"*/brave_rewards/*"=6,"*/bat-native-ads/*"=6,"*/bat-native-confirmations/*"=6,"*/brave_ads/*"=9,"*/brave_user_model/*"=6 --brave-ads-staging --brave-ads-debug --rewards=staging=true,reconcile-interval=3 --enable-features=RequestAdsEnabledApi
  3. load talk.brave.software
  4. click on Start free 1:1 call
  5. confirm the doorhanger notification popups up and prompts you with a button to Turn on Rewards
  6. confirm after clicking the button the dialog is dismissed and you are able to Start a free 1:1 call without further prompts
example example example
Screen Shot 2021-11-01 at 11 42 06 AM Screen Shot 2021-11-01 at 11 42 19 AM Screen Shot 2021-11-01 at 11 42 32 AM

3a. Brave Talk, Private Window

  1. new profile
  2. launch Brave using --enable-logging=stderr --vmodule="*/variations/*"=6,"*/bat-native-ledger/*"=6,"*/brave_rewards/*"=6,"*/bat-native-ads/*"=6,"*/bat-native-confirmations/*"=6,"*/brave_ads/*"=9,"*/brave_user_model/*"=6 --brave-ads-staging --brave-ads-debug --rewards=staging=true,reconcile-interval=3 --enable-features=RequestAdsEnabledApi
  3. click on Start using Rewards on the new-tab page
  4. open a new Private Window
  5. load talk.brave.software
  6. click on the Start free 1:1 call button
  7. confirm the Enable Rewards doorhanger dialog doesn't display
  8. open Developer Tools and switch to the Console tab
  9. enter chrome.braveRequestAdsEnabled().then(value => console.log(value)) and ensure it returns false
example example
Screen Shot 2021-11-01 at 11 11 50 AM Screen Shot 2021-11-01 at 11 12 32 AM

3b. Brave Talk, Private Window with Tor

  1. new profile
  2. launch Brave using --enable-logging=stderr --vmodule="*/variations/*"=6,"*/bat-native-ledger/*"=6,"*/brave_rewards/*"=6,"*/bat-native-ads/*"=6,"*/bat-native-confirmations/*"=6,"*/brave_ads/*"=9,"*/brave_user_model/*"=6 --brave-ads-staging --brave-ads-debug --rewards=staging=true,reconcile-interval=3 --enable-features=RequestAdsEnabledApi
  3. open a New Private Window with Tor
  4. load talk.brave.software
  5. click on the Start free 1:1 call button
  6. confirm the Enable Rewards doorhanger dialog doesn't display
  7. open Developer Tools and switch to the Console tab
  8. enter chrome.braveRequestAdsEnabled().then(value => console.log(value)) and ensure it returns false
example example
Screen Shot 2021-11-01 at 11 14 12 AM Screen Shot 2021-11-01 at 11 14 30 AM

3c. Guest window

  1. new profile
  2. launch Brave using --enable-logging=stderr --vmodule="*/variations/*"=6,"*/bat-native-ledger/*"=6,"*/brave_rewards/*"=6,"*/bat-native-ads/*"=6,"*/bat-native-confirmations/*"=6,"*/brave_ads/*"=9,"*/brave_user_model/*"=6 --brave-ads-staging --brave-ads-debug --rewards=staging=true,reconcile-interval=3 --enable-features=RequestAdsEnabledApi
  3. open a Guest Window
  4. load talk.brave.software
  5. click on the Start free 1:1 call button
  6. confirm the Enable Rewards doorhanger dialog doesn't display
  7. open Developer Tools and switch to the Console tab
  8. enter chrome.braveRequestAdsEnabled().then(value => console.log(value)) and ensure it returns false
example example
Screen Shot 2021-11-01 at 11 15 29 AM Screen Shot 2021-11-01 at 11 15 44 AM

4. API called without user gesture

(Skipped)

5. Brave Talk, dark mode

  1. on a new-tab page, click on Start using Rewards
  2. open brave://settings/appearance and change to Dark mode
  3. load talk.brave.software
  4. click on the Start free 1:1 call button
  5. ensure the popup dialogs are dark-themed
example example
Screen Shot 2021-11-01 at 11 45 20 AM Screen Shot 2021-11-01 at 11 45 25 AM

@stephendonner stephendonner added QA Pass-macOS QA/Test-All-Platforms and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Oct 20, 2021
@stephendonner
Copy link

stephendonner commented Oct 27, 2021

Verified PASSED using Brave 1.32.81, Chromium 95.0.4638.54 on a Google Pixel XL, Android 9.

1. API not available on non-Brave Talk hosts

  1. fresh install
  2. launch Brave using --enable-features=RequestAdsEnabledApi
  3. open a new-tab page
  4. enable Rewards
  5. load www.brave.com
  6. connect Android device to desktop browser, and open Developer Tools and switch to the Console tab
  7. enter chrome.braveRequestAdsEnabled().then(value => console.log(value)) and ensure it throws Uncaught TypeError: chrome.braveRequestAdsEnabled is not a function
  8. load brave://rewards/
  9. toggle Ads to Off
  10. enter chrome.braveRequestAdsEnabled().then(value => console.log(value)) and ensure it throws Uncaught TypeError: chrome.braveRequestAdsEnabled is not a function
example example
Screen Shot 2021-10-26 at 10 01 59 PM Screen Shot 2021-10-26 at 10 02 51 PM

2a. Brave Talk, Rewards & Ads enabled

  1. fresh install
  2. launch Brave using --enable-features=RequestAdsEnabledApi
  3. enable Rewards
  4. load talk.brave.software
  5. tap on Start free 1:1 call
  6. confirm after tapping the button the dialog is dismissed and you are able to Start a free 1:1 call without further prompts
example example example example
Screenshot_20211026-222900 Screenshot_20211026-222952 Screenshot_20211026-223011 Screenshot_20211026-223028

2b. Brave Talk, Rewards enabled, Ads disabled

  1. fresh install
  2. launch Brave using --enable-features=RequestAdsEnabledApi
  3. turn on Rewards (& Ads)
  4. disable Ads via the brave://rewards page’s toggle; Rewards should still be on)
  5. load talk.brave.software
  6. tap on Start free 1:1 call
  7. confirm the doorhanger notification pops up and prompts you with a button to Turn on Brave Private Ads
  8. confirm after tapping the button the dialog is dismissed and you are able to Start a free 1:1 call without further prompts
example example example example example example
Screenshot_20211026-221153 Screenshot_20211026-221211 Screenshot_20211026-221246 Screenshot_20211026-221255 Screenshot_20211026-221318 Screenshot_20211026-221341

2c. Brave Talk, Rewards disabled (never enabled), Ads disabled

  1. fresh install
  2. launch Brave using --enable-features=RequestAdsEnabledApi
  3. load talk.brave.software
  4. tap on Start free 1:1 call
  5. confirm the doorhanger notification popups up and prompts you with a button to Turn on Rewards
  6. confirm after tapping the button the dialog is dismissed and you are able to Start a free 1:1 call without further prompts
example example example example
Screenshot_20211026-222226 Screenshot_20211026-222235 Screenshot_20211026-222249 Screenshot_20211026-222323

3a. Brave Talk, Private Window

  1. fresh install
  2. launch Brave using --enable-features=RequestAdsEnabledApi
  3. enable Rewards
  4. open a new Private Window
  5. load talk.brave.software
  6. tap on the Start free 1:1 call button
  7. confirm the Enable Rewards doorhanger dialog doesn't display
  8. open Developer Tools and switch to the Console tab
  9. enter chrome.braveRequestAdsEnabled().then(value => console.log(value)) and ensure it returns false
example example example example
Screenshot_20211026-223545 Screenshot_20211026-223620 Screen Shot 2021-10-26 at 10 37 03 PM Screenshot_20211026-223627

3b. Brave Talk, Private Window with Tor

(skipped; not available on Android)

4. API called without user gesture

(skipped)

5. Brave Talk, dark mode (via Experimental night mode option on Android, from Chrome)

  1. open Settings -> Appearance
  2. choose Dark in Themes
  3. load talk.brave.software
  4. tap on the Start free 1:1 call button
  5. vet if chrome dialogs are dark-theme enabled (no; conferred with @aseren and we're OK for now, as Rewards doesn't dark-theme enable its dialog either)
example example example example
Screenshot_20211028-131504 Screenshot_20211028-131700 Screenshot_20211028-131709 Screenshot_20211028-131719

Verification passed on Brave v1.32.95 on Samsung Galaxy Tab S5e (Android 10.0)

1. API not available on non-Brave Talk hosts

image

2a. Brave Talk, Rewards & Ads enabled

image

2b. Brave Talk, Rewards enabled, Ads disabled

Screenshot_20211111-233608_Brave - Beta Screenshot_20211111-233620_Brave - Beta Screenshot_20211111-233646_Brave - Beta Screenshot_20211111-233657_Brave - Beta

2c. Brave Talk, Rewards disabled (never enabled), Ads disabled

Screenshot_20211111-231958_Brave - Beta Screenshot_20211111-232433_Brave - Beta Screenshot_20211111-232452_Brave - Beta

3a. Brave Talk, Private Window

Screenshot_20211111-235854_Brave - Beta

3b. Brave Talk, Private Window with Tor

(skipped; not available on Android)

4. API called without user gesture

(skipped)

5. Brave Talk, dark mode (via Experimental night mode option on Android, from Chrome)

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