summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsunandt@google.com <sunandt@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-31 02:22:40 +0000
committersunandt@google.com <sunandt@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-31 02:22:40 +0000
commita8b61c14b49ad7a083cf8aaf06988e16a745d3ad (patch)
treed72bdb40bbd3b77eb53486f0f65a7231dd81f499
parent58934774ab40ca110c94d8fa8f3f37ccb4556b77 (diff)
downloadchromium_src-a8b61c14b49ad7a083cf8aaf06988e16a745d3ad.zip
chromium_src-a8b61c14b49ad7a083cf8aaf06988e16a745d3ad.tar.gz
chromium_src-a8b61c14b49ad7a083cf8aaf06988e16a745d3ad.tar.bz2
Adding more pyauto enterprise tests for windows.
testInstant testAllowCookies testClearSiteDataOnExit testBlockThirdPartyCookies testDisableSPDY testIncognitoEnabled BUG=55480 TEST=none Review URL: http://codereview.chromium.org/6728017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79951 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/test/data/enterprise/chrome-add.regbin5166 -> 5628 bytes
-rw-r--r--chrome/test/functional/enterprise.py36
2 files changed, 36 insertions, 0 deletions
diff --git a/chrome/test/data/enterprise/chrome-add.reg b/chrome/test/data/enterprise/chrome-add.reg
index 4416148..6cd617e 100644
--- a/chrome/test/data/enterprise/chrome-add.reg
+++ b/chrome/test/data/enterprise/chrome-add.reg
Binary files differ
diff --git a/chrome/test/functional/enterprise.py b/chrome/test/functional/enterprise.py
index 4573e24..9cc0707 100644
--- a/chrome/test/functional/enterprise.py
+++ b/chrome/test/functional/enterprise.py
@@ -117,6 +117,12 @@ class EnterpriseTest(pyauto.PyUITest):
return
self._CheckIfPrefCanBeModified(pyauto.kShowHomeButton, True, False)
+ def testInstant(self):
+ """Verify that Instant option cannot be modified."""
+ if self.GetBrowserInfo()['properties']['branding'] != 'Google Chrome':
+ return
+ self._CheckIfPrefCanBeModified(pyauto.kInstantEnabled, True, False)
+
# Tests for options in Personal Stuff
def testPasswordManager(self):
"""Verify that password manager preference cannot be modified."""
@@ -142,7 +148,30 @@ class EnterpriseTest(pyauto.PyUITest):
logging.info('Checking pref %s', key)
self._CheckIfPrefCanBeModified(key, defaultval, newval)
+ def testClearSiteDataOnExit(self):
+ """Verify that clear data on exit preference cannot be modified."""
+ if self.GetBrowserInfo()['properties']['branding'] != 'Google Chrome':
+ return
+ self._CheckIfPrefCanBeModified(pyauto.kClearSiteDataOnExit, True, False)
+
+ def testBlockThirdPartyCookies(self):
+ """Verify that clear data on exit preference cannot be modified."""
+ if self.GetBrowserInfo()['properties']['branding'] != 'Google Chrome':
+ return
+ self._CheckIfPrefCanBeModified(pyauto.kBlockThirdPartyCookies, True, False)
+
# Tests for general options
+ def testDisableSPDY(self):
+ """Verify that SPDY is disabled."""
+ self.NavigateToURL('chrome://net-internals/#spdy')
+ self.assertEquals(0,
+ self.FindInPage('encrypted.google.com')['match_count'])
+ self.AppendTab(pyauto.GURL('https://encrypted.google.com'))
+ self.assertEquals('Google', self.GetActiveTabTitle())
+ self.GetBrowserWindow(0).GetTab(0).Reload()
+ self.assertEquals(0,
+ self.FindInPage('encrypted.google.com', tab_index=0)['match_count'])
+
def testDisableDevTools(self):
"""Verify that we cannot launch dev tools."""
if self.GetBrowserInfo()['properties']['branding'] != 'Google Chrome':
@@ -153,6 +182,13 @@ class EnterpriseTest(pyauto.PyUITest):
self.assertEquals(1, len(self.GetBrowserInfo()['windows']),
msg='Devtools window launched.')
+ def testIncognitoEnabled(self):
+ """Verify that incognito window can be launched."""
+ if self.GetBrowserInfo()['properties']['branding'] != 'Google Chrome':
+ return
+ self.RunCommand(pyauto.IDC_NEW_INCOGNITO_WINDOW)
+ self.assertEquals(2, self.GetBrowserWindowCount())
+
def testDisableBrowsingHistory(self):
"""Verify that browsing history is not being saved."""
if self.GetBrowserInfo()['properties']['branding'] != 'Google Chrome':