Index: chrome/test/functional/instant.py |
=================================================================== |
--- chrome/test/functional/instant.py (revision 86045) |
+++ chrome/test/functional/instant.py (working copy) |
@@ -192,6 +192,32 @@ |
self.CloseBrowserWindow(1) |
self.assertEqual(self.GetActiveTabTitle(), 'about:blank') |
+ def testPreFetchInstantURLNotInHistory(self): |
+ """Test that pre-fetched URLs are not saved in History.""" |
+ self._BringUpInstant() |
+ history = self.GetHistoryInfo().History() |
+ self.assertFalse(history, msg='Pre-feteched URL saved in History') |
+ |
+ def testPreFetchInstantURLGeneratesNoPopups(self): |
+ """Test that pre-fetched URL does not generate popups.""" |
+ file_url = self.GetHttpURLForDataPath( |
+ os.path.join('pyauto_private', 'popup_blocker', |
Nirnimesh
2011/05/20 04:46:50
os.path.join is not needed.
You can do:
file_Url
|
+ 'PopupTest1.html')) |
+ # Set the preference to allow all sites to show popups. |
+ self.SetPrefs(pyauto.kDefaultContentSettings, {u'popups': 1}) |
+ self.SetOmniboxText(file_url) |
+ self.WaitUntilOmniboxQueryDone() |
+ self.assertEqual(1, self.GetBrowserWindowCount(), |
+ msg='Pre-fetched URL generated popups.') |
+ |
+ def testPreFetchInstantURLSetsNoCookies(self): |
+ """Test that pre-fetched URL does not set cookies.""" |
+ http_url = 'http://www.google.com' |
Nirnimesh
2011/05/20 04:46:50
You could use cookie1.html from the data dir. It'l
|
+ self.SetOmniboxText(http_url) |
+ self.WaitUntilOmniboxQueryDone() |
+ cookie_data = self.GetCookie(pyauto.GURL(http_url)) |
+ self.assertFalse(cookie_data, msg='Cookie set for pre-fetched instant URL') |
+ |
def _AssertInstantDoesNotDownloadFile(self, path): |
"""Asserts instant does not download the specified file. |