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

Side by Side Diff: tools/perf/core/stacktrace_unittest.py

Issue 2581833002: Fix testCrashSymbols with PlzNavigate. (Closed)
Patch Set: try another function name Created 4 years 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 | « 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
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import tempfile 5 import tempfile
6 import os 6 import os
7 7
8 from telemetry.core import exceptions 8 from telemetry.core import exceptions
9 from telemetry import decorators 9 from telemetry import decorators
10 from telemetry.testing import tab_test_case 10 from telemetry.testing import tab_test_case
(...skipping 18 matching lines...) Expand all
29 self._tab.Navigate('chrome://crash', timeout=5) 29 self._tab.Navigate('chrome://crash', timeout=5)
30 self.assertIn('CrashIntentionally', '\n'.join(c.exception.stack_trace)) 30 self.assertIn('CrashIntentionally', '\n'.join(c.exception.stack_trace))
31 31
32 # Some platforms do not support full stack traces, this test requires only 32 # Some platforms do not support full stack traces, this test requires only
33 # minimal symbols to be available. 33 # minimal symbols to be available.
34 @decorators.Enabled('mac', 'linux', 'win') 34 @decorators.Enabled('mac', 'linux', 'win')
35 @decorators.Disabled('snowleopard') 35 @decorators.Disabled('snowleopard')
36 def testCrashMinimalSymbols(self): 36 def testCrashMinimalSymbols(self):
37 with self.assertRaises(exceptions.DevtoolsTargetCrashException) as c: 37 with self.assertRaises(exceptions.DevtoolsTargetCrashException) as c:
38 self._tab.Navigate('chrome://crash', timeout=5) 38 self._tab.Navigate('chrome://crash', timeout=5)
39 self.assertIn('OnNavigate', '\n'.join(c.exception.stack_trace)) 39 self.assertIn('PrepareRenderViewForNavigation',
40 '\n'.join(c.exception.stack_trace))
40 41
41 # The breakpad file specific test only apply to platforms which use the 42 # The breakpad file specific test only apply to platforms which use the
42 # breakpad symbol format. This also must be tested in isolation because it can 43 # breakpad symbol format. This also must be tested in isolation because it can
43 # potentially interfere with other tests symbol parsing. 44 # potentially interfere with other tests symbol parsing.
44 @decorators.Enabled('mac', 'linux') 45 @decorators.Enabled('mac', 'linux')
45 @decorators.Isolated 46 @decorators.Isolated
46 def testBadBreakpadFileIgnored(self): 47 def testBadBreakpadFileIgnored(self):
47 # pylint: disable=protected-access 48 # pylint: disable=protected-access
48 executable_path = self._browser._browser_backend._executable 49 executable_path = self._browser._browser_backend._executable
49 executable = os.path.basename(executable_path) 50 executable = os.path.basename(executable_path)
(...skipping 10 matching lines...) Expand all
60 tmp_dir = os.path.join(self._browser._browser_backend._tmp_minidump_dir) 61 tmp_dir = os.path.join(self._browser._browser_backend._tmp_minidump_dir)
61 symbol_dir = os.path.join(tmp_dir, 'symbols') 62 symbol_dir = os.path.join(tmp_dir, 'symbols')
62 self.assertTrue(os.path.isdir(symbol_dir)) 63 self.assertTrue(os.path.isdir(symbol_dir))
63 64
64 # Bad breakpad file should not be in the symbol directory 65 # Bad breakpad file should not be in the symbol directory
65 garbage_symbol_dir = os.path.join(symbol_dir, executable, garbage_hash) 66 garbage_symbol_dir = os.path.join(symbol_dir, executable, garbage_hash)
66 self.assertFalse(os.path.isdir(garbage_symbol_dir)) 67 self.assertFalse(os.path.isdir(garbage_symbol_dir))
67 68
68 # Stack trace should still work. 69 # Stack trace should still work.
69 self.assertIn('CrashIntentionally', '\n'.join(c.exception.stack_trace)) 70 self.assertIn('CrashIntentionally', '\n'.join(c.exception.stack_trace))
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