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

Unified Diff: functional/instant.py

Issue 6352003: Added one testcases to Instant. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: functional/instant.py
===================================================================
--- functional/instant.py (revision 71508)
+++ functional/instant.py (working copy)
@@ -63,6 +63,25 @@
self.assertFalse(self.GetInstantInfo()['active'],
'Instant enabled for javascript URL.')
+ def testPornNavigation(self):
+ """Test that instant does not preview pron words until
+ user presses Enter key."""
+ porn_words = ['porn', 'xxx', 'sex videos', 'sex clips']
+ for search_word in porn_words:
+ self.SetOmniboxText(search_word)
+ self.assertTrue(self.WaitUntil(self._DoneLoading))
Allen 2011/01/19 22:43:25 a note: this pass condition isn't the expected beh
+ self.assertTrue(self.GetInstantInfo()['showing'],
+ 'User can preview porn words without enter key')
Nirnimesh 2011/01/18 20:05:50 Be consistent. use msg=
+
+ def testFindInCanDismissInstant(self):
+ """Test that instant preview is dismissed by find-in-page."""
+ self.SetOmniboxText('google.com')
+ self.assertTrue(self.WaitUntil(self._DoneLoading))
+ location = self.GetInstantInfo()['location']
+ self.assertTrue('google.com' in location,
+ msg='No google.com in %s' % location)
+ self.OpenFindInPage()
+ self.assertEqual(self.GetActiveTabTitle(), '')
if __name__ == '__main__':
pyauto_functional.Main()
« 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