-
Notifications
You must be signed in to change notification settings - Fork 36
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
BSK support for FB CTL update #760
Conversation
0402bab
to
a4ec422
Compare
Sources/BrowserServicesKit/ContentBlocking/UserScripts/TrackerResolver.swift
Outdated
Show resolved
Hide resolved
20e59fa
to
717db16
Compare
This PR has been inactive for more than 7 days and will be automatically closed 7 days from now. |
This PR has been closed after 14 days of inactivity. Feel free to reopen it if you plan to continue working on it or have further discussions. |
This PR has been inactive for more than 7 days and will be automatically closed 7 days from now. |
Sources/BrowserServicesKit/ContentBlocking/UserScripts/TrackerResolver.swift
Outdated
Show resolved
Hide resolved
Sources/BrowserServicesKit/ContentBlocking/UserScripts/TrackerResolver.swift
Outdated
Show resolved
Hide resolved
Tests/BrowserServicesKitTests/ContentBlocker/WebViewTestHelper.swift
Outdated
Show resolved
Hide resolved
This PR has been inactive for more than 7 days and will be automatically closed 7 days from now. |
note: `testWhenThereIsCTLIsDisabledThenCTLSurrogateIsNotInjected` test is WIP
Tests/BrowserServicesKitTests/ContentBlocker/SurrogatesUserScriptTests.swift
Outdated
Show resolved
Hide resolved
Sources/BrowserServicesKit/ContentBlocking/ClickToLoadRulesSplitter.swift
Outdated
Show resolved
Hide resolved
Sources/BrowserServicesKit/ContentBlocking/ClickToLoadRulesSplitter.swift
Outdated
Show resolved
Hide resolved
Task/Issue URL: https://app.asana.com/0/72649045549333/1205105078450227/f Tech Design URL: https://app.asana.com/0/1201720254973470/1206422390411022/f CC: **Description**: This requires the corresponding BSK PR to test: duckduckgo/BrowserServicesKit#760 Note that his PR also relies on a custom config URL for testing purposes, to enable this new codepath. Once we merge the [corresponding privacy config PR](https://royal-thankful-weight.glitch.me/macos-config.json), the URL will be reverted to the production version prior to final review & merge. **Steps to test this PR**: Verify blocking 1. Navigate to https://privacy-test-pages.site/privacy-protections/click-to-load/ 2. Ensure request are blocked ("Facebook Resources Loads: NONE") 3. No social buttons should be shown ("All the social buttons from the SDK" & "All the social buttons in iFrames") 4. Login button should be replaced with a DDG overlay and hover 5. All posts should be replaced with DDG overlays Verify clicking through overlays 1. Click on several of the CTL overlays. They should disappear and be replaced with the underlying FB content (note that this test page is rather old so some posts may take several seconds to load, or even time out) Verify protections toggling 1. Turn protections off 4. FB requests should be allowed ("Facebook Resources Loads: DETECTED") 5. Both sets of social buttons should show up 6. Login button should by the stock FB one (no DDG hover tip) 7. All FB content should be shown without any CTL overlays Test login with FB 1. Navigate to https://www.eventbrite.com/signin/?iss=https%3A%2F%2Fid.auth.eventbrite.com%2F and/or https://www.grubhub.com/login 2. For eventbrite, a small round FB icon should be present 3. For grubhub, "Continue with Facebook" should be present 4. Click on the login button 5. You should see a DDG dialog warning the user about continuing ("Logging in with Facebook lets them track you") 6. Click on "Log In" 7. A new window should open with an FB login At this point that means that CTL blocking rules have been removed and the real FB sdk injected in place of the surrogate (otherwise the FB window content would not appear) Optionally you can complete the login process, but its not strictly necessary. <!-- Tagging instructions If this PR isn't ready to be merged for whatever reason it should be marked with the `DO NOT MERGE` label (particularly if it's a draft) If it's pending Product Review/PFR, please add the `Pending Product Review` label. If at any point it isn't actively being worked on/ready for review/otherwise moving forward (besides the above PR/PFR exception) strongly consider closing it (or not opening it in the first place). If you decide not to close it, make sure it's labelled to make it clear the PRs state and comment with more information. --> --- ###### Internal references: [Pull Request Review Checklist](https://app.asana.com/0/1202500774821704/1203764234894239/f) [Software Engineering Expectations](https://app.asana.com/0/59792373528535/199064865822552) [Technical Design Template](https://app.asana.com/0/59792373528535/184709971311943) [Pull Request Documentation](https://app.asana.com/0/1202500774821704/1204012835277482/f) --------- Co-authored-by: Jacek Łyp <[email protected]> Co-authored-by: Bartek Waresiak <[email protected]>
Please review the release process for BrowserServicesKit here.
Required:
Task/Issue URL: https://app.asana.com/0/72649045549333/1205105078450227/f
iOS PR: TBD (hopefully N/A)
macOS PR: duckduckgo/macos-browser#2162
What kind of version bump will this require?: Major/Minor/Patch
Optional:
Tech Design URL: https://app.asana.com/0/1201720254973470/1206422390411022/f
CC:
Description:
Updates BSK to support separate clickToLoad rule list, with associated surrogates changes. CTL is disabled for iOS
Steps to test this PR:
1.
1.
OS Testing:
Internal references:
Software Engineering Expectations
Technical Design Template