OLD | NEW |
---|---|
(Empty) | |
1 #!/usr/bin/python | |
Nirnimesh
2010/11/15 23:03:52
Rename script to pdf.py
Additional pdf-related te
| |
2 # Copyright (c) 2010 The Chromium Authors. All rights reserved. | |
3 # Use of this source code is governed by a BSD-style license that can be | |
4 # found in the LICENSE file. | |
5 | |
6 import os | |
7 import glob | |
8 | |
9 import pyauto_functional # Must be imported before pyauto | |
10 import pyauto | |
11 | |
12 | |
13 class PDFsTest(pyauto.PyUITest): | |
14 """PDF runner tests""" | |
15 | |
16 def testPDFRunner(self): | |
17 """Navigate to pdf files and verify that browser doesn't crash""" | |
Nirnimesh
2010/11/15 23:03:52
Mention that this is for Google Chrome (not Chromi
| |
18 pdf_files_path = os.path.join(self.DataDir(), 'pyauto_private', 'pdf') | |
19 pdf_files = glob.glob(os.path.join(pdf_files_path, '*.pdf')) | |
20 for pdf_file in pdf_files: | |
21 url = self.GetFileURLForPath(os.path.join(pdf_files_path, pdf_file)) | |
22 self.AppendTab(pyauto.GURL(url)) | |
23 # Assert that there is at least 1 browser window. | |
24 self.assertTrue(self.GetBrowserWindowCount(), | |
25 'Browser is crashed, no window is open') | |
Nirnimesh
2010/11/15 23:03:52
remove 'is'
| |
26 | |
27 if __name__ == '__main__': | |
28 pyauto_functional.Main() | |
OLD | NEW |