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 = ( ...@@ -385,8 +385,6 @@ our @tests = (
name => 'searchengines', name => 'searchengines',
type => 'marionette', type => 'marionette',
descr => 'Check that we have the default search engines set', descr => 'Check that we have the default search engines set',
# Bug 30340: temporarily disable test
enable => sub { undef },
}, },
{ {
name => 'noscript', name => 'noscript',
......
...@@ -22,12 +22,15 @@ class Test(MarionetteTestCase): ...@@ -22,12 +22,15 @@ class Test(MarionetteTestCase):
def test_searchengines(self): def test_searchengines(self):
with self.marionette.using_context('content'): with self.marionette.using_context('content'):
self.marionette.navigate('about:') self.marionette.navigate('about:robots')
with self.marionette.using_context('chrome'): with self.marionette.using_context('chrome'):
searchbar = self.marionette.find_element('id', 'searchbar') self.marionette.timeout.implicit = 5
txtbox = searchbar.find_element('anon attribute', {'anonid': 'searchbar-textbox'}) searchbar = self.marionette.find_element('id', 'urlbar-input')
self.assertRegexpMatches(txtbox.get_attribute('label'), 'DuckDuckGo', searchbar.click()
'DuckDuckGo is not the default search engine!') 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. #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