Skip to content
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 TBB to 10.0.1 #5578

Merged
merged 2 commits into from
Oct 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion securedrop/dockerfiles/xenial/python3/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RUN gem install sass -v 3.4.23
# Ideally we'll keep those in sync.
ENV FF_VERSION 68.12.0esr
ENV GECKODRIVER_VERSION v0.27.0
ENV TBB_VERSION 9.5.4
ENV TBB_VERSION 10.0.1

# Import Tor release signing key
ENV TOR_RELEASE_KEY_FINGERPRINT "EF6E286DDA85EA2A4BA7DE684E2C6E8793298290"
Expand Down
5 changes: 2 additions & 3 deletions securedrop/tests/functional/functional_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,9 @@ def set_tbb_securitylevel(self, level):
time.sleep(1)
ActionChains(driver).send_keys(Keys.TAB).\
send_keys(Keys.RETURN).perform()
alert = self.wait_for(lambda: driver.switch_to.alert)
alert.send_keys(str(level))
ActionChains(driver).send_keys(str(level)).\
send_keys(Keys.RETURN).perform()
time.sleep(1)
self.wait_for(lambda: alert.accept())

def create_torbrowser_driver(self):
logging.info("Creating TorBrowserDriver")
Expand Down
12 changes: 7 additions & 5 deletions securedrop/tests/functional/test_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,24 +69,26 @@ def test_duplicate_generate_pages(self):

# Generate a codename in Tab A
assert len(self.driver.window_handles) == 1
tab_a = self.driver.current_window_handle
self._source_visits_source_homepage()
self._source_chooses_to_submit_documents()
codename_a = self.get_codename_generate()

# Generate a different codename in Tab B
self.driver.execute_script("window.open()")
self.driver.execute_script("window.open('about:blank', '_blank')")
tab_b = self.driver.window_handles[1]
assert len(self.driver.window_handles) == 2
self.driver.switch_to.window(tab_b)
assert self.driver.current_window_handle == tab_b
self._source_visits_source_homepage()
self._source_chooses_to_submit_documents()
codename_b = self.get_codename_generate()

tab_a = self.driver.window_handles[0]
assert tab_a != tab_b
assert codename_a != codename_b

# Proceed to submit documents in Tab A
assert len(self.driver.window_handles) == 2
self.driver.switch_to.window(tab_a)
assert self.driver.current_window_handle == tab_a
self._source_continues_to_submit_page()
Expand All @@ -108,13 +110,12 @@ def test_duplicate_generate_pages(self):
assert codename_lookup_b == codename_a
self._source_submits_a_message()

def test_duplicate_generate_pages_with_refresh(self):
def test_refreshed_duplicate_generate_pages(self):
# Test generation of multiple codenames in different browser tabs, including behavior
# of refreshing the codemae in each tab. Ref. issue 4458.

# Generate a codename in Tab A
assert len(self.driver.window_handles) == 1
tab_a = self.driver.current_window_handle
self._source_visits_source_homepage()
self._source_chooses_to_submit_documents()
codename_a1 = self.get_codename_generate()
Expand All @@ -124,7 +125,8 @@ def test_duplicate_generate_pages_with_refresh(self):
assert codename_a1 != codename_a2

# Generate a different codename in Tab B
self.driver.execute_script("window.open()")
self.driver.execute_script("window.open('about:blank', '_blank')")
tab_a = self.driver.window_handles[0]
tab_b = self.driver.window_handles[1]
self.driver.switch_to.window(tab_b)
assert self.driver.current_window_handle == tab_b
Expand Down