Opened 3 years ago

Last modified 2 years ago

#3122 reviewing change

Add sitescripts.testpages.web.sitekey_frame URL handler

Reported by: kzar Assignee:
Priority: P4 Milestone:
Module: Sitescripts Keywords: testpages
Cc: Ross, sebastian, philip@… Blocked By: #3339
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

https://codereview.adblockplus.org/29328589/
https://codereview.adblockplus.org/29328600/
https://codereview.adblockplus.org/29329256/

Description

Background

testpages.adblockplus.org contains some test pages that we give to our Adblock Plus testers to test the various extensions. So far these pages have only required static content, nothing dynamically generated. However, to properly test the $sitekey filter option functionality we now need a pages to be dynamically generated.

What to change

Create a URL handler in sitescripts.testpages.web.sitekey_frame that responds to web requests, returning the proper X-Adblock-Key header. The template rendered for the body should be configurable, and the template should be provided with two variables: signature and public_key.

Document the new functionality and make the required corresponding changes to the testpages.adblockplus.org repository.

Note: This issue does not include adding comprehensive test cases for the $sitekey option, but only the prerequisite code that they require.

Change History (8)

comment:1 Changed 3 years ago by kzar

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:2 Changed 3 years ago by kzar

  • Review URL(s) modified (diff)

comment:5 Changed 3 years ago by kzar

  • Priority changed from Unknown to P4
  • Ready set

comment:7 Changed 3 years ago by kzar

  • Blocked By 3339 added

comment:8 Changed 2 years ago by kzar

  • Owner kzar deleted

I've just been looking through old issues I'm assigned to. The prerequsite work here was done but I don't think we ever actually added $sitekey tests cases to https://testpages.adblockplus.org.

Ross If you get a chance maybe add one?

  1. The testpages filter subscription contains a whitelist filter for the testpages sitekey
  2. The URL https://testpages.adblockplus.org/sitekey-frame#/path/to/testcase will create an iframe the size of the whole window with the src path of /path/to/testcase. It will also set up the correct $sitekey header.

So if you create a test case with something that would normally be blocked you can link to it with the sitekey-frame URL and it will no longer be. That way you can create a test case to confirm that $sitekey whitelisting is working.

Note: See TracTickets for help on using tickets.