| 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()
|
|
|