Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.

Firefox: Removing SDK extension tests and generalizing selenium tests… - #11789

Merged
jsha merged 1 commit into
EFForg:masterfrom
Hainish:selenium-tests-firefox
Aug 9, 2017
Merged

jsha merged 1 commit into
EFForg:masterfrom
Hainish:selenium-tests-firefox

Conversation

@Hainish

@Hainish Hainish commented Aug 9, 2017

Copy link
Copy Markdown
Member

… to support FF

@Hainish
Hainish requested a review from jsha August 9, 2017 19:01
Comment thread test/firefox/README.md

To add tests, put them in `./https-everywhere-tests/tests`.

# Manual tests

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're deleting the manual tests section, but I think they haven't actually been implemented as Selenium tests yet, right? We should probably keep them around.

// Show all logs.
user_pref("extensions.https_everywhere.LogLevel", 0);
user_pref("extensions.https_everywhere.log_to_stdout", true);
// Make it quicker to make manual config changes.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this file only partially deleted?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, these are the prefs that are only relevant for the XPCOM extension. The other prefs are necessary for debugging, installing the extension without a valid signature, etc.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes belong in #11791, I'll move them over.

Comment thread test/script.py Outdated
@@ -0,0 +1,98 @@
#!/usr/bin/env python2.7
#
# Run Chromium tests for HTTPS Everywhere

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Chromium/Selenium/

Comment thread test/script.py Outdated
driver = webdriver.Firefox(fp, firefox_binary=binary, log_path=os.devnull)
else:
driver = webdriver.Firefox(fp, log_path=os.devnull)
# Allow the extension time to load

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment should be right above the time.sleep. But it's a little alarming: HTTPS Everywhere should ideally redirect all relevant requests. If requests that happen early in the browser load skip the redirects, that's a bug. It looks like Chrome doesn't have an equivalent sleep. Do you know why this is necessary in Firefox?

Comment thread test/script.py Outdated
if driver.current_url.startswith('https'):
print bcolors.OKGREEN + sys.argv[1] + ": HTTP to HTTPS redirection successful" + bcolors.ENDC
elif driver.current_url.startswith('http'):
print bcolors.FAIL + sys.argv[1] + "Chromium: HTTP to HTTPS redirection failed" + bcolors.ENDC

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Chromium: //

@Hainish
Hainish force-pushed the selenium-tests-firefox branch 2 times, most recently from fb6ead2 to febdf14 Compare August 9, 2017 22:26
@Hainish
Hainish force-pushed the selenium-tests-firefox branch from febdf14 to 28f49a1 Compare August 9, 2017 22:31
@jsha
jsha merged commit 1a09fcb into EFForg:master Aug 9, 2017
@Hainish
Hainish deleted the selenium-tests-firefox branch February 23, 2018 01:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants