GitLab is used only for code review, issue tracking and project management. Canonical locations for source code are still https://gitweb.torproject.org/ https://git.torproject.org/ and git-rw.torproject.org.

Commit aa420c44 authored by Alex Catarineu's avatar Alex Catarineu

Fix searchengines test

parent 1b30b27f
......@@ -385,8 +385,6 @@ our @tests = (
name => 'searchengines',
type => 'marionette',
descr => 'Check that we have the default search engines set',
# Bug 30340: temporarily disable test
enable => sub { undef },
},
{
name => 'noscript',
......
......@@ -22,12 +22,15 @@ class Test(MarionetteTestCase):
def test_searchengines(self):
with self.marionette.using_context('content'):
self.marionette.navigate('about:')
self.marionette.navigate('about:robots')
with self.marionette.using_context('chrome'):
searchbar = self.marionette.find_element('id', 'searchbar')
txtbox = searchbar.find_element('anon attribute', {'anonid': 'searchbar-textbox'})
self.assertRegexpMatches(txtbox.get_attribute('label'), 'DuckDuckGo',
'DuckDuckGo is not the default search engine!')
self.marionette.timeout.implicit = 5
searchbar = self.marionette.find_element('id', 'urlbar-input')
searchbar.click()
searchbar.send_keys("test")
urlbarresults = self.marionette.find_element('id', 'urlbar-results')
result = urlbarresults.find_element("css selector", "div:first-child .urlbarView-action")
self.assertRegexpMatches(result.text, 'DuckDuckGo', 'DuckDuckGo is not the default search engine!')
#XXX: Test whether the second and third engine are the ones we want as well.
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