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

Side by Side Diff: chrome/test/functional/crash_reporter.py

Issue 3083028: PyAuto test for renderer crash reporting (Closed)
Patch Set: jrg Created 10 years, 4 months 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
« no previous file with comments | « chrome/test/functional/PYAUTO_TESTS ('k') | chrome/test/pyautolib/pyauto.py » ('j') | 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 glob
7 import os
8
9 import pyauto_functional # Must be imported before pyauto
10 import pyauto
11 import pyauto_utils
12
13
14 class CrashReporterTest(pyauto.PyUITest):
15 """TestCase for Crash Reporter."""
16
17 def testRendererCrash(self):
18 """Verify renderer's crash reporting.
19
20 Attempts to crash, and then checks that crash dumps get generated. Does
21 not actually test crash reports on the server.
22 """
23 # bail out if not a branded build
24 properties = self.GetBrowserInfo()['properties']
25 if properties['branding'] != 'Google Chrome':
26 return
27 breakpad_folder = properties['DIR_CRASH_DUMPS']
28 self.assertTrue(breakpad_folder, 'Cannot figure crash dir')
29
30 unused = pyauto_utils.ExistingPathReplacer(path=breakpad_folder)
31 self.NavigateToURL('about:crash') # Trigger renderer crash
32 dmp_files = glob.glob(os.path.join(breakpad_folder, '*.dmp'))
33 self.assertEqual(1, len(dmp_files))
34
35
36 if __name__ == '__main__':
37 pyauto_functional.Main()
38
OLDNEW
« no previous file with comments | « chrome/test/functional/PYAUTO_TESTS ('k') | chrome/test/pyautolib/pyauto.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698