summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/test/functional/instant.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/chrome/test/functional/instant.py b/chrome/test/functional/instant.py
index eed319e..f149ebf 100644
--- a/chrome/test/functional/instant.py
+++ b/chrome/test/functional/instant.py
@@ -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 @@ class InstantTest(pyauto.PyUITest):
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()