OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 import codecs | 6 import codecs |
7 import os | 7 import os |
8 import unittest | 8 import unittest |
9 | 9 |
10 import pyauto_functional | 10 import pyauto_functional |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 def testSearchInPDF(self): | 231 def testSearchInPDF(self): |
232 """Verify that we can find in a pdf file. | 232 """Verify that we can find in a pdf file. |
233 | 233 |
234 Only for Google Chrome builds (Chromium builds do not have internal pdf). | 234 Only for Google Chrome builds (Chromium builds do not have internal pdf). |
235 """ | 235 """ |
236 # bail out if not a branded build | 236 # bail out if not a branded build |
237 properties = self.GetBrowserInfo()['properties'] | 237 properties = self.GetBrowserInfo()['properties'] |
238 if properties['branding'] != 'Google Chrome': | 238 if properties['branding'] != 'Google Chrome': |
239 return | 239 return |
240 # Search in pdf file over file://. | 240 # Search in pdf file over file://. |
241 file_url = self.GetFileURLForDataPath('plugin', 'Embed.pdf') | 241 file_url = self.GetFileURLForContentDataPath('plugin', 'Embed.pdf') |
242 self._VerifySearchInPDFURL(file_url, 'adobe', 8) | 242 self._VerifySearchInPDFURL(file_url, 'adobe', 8) |
243 | 243 |
244 # Search in pdf file over http://. | 244 # Search in pdf file over http://. |
245 http_url = 'http://www.irs.gov/pub/irs-pdf/fw4.pdf' | 245 http_url = 'http://www.irs.gov/pub/irs-pdf/fw4.pdf' |
246 self._VerifySearchInPDFURL(http_url, 'Allowances', 16) | 246 self._VerifySearchInPDFURL(http_url, 'Allowances', 16) |
247 | 247 |
248 if __name__ == '__main__': | 248 if __name__ == '__main__': |
249 pyauto_functional.Main() | 249 pyauto_functional.Main() |
OLD | NEW |