Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

Bug 1132700 - Convert Mozmill testSafeBrowsingNotificationBar #91

Merged
merged 1 commit into from Mar 6, 2015

Conversation

galgeek
Copy link
Contributor

@galgeek galgeek commented Feb 18, 2015

This PR updates Chris Manchester's PR #30 for recent library updates.

@galgeek galgeek force-pushed the safeBrowsingNotification branch 3 times, most recently from d34d21e to d0b84cf Compare February 19, 2015 20:12
@galgeek galgeek self-assigned this Feb 19, 2015
@galgeek galgeek force-pushed the safeBrowsingNotification branch 3 times, most recently from 7896c3b to 41a88ac Compare February 24, 2015 02:59
("safebrowsing.notAnAttackButton.label",
"www.stopbadware.org",
"https://www.itisatrap.org/firefox/its-an-attack.html"),
]
Copy link
Contributor

Choose a reason for hiding this comment

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

Those are not all URLs. I would suggest that in this case you name the variable self.test_data, and keep the dict and not use an array.

@galgeek galgeek force-pushed the safeBrowsingNotification branch 2 times, most recently from 4fd1970 to bcffcf4 Compare February 25, 2015 20:17
label = self.browser.get_property('safebrowsing.getMeOutOfHereButton.label')
with self.marionette.using_context('chrome'):
# is this the button in the notification bar, or the button on the page?
button = (self.marionette.find_element(By.ID, 'content')
Copy link
Contributor

Choose a reason for hiding this comment

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

This is the button on the notification bar.

Copy link
Contributor

Choose a reason for hiding this comment

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

Lets call it notification panel for consistency and to not mix it up with any toolbar in the browser window.

@@ -413,6 +415,11 @@ def __init__(self, *args, **kwargs):
self._tabbar = None

@property
def default_homepage(self):
"""Returns the value of the preference browser.startup.homepage."""
Copy link
Contributor

Choose a reason for hiding this comment

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

Just say The default homepage as used by the current locale. Also please add the :returns line.

@galgeek galgeek force-pushed the safeBrowsingNotification branch 2 times, most recently from 8eb2880 to f84bbb2 Compare March 4, 2015 20:01
@galgeek
Copy link
Contributor Author

galgeek commented Mar 4, 2015

Thank you for the feedback!

This test loads not about:error but about:blocked, with has similar issues. I've moved the time.sleep() lines.

I am not seeing any timeout issues today.

Regarding marionette.get_url(), that requires content context, and for the method you asked about, we are otherwise always in chrome context, including closing the tab after the url check.

button.click()

self.wait_for_condition(expected.element_present(By.ID, 'main-feature'))
self.wait_for_condition(expected.element_stale(button))
Copy link
Contributor

Choose a reason for hiding this comment

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

I would flip those two checks. The button will become stale first.

@whimboo whimboo merged commit 1a6adf5 into mozilla:master Mar 6, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants