Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Side by Side Diff: functional/pdf.py

Issue 4967003: PDF Runner test (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome/test/
Patch Set: '' Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/python
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 related tests
15
16 This test runs only on Google Chrome build, not on Chromium.
17 """
18
19 def testPDFRunner(self):
20 """Navigate to pdf files and verify that browser doesn't crash"""
21 # bail out if not a branded build
22 properties = self.GetBrowserInfo()['properties']
23 if properties['branding'] != 'Google Chrome':
24 return
25 pdf_files_path = os.path.join(self.DataDir(), 'pyauto_private', 'pdf')
26 pdf_files = glob.glob(os.path.join(pdf_files_path, '*.pdf'))
27 for pdf_file in pdf_files:
28 url = self.GetFileURLForPath(os.path.join(pdf_files_path, pdf_file))
29 self.AppendTab(pyauto.GURL(url))
30 # Assert that there is at least 1 browser window.
31 self.assertTrue(self.GetBrowserWindowCount(),
32 'Browser crashed, no window is open')
33
34 if __name__ == '__main__':
35 pyauto_functional.Main()
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698