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. |