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

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

Issue 222873002: Remove pyauto tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/test/functional/codesign.py ('k') | chrome/test/functional/execute_javascript.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/env python
2 # Copyright (c) 2012 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
28 # Make sure Chrome minidumps are enabled on Chrome OS
29 if self.IsChromeOS():
30 minidumps_file = '/mnt/stateful_partition/etc/enable_chromium_minidumps'
31 assert os.path.exists(minidumps_file), 'Chrome minidumps are not enabled.'
32
33 breakpad_folder = properties['DIR_CRASH_DUMPS']
34 self.assertTrue(breakpad_folder, 'Cannot figure crash dir')
35
36 unused = pyauto_utils.ExistingPathReplacer(path=breakpad_folder)
37 # If the temp dir was created as root on chromeos, make sure chronos can
38 # write to it
39 if self.IsChromeOS() and os.geteuid() == 0:
40 os.chown(breakpad_folder, 1000, 1000)
41 self.NavigateToURL('about:crash') # Trigger renderer crash
42 dmp_files = glob.glob(os.path.join(breakpad_folder, '*.dmp'))
43 self.assertEqual(1, len(dmp_files))
44
45
46 if __name__ == '__main__':
47 pyauto_functional.Main()
OLDNEW
« no previous file with comments | « chrome/test/functional/codesign.py ('k') | chrome/test/functional/execute_javascript.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698