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

Unified Diff: chrome/test/functional/instant.py

Issue 7033039: Add integration tests for instant.py. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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: 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.
« 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