Skip to content

Commit

Permalink
Two Testcases on verifying the content of pages.
Browse files Browse the repository at this point in the history
TEST=None
Bug=None

1. Verify content on https page - https://www.google.com. Verify in regular,
incognito window

2. Verify that chrome works with some top websites. Browse a list of urls, each
time verify some key strings. This test will verify that chrome is not getting
blocked by user-agent test by those websites.

Review URL: http://codereview.chromium.org/5726001

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@68886 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
nirnimesh@chromium.org committed Dec 10, 2010
1 parent 183cf7b commit 910a33b
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions chrome/test/functional/content.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,29 @@ def testAboutVersion(self):
['User Agent', 'Command Line'],
['odmomfodfm disfnodugdzuoufgbn ifdnf fif'])

def testHttpsPage(self):
"""Test content in https://www.google.com"""
url = 'https://www.google.com'
self.NavigateToURL(url)
html_regular = self.GetTabContents()
self.assertTrue('Google Search' in html_regular)
self.assertTrue('I'm Feeling Lucky' in html_regular)
self.RunCommand(pyauto.IDC_NEW_INCOGNITO_WINDOW)
self.NavigateToURL(url, 1, 0)
html_incognito = self.GetTabContents(0, 1)
self.assertTrue('Google Search' in html_incognito)
self.assertTrue('I'm Feeling Lucky' in html_incognito)

def testTopSitesContent(self):
"""Test content in TopSites and Verify chrome is not getting blocked by
user-agent test by those websites."""
topsites_file = os.path.join(self.DataDir(), 'content', 'topsites_content')
topsites = self.EvalDataFrom(topsites_file)
for (url, name) in topsites.iteritems():
self.NavigateToURL(url)
html = self.GetTabContents()
self.assertTrue(name in html)


if __name__ == '__main__':
pyauto_functional.Main()

0 comments on commit 910a33b

Please sign in to comment.