Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(463)

Side by Side Diff: functional/omnibox.py

Issue 6135005: Fixing omnibox continues search (pyauto) problem on non-mac machine (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/test/
Patch Set: '' Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2010 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import glob 6 import glob
7 import os 7 import os
8 import re 8 import re
9 import shutil 9 import shutil
10 import tempfile 10 import tempfile
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 self.AppendTab(pyauto.GURL(url)) 303 self.AppendTab(pyauto.GURL(url))
304 self.assertTrue(self.WaitUntil(lambda: self._GotNewMatches(len(old_matches), 304 self.assertTrue(self.WaitUntil(lambda: self._GotNewMatches(len(old_matches),
305 search_text), timeout=1)) 305 search_text), timeout=1))
306 matches = self._GetOmniboxMatchesFor(search_text) 306 matches = self._GetOmniboxMatchesFor(search_text)
307 matches_description = [x for x in matches if x['destination_url'] == url] 307 matches_description = [x for x in matches if x['destination_url'] == url]
308 self.assertEqual(1, len(matches_description)) 308 self.assertEqual(1, len(matches_description))
309 309
310 def _GotHistoryPageOption(self, search_text): 310 def _GotHistoryPageOption(self, search_text):
311 """Determines if omnibox returns an 'open history page' option for given 311 """Determines if omnibox returns an 'open history page' option for given
312 search text""" 312 search text"""
313 self.SetOmniboxText('')
313 matches = self._GetOmniboxMatchesFor(search_text) 314 matches = self._GetOmniboxMatchesFor(search_text)
314 matches_description = [x for x in matches if x['type'] == 315 matches_description = [x for x in matches if x['type'] ==
315 'open-history-page'] 316 'open-history-page']
316 return len(matches_description) != 0 317 return len(matches_description) != 0
317 318
318 def testRecentPageHistory(self): 319 def testRecentPageHistory(self):
319 """Verify that omnibox shows recent history option in the visited 320 """Verify that omnibox shows recent history option in the visited
320 url list.""" 321 url list."""
321 search_text = 'file' 322 search_text = 'file'
322 sites = glob.glob(os.path.join(self.DataDir(), 'find_in_page', '*.html')) 323 sites = glob.glob(os.path.join(self.DataDir(), 'find_in_page', '*.html'))
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 self.NavigateToURL(url, 1, 0) 355 self.NavigateToURL(url, 1, 0)
355 self._CheckBookmarkResultForVariousInputs(url, title, windex=1) 356 self._CheckBookmarkResultForVariousInputs(url, title, windex=1)
356 self.RunCommand(pyauto.IDC_NEW_INCOGNITO_WINDOW) 357 self.RunCommand(pyauto.IDC_NEW_INCOGNITO_WINDOW)
357 self.assertEqual(3, self.GetBrowserWindowCount()) 358 self.assertEqual(3, self.GetBrowserWindowCount())
358 self.NavigateToURL(url, 2, 0) 359 self.NavigateToURL(url, 2, 0)
359 self._CheckBookmarkResultForVariousInputs(url, title, windex=2) 360 self._CheckBookmarkResultForVariousInputs(url, title, windex=2)
360 361
361 362
362 if __name__ == '__main__': 363 if __name__ == '__main__':
363 pyauto_functional.Main() 364 pyauto_functional.Main()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698