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

Disable Greaselion service if Rewards isn't enabled #40872

Closed
atuchin-m opened this issue Sep 5, 2024 · 6 comments · Fixed by brave/brave-core#25535
Closed

Disable Greaselion service if Rewards isn't enabled #40872

atuchin-m opened this issue Sep 5, 2024 · 6 comments · Fixed by brave/brave-core#25535

Comments

@atuchin-m
Copy link
Contributor

Description

We don't use Greaselion for anything else now.
I should save some CPU cycles especially during the startup.

@LaurenWags
Copy link
Member

@atuchin-m looks like the issue with the test plan (#39610 (comment)) is still open. Does that need to be closed and uplifted to 1.72.x for this issue (#40872) to be verified?

cc @kjozwiak

@atuchin-m
Copy link
Contributor Author

@LaurenWags it's a meta issue to track all the related issue. I've closed it because all the depended issues are resolved.

@GeetaSarvadnya GeetaSarvadnya added the QA/In-Progress Indicates that QA is currently in progress for that particular issue label Oct 22, 2024
@GeetaSarvadnya
Copy link

GeetaSarvadnya commented Oct 22, 2024

Verification PASSED on

Brave | 1.72.85 Chromium: 130.0.6723.58 (Official Build) beta (64-bit)
-- | --
Revision | 2c872aa4d2694bc73ec58e3b14538a4008a6381e
OS | Windows 10 Version 22H2 (Build 19045.5011)
Case 1: Rewards and WDP are disabled_PASSED
  1. Restart browser
  2. Open a new tab and navigate to a page that uses Greaselion (e.g. https://x.com/bravelaurenwags on staging)
  3. Verify that the creator checkmark does not appear on the Rewards icon
  4. Verify there is no Brave Extension process in menu => More tools => Task manager
  5. Verify there is no extension with name greaselion- on brave://extensions-internals/
step 1 step 2,3 step 4 step 5
Image Image Image Image
Case 2: Rewards ON_PASSED
  1. Open the browser with a clean profile
  2. Enable rewards
  3. Open a new tab and navigate to a page that uses Greaselion (e.g. https://x.com/brave on production)
  4. Verify that the creator checkmark appears on the Rewards icon
  5. Verify there is Brave Extension process in menu => More tools => Task manager
step 3,4 step 5
Image Image
  1. Visit Visit brave://inspect/#extensions
  2. Confirm there is a "Brave" extension on this page
  3. Click on the "inspect" link and then the "Console" tab
  4. Type WDP.isRunning on the console
  5. Confirm this does not return "true"
    ---> @atuchin-m confirmed the error is ok as long as WDP is disabled, as it is in this case (confirmed via https://bravesoftware.slack.com/archives/C026Z6C96QK/p1731014486218639?thread_ts=1731013714.353799&cid=C026Z6C96QK). Also note, the error that is returned matches Release channel (1.71.x) when WDP is disabled.

Image

Case 3: WDP ON_PASSED

Note, per discussion with Rémi, used general checks from brave/brave-core#9381 (comment) to confirm WDP functionality per the test plan and incorporated them into my steps below.

  1. Open the browser with a clean profile. Close and relaunch to pull griffin.
  2. Visit brave://inspect/#extensions
  3. Confirm there is no "Brave" extension on this page
    Image
  4. Navigate to brave://settings/search
  5. Enable WDP
    Image
  6. Verify there is Brave Extension process in menu => More tools => Task manager
    Image
  7. Navigate back to brave://inspect/#extensions
  8. Confirm there is now a "Brave" extension on this page
    Image
  9. Click on the "inspect" link and then the "Console" tab
  10. Type WDP.isRunning on the console
  11. Confirm this returns "true"
    Image
  12. Back to the console window, select the cog on the right (bottom one) then select "Log XMLHttpRequests"
    Image
  13. Enter the following command in the prompt on the "Console" page:
WDP.modules['web-discovery-project'].background.webDiscoveryProject.patternsLoader.resourceWatcher.forceUpdate()
  1. Confirm you see requests like below:
    Image
  2. Open a new tab in the browser and visit https://www.google.com/search?q=soup
  3. Once the page has finished loading completely, close it
  4. Go back to the console and enter the following:
WDP.modules['web-discovery-project'].background.webDiscoveryProject.strictQueries.map(x=>x.tDiff=0)
  1. Wait up a bit and you should see network requests being emitted like in the screenshot below

Image

Note, the time the requests can take varies. I've seen it quick (less than ~20s) and longer (~1-1.5 min) for the requests to come through.

@GeetaSarvadnya GeetaSarvadnya added QA Pass-Win64 and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Oct 23, 2024
@LaurenWags
Copy link
Member

Removed QA Pass-Win64 label for now as basic WDP functionality needs to be checked in case 3.

Have asked @remusao on Slack for assistance. Adding QA/Blocked until we have this additional information.

cc @atuchin-m @rebron @kjozwiak

@LaurenWags
Copy link
Member

LaurenWags commented Nov 7, 2024

Verified with

Brave | 1.73.86 Chromium: 131.0.6778.39 (Official Build) (x86_64)
-- | --
Revision | 52163bcf4e40f27ddb76ffa79c90a8833084a9bd
OS | macOS Version 14.7.1 (Build 23H222)

Verified test plan from #39610 (comment):

Case 1: Rewards and WDP are disabled - PASSED
  1. Restart browser
  2. Open a new tab and navigate to a page that uses Greaselion (e.g. https://x.com/brave on production)
  3. Verify that the creator checkmark does not appear on the Rewards icon

Image

  1. Verify there is no Brave Extension process in menu => More tools => Task manager

Image

  1. Verify there is no extension with name greaselion- on brave://extensions-internals/

Image

Case 2: Rewards ON - PASSED
  1. Open the browser with a clean profile
  2. Enable rewards
  3. Open a new tab and navigate to a page that uses Greaselion (e.g. https://x.com/brave on production)
  4. Verify that the creator checkmark appears on the Rewards icon

Image

  1. Verify there is Brave Extension process in menu => More tools => Task manager

Image

  1. Visit Visit brave://inspect/#extensions
  2. Confirm there is a "Brave" extension on this page
  3. Click on the "inspect" link and then the "Console" tab
  4. Type WDP.isRunning on the console
  5. Confirm this does not return "true"
    ---> @atuchin-m confirmed the error is ok as long as WDP is disabled, as it is in this case (confirmed via https://bravesoftware.slack.com/archives/C026Z6C96QK/p1731014486218639?thread_ts=1731013714.353799&cid=C026Z6C96QK). Also note, the error that is returned matches Release channel (1.71.x) when WDP is disabled.

Image

Case 3: WDP ON - PASSED

Note, per discussion with Rémi, used general checks from brave/brave-core#9381 (comment) to confirm WDP functionality per the test plan and incorporated them into my steps below.

  1. Open the browser with a clean profile. Close and relaunch to pull griffin.
  2. Visit brave://inspect/#extensions
  3. Confirm there is no "Brave" extension on this page

Image

  1. Navigate to brave://settings/search
  2. Enable WDP

Image

  1. Verify there is Brave Extension process in menu => More tools => Task manager

Image

  1. Navigate back to brave://inspect/#extensions
  2. Confirm there is now a "Brave" extension on this page

Image

  1. Click on the "inspect" link and then the "Console" tab
  2. Type WDP.isRunning on the console
  3. Confirm this returns "true"

Image

  1. Back to the console window, select the cog on the right (bottom one) then select "Log XMLHttpRequests"

Image

  1. Enter the following command in the prompt on the "Console" page:
WDP.modules['web-discovery-project'].background.webDiscoveryProject.patternsLoader.resourceWatcher.forceUpdate()
  1. Confirm you see requests like below:

Image

  1. Open a new tab in the browser and visit https://www.google.com/search?q=soup
  2. Once the page has finished loading completely, close it
  3. Go back to the console and enter the following:
WDP.modules['web-discovery-project'].background.webDiscoveryProject.strictQueries.map(x=>x.tDiff=0)
  1. Wait up a bit and you should see network requests being emitted like in the screenshot below

Image

Note, the time the requests can take varies. I've seen it quick (less than ~20s) and longer (~1-1.5 min) for the requests to come through.

@LaurenWags LaurenWags added QA/In-Progress Indicates that QA is currently in progress for that particular issue QA Pass-macOS and removed QA/Blocked labels Nov 7, 2024
@LaurenWags
Copy link
Member

LaurenWags commented Nov 8, 2024

Verified with

Brave | 1.73.86 Chromium: 131.0.6778.39 (Official Build) (64-bit)
-- | --
Revision | 52163bcf4e40f27ddb76ffa79c90a8833084a9bd
OS | Linux

Verified test plan from #39610 (comment):

Case 1: Rewards and WDP are disabled - PASSED
  1. Restart browser
  2. Open a new tab and navigate to a page that uses Greaselion (e.g. https://x.com/brave on production)
  3. Verify that the creator checkmark does not appear on the Rewards icon

Image

  1. Verify there is no Brave Extension process in menu => More tools => Task manager

Image

  1. Verify there is no extension with name greaselion- on brave://extensions-internals/

Image

Case 2: Rewards ON - PASSED
  1. Open the browser with a clean profile
  2. Enable rewards
  3. Open a new tab and navigate to a page that uses Greaselion (e.g. https://x.com/brave on production)
  4. Verify that the creator checkmark appears on the Rewards icon

Image

  1. Verify there is Brave Extension process in menu => More tools => Task manager

Image

  1. Visit Visit brave://inspect/#extensions
  2. Confirm there is a "Brave" extension on this page
  3. Click on the "inspect" link and then the "Console" tab
  4. Type WDP.isRunning on the console
  5. Confirm this does not return "true"
    ---> @atuchin-m confirmed the error is ok as long as WDP is disabled, as it is in this case (confirmed via https://bravesoftware.slack.com/archives/C026Z6C96QK/p1731014486218639?thread_ts=1731013714.353799&cid=C026Z6C96QK). Also note, the error that is returned matches Release channel (1.71.x) when WDP is disabled.

Image

Case 3: WDP ON - PASSED

Note, per discussion with Rémi, used general checks from brave/brave-core#9381 (comment) to confirm WDP functionality per the test plan and incorporated them into my steps below.

  1. Open the browser with a clean profile. Close and relaunch to pull griffin.
  2. Visit brave://inspect/#extensions
  3. Confirm there is no "Brave" extension on this page

Image

  1. Navigate to brave://settings/search
  2. Enable WDP

Image

  1. Verify there is Brave Extension process in menu => More tools => Task manager

Image

  1. Navigate back to brave://inspect/#extensions
  2. Confirm there is now a "Brave" extension on this page

Image

  1. Click on the "inspect" link and then the "Console" tab
  2. Type WDP.isRunning on the console
  3. Confirm this returns "true"

Image

  1. Back to the console window, select the cog on the right (bottom one) then select "Log XMLHttpRequests"

Image

  1. Enter the following command in the prompt on the "Console" page:
WDP.modules['web-discovery-project'].background.webDiscoveryProject.patternsLoader.resourceWatcher.forceUpdate()
  1. Confirm you see requests like below:

Image

  1. Open a new tab in the browser and visit https://www.google.com/search?q=soup
  2. Once the page has finished loading completely, close it
  3. Go back to the console and enter the following:
WDP.modules['web-discovery-project'].background.webDiscoveryProject.strictQueries.map(x=>x.tDiff=0)
  1. Wait up a bit and you should see network requests being emitted like in the screenshot below

Image

Note, the time the requests can take varies. I've seen it quick (less than ~20s) and longer (~1-1.5 min) for the requests to come through.

@LaurenWags LaurenWags removed the QA/In-Progress Indicates that QA is currently in progress for that particular issue label Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment