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

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

Issue 6325003: Adding pyAuto tests for Chrome Instant features (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 11 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 71061)
+++ chrome/test/functional/instant.py (working copy)
@@ -4,6 +4,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import os
+
import pyauto_functional # Must be imported before pyauto
import pyauto
@@ -40,6 +42,27 @@
self.assertTrue('google.com' in location,
msg='No google.com in %s' % location)
+ def testInstantDisabledInIncognito(self):
+ """Test that instant is disabled in Incognito mode."""
+ self.RunCommand(pyauto.IDC_NEW_INCOGNITO_WINDOW)
+ self.SetOmniboxText('google.com', windex=1)
+ self.assertFalse(self.GetInstantInfo()['active'],
+ 'Instant enabled in Incognito mode.')
+ def testInstantOverlayNotStoredInHistory(self):
+ """Test that instant overlay page is not stored in history."""
+ url = self.GetFileURLForPath(os.path.join(self.DataDir(), 'title2.html'))
+ self.SetOmniboxText(url)
+ self.assertTrue(self.WaitUntil(self._DoneLoading))
+ history = self.GetHistoryInfo().History()
+ self.assertEqual(0, len(history))
+
+ def testInstantDisabledForJavaScript(self):
+ """Test that instant is disabled for javascript URLs."""
+ self.SetOmniboxText('javascript:')
+ self.assertFalse(self.GetInstantInfo()['active'],
+ 'Instant enabled for javascript URL.')
+
+
if __name__ == '__main__':
pyauto_functional.Main()
« 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