Chromium Code Reviews| 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() |