OLD | NEW |
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 from telemetry.core import exceptions | 5 from telemetry.core import exceptions |
6 from telemetry import decorators | 6 from telemetry import decorators |
7 from telemetry.testing import tab_test_case | 7 from telemetry.testing import tab_test_case |
8 | 8 |
9 | 9 |
10 class TabStackTraceTest(tab_test_case.TabTestCase): | 10 class TabStackTraceTest(tab_test_case.TabTestCase): |
11 | 11 |
12 # TODO(dyen): For now this doesn't work on Android but continue to | 12 # TODO(dyen): For now this doesn't work on Android but continue to |
13 # expand this. | 13 # expand this. |
14 # TODO(kbr): this test doesn't work on the Windows Swarming bots | 14 # TODO(kbr): currently failing on Windows because the symbolized |
15 # yet. http://crbug.com/561763 | 15 # stack trace format is unexpected. http://crbug.com/561763 |
16 @decorators.Enabled('mac', 'linux') | 16 @decorators.Enabled('mac', 'linux') |
17 # Stack traces do not currently work on 10.6, but they are also being | 17 # Stack traces do not currently work on 10.6, but they are also being |
18 # disabled shortly so just disable it for now. | 18 # disabled shortly so just disable it for now. |
19 @decorators.Disabled('snowleopard') | 19 @decorators.Disabled('snowleopard') |
20 def testStackTrace(self): | 20 def testStackTrace(self): |
21 try: | 21 try: |
22 self._tab.Navigate('chrome://crash', timeout=5) | 22 self._tab.Navigate('chrome://crash', timeout=5) |
23 except exceptions.DevtoolsTargetCrashException as e: | 23 except exceptions.DevtoolsTargetCrashException as e: |
24 self.assertIn('Thread 0 (crashed)', '\n'.join(e.stack_trace)) | 24 self.assertIn('Thread 0 (crashed)', '\n'.join(e.stack_trace)) |
25 | 25 |
26 # Stack traces aren't working on Android yet. | 26 # Stack traces aren't working on Android yet. |
27 # TODO(kbr): this test doesn't work on the Windows Swarming bots | 27 @decorators.Enabled('mac', 'linux', 'win') |
28 # yet. http://crbug.com/561763 | |
29 @decorators.Enabled('mac', 'linux') | |
30 @decorators.Disabled('snowleopard') | 28 @decorators.Disabled('snowleopard') |
31 def testCrashSymbols(self): | 29 def testCrashSymbols(self): |
32 try: | 30 try: |
33 self._tab.Navigate('chrome://crash', timeout=5) | 31 self._tab.Navigate('chrome://crash', timeout=5) |
34 except exceptions.DevtoolsTargetCrashException as e: | 32 except exceptions.DevtoolsTargetCrashException as e: |
35 self.assertIn('CrashIntentionally', '\n'.join(e.stack_trace)) | 33 self.assertIn('CrashIntentionally', '\n'.join(e.stack_trace)) |
OLD | NEW |