GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still and

Commit b44d95b1 authored by Alex Catarineu's avatar Alex Catarineu

Fix download_pdf test

parent eae32026
......@@ -485,8 +485,6 @@ our @tests = (
type => 'marionette',
descr => 'Check if download of PDF is working (#19402)',
use_net => 1,
# Bug 30333: temporarily disable test
enable => sub { undef },
name => 'pinning_now',
from marionette_driver import By, Actions
from marionette_driver.errors import MarionetteException, JavascriptException
from marionette_harness import MarionetteTestCase
import testsuite
......@@ -19,31 +16,10 @@ class Test(MarionetteTestCase):
def test_download_pdf(self):
m = self.marionette
m.set_window_size(1024, 300)
with m.using_context('content'):
current_window = m.current_chrome_window_handle
download_button = m.find_element('id', 'download')
action = Actions(m)
closed_window = 0
with m.using_context('chrome'):
for window in m.chrome_window_handles:
if window != current_window:
info_msg = m.find_element('id', 'info.body')
self.assertRegexpMatches(info_msg.text, 'Tails',
msg='Pop up window text does not include Tails')
closed_window += 1
self.assertEqual(closed_window, 1, msg="no download pop up")
m.set_window_rect(width=1024, height=300)
download_button = m.find_element('id', 'download').click()
self.assertEqual(len(m.chrome_window_handles), 2, msg="Number of windows not correct")
dialog = m.switch_to_alert()
self.assertRegexpMatches(dialog.text, 'Tails',
msg='Pop up window text does not include Tails')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment