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

Permission is not reset on page reopen if 30 seconds has not passed #31072

Closed
goodov opened this issue Jun 15, 2023 · 5 comments · Fixed by brave/brave-core#18920
Closed

Permission is not reset on page reopen if 30 seconds has not passed #31072

goodov opened this issue Jun 15, 2023 · 5 comments · Fixed by brave/brave-core#18920

Comments

@goodov
Copy link
Member

goodov commented Jun 15, 2023

After #30090 when permission is set to "forget on website close", it is reset after 30 seconds the tab is closed.

But this change introduced a subtle bug: if you reopen the same website BEFORE 30 seconds has expired, the permission won't be reset after the tab is closed.

@LaurenWags
Copy link
Member

LaurenWags commented Jun 30, 2023

@goodov sounds like the test is basically:

1. Open a site, select "Forget me" from shields
2. Close site
3. Reopen site within 30 seconds
4. Close site again
5. Wait at least 30 seconds
6. Ensure first party storage is cleared

Is the above correct? if not, could you provide a test plan?

@brave/qa-team Please see comment below from @goodov on test plan.

@goodov
Copy link
Member Author

goodov commented Jul 3, 2023

@goodov sounds like the test is basically:

  1. Open a site, select "Forget me" from shields
  2. Close site
  3. Reopen site within 30 seconds
  4. Close site again
  5. Wait at least 30 seconds
  6. Ensure first party storage is cleared

Is the above correct? if not, could you provide a test plan?

Not exactly. This is about resetting a permission when it's expired. This is covered by "Test case 3" here #30090 (comment)

#### Test case 3

1. Open https://permission.site
2. Trigger any permission, choose permission lifetime "until I close the site".
3. Close the website, wait 30 seconds, reopen it.
4. Expect permission is reset.

@stephendonner
Copy link

stephendonner commented Jul 3, 2023

Verification PASSED using

Brave | 1.54.90 Chromium: 115.0.5790.56 (Official Build) beta (x86_64)
-- | --
Revision | ebcfb87c1393f36955cfa2f6451a1767e3dc3ee5-refs/branch-heads/5790@{#1193}
OS | macOS Version 14.0 (Build 23A5276g)

Steps:

  1. installed 1.54.90
  2. launched Brave
  3. loaded permission.site
  4. clicked on Notification
  5. clicked on Allow at the Show notifications prompt, with default until I close this site selected
  6. opened a new window
  7. closed the previous tab/window
  8. waited 30 seconds
  9. reopened permission.dev
  10. checked the status of the Notifications button on the page
  11. clicked on it
  12. confirmed I was again prompted for permissions
example example example example example example
Screenshot 2023-07-03 at 3 01 46 PM Screenshot 2023-07-03 at 3 20 05 PM Screenshot 2023-07-03 at 3 20 10 PM Screenshot 2023-07-03 at 3 21 42 PM Screenshot 2023-07-03 at 3 21 46 PM Screenshot 2023-07-03 at 3 21 50 PM

Verification PASSED on

Brave	1.57.33 Chromium: 115.0.5790.114 (Official Build) beta (64-bit) 
Revision	86b4ea1d70ce73c4468d84cc8277f1f9de14b8bc
OS	Linux

Steps:

  1. installed 1.57.x
  2. launched Brave
  3. loaded permission.site
  4. clicked on Notification
  5. clicked on Allow at the Show notifications prompt, with default until I close this site selected
  6. opened a new window
  7. closed the previous tab/window
  8. waited 30 seconds
  9. reopened permission.site
  10. checked the status of the Notifications button on the page
  11. clicked on it
  12. confirmed I was again prompted for permissions
step 3 step 4 step 5 step 9 step 12
image image image image image

@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 Jul 3, 2023
@LaurenWags
Copy link
Member

thanks for the clarification @goodov! have updated my initial comment so hopefully no one tries to test the wrong thing 😄

@MadhaviSeelam
Copy link

Verification PASSED using

Brave | 1.57.41 Chromium: 115.0.5790.171 (Official Build) beta (64-bit)
-- | --
Revision | adc7e3e2defac3f9b39cb22bcbb354b72b74c2eb
OS | Windows 11 Version 22H2 (Build 22621.1992)

Steps:

  1. installed 1.57.41
  2. launched Brave
  3. loaded permission.site
  4. clicked on Microphone
  5. clicked Allow on the permissions prompt for default selection, until I close this site
  6. opened a new window
  7. closed the previous tab/window
  8. waited 30 seconds
  9. reopened permission.site
  10. checked the status of the Microphone button on the page
  11. clicked on it
  12. confirmed I was again prompted for permissions
step 3 step 5 step 9 step 10 step 12
image image image image image

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