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

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 86020)
+++ chrome/test/functional/instant.py (working copy)
@@ -192,6 +192,30 @@
self.CloseBrowserWindow(1)
self.assertEqual(self.GetActiveTabTitle(), 'about:blank')
+ def testPreFetchInstantURLNotInHistory(self):
+ """Test that pre-fetched URL not saved in History."""
Nirnimesh 2011/05/20 02:02:03 s/not/are not/
dyu1 2011/05/20 04:19:06 Done.
+ self._BringUpInstant()
+ raw_input()
Nirnimesh 2011/05/20 02:02:03 remove
dyu1 2011/05/20 04:19:06 Done.
+ history = self.GetHistoryInfo().History()
+ print history
Nirnimesh 2011/05/20 02:02:03 remove
dyu1 2011/05/20 04:19:06 Done.
+ self.assertFalse(history, msg='Pre-feteched URL saved in History')
+
+ def testPreFetchInstantURLGeneratesNoPopups(self):
+ """Test that pre-fetched URL does not generate pop-ups."""
Nirnimesh 2011/05/20 02:02:03 s/pop-ups/popups/
dyu1 2011/05/20 04:19:06 Done.
+ # Set an exception to allow popups from www.popuptest.com.
+ value = {'[*.]www.popuptest.com': {'popups': 1}}
+ self.SetPrefs(pyauto.kContentSettingsPatterns, value)
+ self.SetOmniboxText('http://www.popuptest.com/popuptest1.html')
Nirnimesh 2011/05/20 02:02:03 WaitForOmniboxQueryDone() after this line
Nirnimesh 2011/05/20 02:02:03 can we use a local http url here?
dyu1 2011/05/20 04:19:06 Done.
+ 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'
+ self.SetOmniboxText(http_url)
Nirnimesh 2011/05/20 02:02:03 WaitForOmniboxQueryDone() after this line
dyu1 2011/05/20 04:19:06 Done.
+ 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