-
Notifications
You must be signed in to change notification settings - Fork 11
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
update ClickToLoad to use shared C-S-S #2162
Conversation
|
8e176bb
to
de24639
Compare
Note temp remote config URL for testing purposes
This restores functionality where
Also remove CTL subdir to simplify ClickToLoadUserScript diff
@bwaresiak I moved ClickToLoadRulesSplitter to BSK, and updated the tests accordingly. Note a few things:
Hope to have something for "final" review by EOD Mon |
@bwaresiak I fixed the ClickToLoadBlockingTests and added some test cases. All are now passing but please let me know if you think there are other test cases that we should add. There were two issues with the test:
I'm still working through some issues with SurrogateUserScriptTests, not sure what exactly it is yet since debugging Might be worth another code review pass overall, since I have fixed the other code comments as well (except the one for embedded TDS, etc but there's a reason I will note there) |
@ladamski let's sync on the debugging, I might have some tricks to share. :) I'll have a look at tests and changes Today. |
@bwaresiak ultimately I didn't have much luck with the Safari debugging path (by the time the content script showed up in the debugger it was already past my breakpoints..), so I just added some debug messaging to monitor execution. That demonstrated that the control flow was correct and the CTL tracker load was being detected & surrogate injected. Turns out the issue is related to the fact that these surrogate tests assume essentially sync execution, and CTL involves a bit of async messages to check current CTL enabled state, so the tests are evaluated before that RT is complete. Adding some delays to test evaluation results in the expected results. I pushed an example here: duckduckgo/BrowserServicesKit@la/clicktoload-redux...la/surrogate-tests I know adding delays is an ugly "fix" so I'm definitely open to a better way to coordinate test completion with these async operations. Also one more note, for some reason |
Note that I merged the changes from the test branch in the prior comment back into the working BSK PR. |
@ayoy I'm a little confused by Danger complaining about config & TDS urls here - I think URLs are actually matching. |
This reverts commit 388d73e.
@bwaresiak yep, we occasionally see this check reporting a false negative. Sorry about that. We should revisit the logic here. Thanks for double checking! |
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, the URL will be reverted to the production version prior to final review & merge.
Steps to test this PR:
Verify blocking
Verify clicking through overlays
Verify protections toggling
Test login with FB
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.
Internal references:
Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation