Index: functional/pdf_runner.py |
=================================================================== |
--- functional/pdf_runner.py (revision 0) |
+++ functional/pdf_runner.py (revision 0) |
@@ -0,0 +1,28 @@ |
+#!/usr/bin/python |
Nirnimesh
2010/11/15 23:03:52
Rename script to pdf.py
Additional pdf-related te
|
+# Copyright (c) 2010 The Chromium Authors. All rights reserved. |
+# Use of this source code is governed by a BSD-style license that can be |
+# found in the LICENSE file. |
+ |
+import os |
+import glob |
+ |
+import pyauto_functional # Must be imported before pyauto |
+import pyauto |
+ |
+ |
+class PDFsTest(pyauto.PyUITest): |
+ """PDF runner tests""" |
+ |
+ def testPDFRunner(self): |
+ """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
|
+ pdf_files_path = os.path.join(self.DataDir(), 'pyauto_private', 'pdf') |
+ pdf_files = glob.glob(os.path.join(pdf_files_path, '*.pdf')) |
+ for pdf_file in pdf_files: |
+ url = self.GetFileURLForPath(os.path.join(pdf_files_path, pdf_file)) |
+ self.AppendTab(pyauto.GURL(url)) |
+ # Assert that there is at least 1 browser window. |
+ self.assertTrue(self.GetBrowserWindowCount(), |
+ 'Browser is crashed, no window is open') |
Nirnimesh
2010/11/15 23:03:52
remove 'is'
|
+ |
+if __name__ == '__main__': |
+ pyauto_functional.Main() |