Bug 1304004 - Fix regression in firefox-ui security tests caused by bug 1303291. r=keeler

MozReview-Commit-ID: Co7efI9jgeC

--HG--
extra : rebase_source : d6759ade4b69ec5d5a5db4b20c9fac67e9ac57f8
This commit is contained in:
Henrik Skupin 2016-10-19 14:26:12 +02:00
parent df68519c41
commit c92531bed5
5 changed files with 25 additions and 18 deletions

View File

@ -2,15 +2,11 @@
tags = remote
[test_dv_certificate.py]
skip-if = true # 1304004
[test_enable_privilege.py]
tags = local
[test_ev_certificate.py]
skip-if = true # 1304004
[test_mixed_content_page.py]
skip-if = true # 1304004
[test_mixed_script_content_blocking.py]
skip-if = true # 1304004
[test_no_certificate.py]
tags = local
[test_safe_browsing_initial_download.py]

View File

@ -29,9 +29,10 @@ class TestDVCertificate(FirefoxTestCase):
with self.marionette.using_context('content'):
self.marionette.navigate(self.url)
# The lock icon should be shown
self.assertIn('identity-secure',
self.locationbar.connection_icon.value_of_css_property('list-style-image'))
# The correct lock icon should be shown
icon = self.locationbar.connection_icon
self.assertEqual('url("chrome://browser/skin/connection-secure.svg")',
icon.value_of_css_property('list-style-image'))
self.assertEqual(self.locationbar.identity_box.get_attribute('className'),
'verifiedDomain')

View File

@ -29,9 +29,10 @@ class TestEVCertificate(FirefoxTestCase):
with self.marionette.using_context('content'):
self.marionette.navigate(self.url)
# The lock icon should be shown
self.assertIn('identity-secure',
self.locationbar.connection_icon.value_of_css_property('list-style-image'))
# The correct lock icon should be shown
icon = self.locationbar.connection_icon
self.assertEqual('url("chrome://browser/skin/connection-secure.svg")',
icon.value_of_css_property('list-style-image'))
# Check the identity box
self.assertEqual(self.locationbar.identity_box.get_attribute('className'),

View File

@ -24,8 +24,13 @@ class TestMixedContentPage(FirefoxTestCase):
with self.marionette.using_context('content'):
self.marionette.navigate(self.url)
self.assertIn('identity-mixed-passive-loaded',
self.locationbar.connection_icon.value_of_css_property('list-style-image'))
# The correct lock icon should be shown
icon = self.locationbar.connection_icon
self.assertEqual('url("chrome://browser/skin/connection-mixed-passive-loaded.svg#icon")',
icon.value_of_css_property('list-style-image'))
self.assertEqual(self.locationbar.identity_box.get_attribute('className'),
'unknownIdentity mixedDisplayContent')
# Open the identity popup
self.locationbar.open_identity_popup()

View File

@ -32,25 +32,29 @@ class TestMixedScriptContentBlocking(FirefoxTestCase):
def _expect_protection_status(self, enabled):
if enabled:
color, icon_filename, state = (
color, icon_filename, identity, state = (
'rgb(0, 136, 0)',
'identity-secure',
'url("chrome://browser/skin/connection-secure.svg")',
'verifiedDomain mixedActiveBlocked',
'blocked'
)
else:
color, icon_filename, state = (
color, icon_filename, identity, state = (
'rgb(255, 0, 0)',
'identity-mixed-active-loaded',
'url("chrome://browser/skin/connection-mixed-active-loaded.svg#icon")',
'unknownIdentity mixedActiveContent',
'unblocked'
)
# First call to Wait() needs a longer timeout due to the reload of the web page.
connection_icon = self.locationbar.connection_icon
Wait(self.marionette, timeout=self.browser.timeout_page_load).until(
lambda _: icon_filename in connection_icon.value_of_css_property('list-style-image'),
message="The correct icon is displayed"
lambda _: connection_icon.value_of_css_property('list-style-image') == icon_filename,
message='Connection icon "{}" is not set'.format(icon_filename)
)
self.assertEqual(self.locationbar.identity_box.get_attribute('className'), identity)
with self.marionette.using_context('content'):
for identifier, description in self.test_elements:
el = self.marionette.find_element(By.ID, identifier)