summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorrohitbm@google.com <rohitbm@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-22 02:11:37 +0000
committerrohitbm@google.com <rohitbm@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-22 02:11:37 +0000
commit3c02e0fded48d0782f4802c83fb0b3ed4b9ad06d (patch)
treeb2d19716278839f08a9bcfb250b048f4305f084a /chrome
parentedaeaae93378170a90e5c67dd6954791860d61a7 (diff)
downloadchromium_src-3c02e0fded48d0782f4802c83fb0b3ed4b9ad06d.zip
chromium_src-3c02e0fded48d0782f4802c83fb0b3ed4b9ad06d.tar.gz
chromium_src-3c02e0fded48d0782f4802c83fb0b3ed4b9ad06d.tar.bz2
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
Diffstat (limited to 'chrome')
-rw-r--r--chrome/test/functional/find_in_page.py7
-rw-r--r--chrome/test/functional/pdf.py3
2 files changed, 9 insertions, 1 deletions
diff --git a/chrome/test/functional/find_in_page.py b/chrome/test/functional/find_in_page.py
index fac39f1..22dae7f 100644
--- a/chrome/test/functional/find_in_page.py
+++ b/chrome/test/functional/find_in_page.py
@@ -239,11 +239,16 @@ class FindMatchTests(pyauto.PyUITest):
properties = self.GetBrowserInfo()['properties']
if properties['branding'] != 'Google Chrome':
return
+ # Search in pdf file over file://.
url = self.GetFileURLForPath(os.path.join(
self.DataDir(), 'plugin', 'Embed.pdf'))
self.NavigateToURL(url)
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__':
diff --git a/chrome/test/functional/pdf.py b/chrome/test/functional/pdf.py
index f30e719..e806080 100644
--- a/chrome/test/functional/pdf.py
+++ b/chrome/test/functional/pdf.py
@@ -41,6 +41,9 @@ class PDFTest(pyauto.PyUITest):
old_dmp_files = glob.glob(os.path.join(breakpad_folder, '*.dmp'))
pdf_files_path = os.path.join(self.DataDir(), 'pyauto_private', '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:
# Some pdfs cause known crashes. Exclude them. crbug.com/63549
if os.path.basename(pdf_file) in ('nullip.pdf', 'sample.pdf'):