Index: functional/instant.py |
=================================================================== |
--- functional/instant.py (revision 71508) |
+++ functional/instant.py (working copy) |
@@ -63,6 +63,27 @@ |
self.assertFalse(self.GetInstantInfo()['active'], |
'Instant enabled for javascript URL.') |
+ def testPornNavigation(self): |
Nirnimesh
2011/01/15 00:14:34
Yeah baby!
|
+ """Test that instant does not navigate porn sites until |
+ user presses Enter key.""" |
+ self.SetOmniboxText('porn') |
+ self.assertTrue(self.WaitUntil(self._DoneLoading)) |
+ self.assertTrue(self.GetInstantInfo()['active'], |
+ 'Press Enter to search') |
Nirnimesh
2011/01/15 00:14:34
This error mesg is unclear
|
+ self.SetOmniboxText('xxx') |
Nirnimesh
2011/01/15 00:14:34
Instead of repeating these 3 lines (which's basica
|
+ self.assertTrue(self.WaitUntil(self._DoneLoading)) |
+ self.assertTrue(self.GetInstantInfo()['active'], |
+ 'Press Enter to search') |
+ |
+ def testFindInCanDismissInstant(self): |
+ """Test that instant previvew is dismissed by find-in-page.""" |
Nirnimesh
2011/01/15 00:14:34
s/previvew/preview/
|
+ 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() |