Created
June 12, 2017 19:34
-
-
Save felipc/d5388ee01f8297d7787f848532e3d81e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Testing infobar suppress (bug 1371819) | |
*** Using a fresh profile with the latest Nightly | |
1 - set the pref "devtools.chrome.enabled" to true | |
2 - Sanity check: | |
Visit the following websites and make sure that the infobar appears: | |
yandex.ru | |
chpoking.ru | |
ok.ru | |
amazon.com | |
amazon.co.jp | |
amazon.fr | |
twitch.tv | |
ebay.com | |
aol.com | |
Note 1: do not click on the X in the infobar because we don't want to treat this as a dismissal. | |
Revisit the website to ensure that the infobar is showing every time. | |
Note 2: the string of the infobar has changed. It now says "This site uses a plugin that may slow Firefox." | |
*** Changing to the staging blocklist: | |
3 - Open browser console again to paste and Enter: | |
Preferences.set("browser.safebrowsing.provider.mozilla.updateURL",Preferences.get("browser.safebrowsing.provider.mozilla.updateURL").replace("shavar.services.mozilla.com/", "shavar.stage.mozaws.net/")); | |
Preferences.set("browser.safebrowsing.provider.mozilla.nextupdatetime","1"); | |
4 - Restart the browser | |
5 - Wait a while. You can keep an eye on the pref "browser.safebrowsing.provider.mozilla.nextupdatetime" in about:config. | |
Once it changes to a big value again, you're good to continue | |
6 - Sanity check: | |
- Check that you're now in Week 4 by running the checking instructions below | |
**** Real test: | |
7 - Revisit those same websites, and verify that: | |
- the infobar *does not* appear now | |
- the "Lego" icon *still* appears in the URL bar | |
- it's possible to successfully activate Flash by clicking on the Lego icon and allowing it to run | |
========== Checking what's the corresponding Week for the blocklist ========= | |
Paste all of the above lines all together in the Browser Console, and press Enter: | |
function checkWeek() { | |
let classifier = Cc['@mozilla.org/url-classifier/dbservice;1'] | |
.getService(Ci.nsIURIClassifier); | |
let { NetUtil } = Cu.import("resource://gre/modules/NetUtil.jsm", {}); | |
let table = Services.prefs.getCharPref("urlclassifier.flashSubDocTable"); | |
for (let i = 1;;i++) { | |
let url = `https://week${i}.flashstudy.example.com`; | |
let uri = NetUtil.newURI(url); | |
let result = classifier.classifyLocal(uri, table); | |
if (result == "") { | |
console.log(`You're in Week ${i-1} of the Flash Shield Study`); | |
break; | |
} | |
} | |
} | |
checkWeek(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment