Commit 3c02e0fd authored by rohitbm@google.com's avatar rohitbm@google.com

Adding web pdf files to the tests

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72258 0039d316-1c4b-4281-b951-d872f2087c98
parent edaeaae9
...@@ -239,11 +239,16 @@ class FindMatchTests(pyauto.PyUITest): ...@@ -239,11 +239,16 @@ class FindMatchTests(pyauto.PyUITest):
properties = self.GetBrowserInfo()['properties'] properties = self.GetBrowserInfo()['properties']
if properties['branding'] != 'Google Chrome': if properties['branding'] != 'Google Chrome':
return return
# Search in pdf file over file://.
url = self.GetFileURLForPath(os.path.join( url = self.GetFileURLForPath(os.path.join(
self.DataDir(), 'plugin', 'Embed.pdf')) self.DataDir(), 'plugin', 'Embed.pdf'))
self.NavigateToURL(url) self.NavigateToURL(url)
search_count = self.FindInPage('adobe')['match_count'] search_count = self.FindInPage('adobe')['match_count']
self.assertEqual(8, search_count, 'Failed to find in the pdf file') self.assertEqual(8, search_count, 'Failed to find in the file:// pdf file')
# Search in pdf file over http://.
self.NavigateToURL('http://www.irs.gov/pub/irs-pdf/fw4.pdf')
search_count = self.FindInPage('Allowances')['match_count']
self.assertEqual(16, search_count, 'Failed to find in the http:// pdf file')
if __name__ == '__main__': if __name__ == '__main__':
......
...@@ -41,6 +41,9 @@ class PDFTest(pyauto.PyUITest): ...@@ -41,6 +41,9 @@ class PDFTest(pyauto.PyUITest):
old_dmp_files = glob.glob(os.path.join(breakpad_folder, '*.dmp')) old_dmp_files = glob.glob(os.path.join(breakpad_folder, '*.dmp'))
pdf_files_path = os.path.join(self.DataDir(), 'pyauto_private', 'pdf') pdf_files_path = os.path.join(self.DataDir(), 'pyauto_private', 'pdf')
pdf_files = glob.glob(os.path.join(pdf_files_path, '*.pdf')) pdf_files = glob.glob(os.path.join(pdf_files_path, '*.pdf'))
# Add a pdf file over http:// to the list of pdf files.
# crbug.com/70454
pdf_files += ['http://www.irs.gov/pub/irs-pdf/fw4.pdf']
for pdf_file in pdf_files: for pdf_file in pdf_files:
# Some pdfs cause known crashes. Exclude them. crbug.com/63549 # Some pdfs cause known crashes. Exclude them. crbug.com/63549
if os.path.basename(pdf_file) in ('nullip.pdf', 'sample.pdf'): if os.path.basename(pdf_file) in ('nullip.pdf', 'sample.pdf'):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment