| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 string | 5 import string |
| 6 import sys |
| 6 import time | 7 import time |
| 7 | 8 |
| 8 from telemetry.testing import serially_executed_browser_test_case | 9 from telemetry.testing import serially_executed_browser_test_case |
| 9 | 10 |
| 10 | 11 |
| 11 _prev_test_name = None | 12 _prev_test_name = None |
| 12 | 13 |
| 13 class SimpleTest( | 14 class SimpleTest( |
| 14 serially_executed_browser_test_case.SeriallyExecutedBrowserTestCase): | 15 serially_executed_browser_test_case.SeriallyExecutedBrowserTestCase): |
| 15 | 16 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 67 |
| 67 def MultiplierTest(self, a, b, partial_sum): | 68 def MultiplierTest(self, a, b, partial_sum): |
| 68 self.assertEqual(a * b, partial_sum * self.extra) | 69 self.assertEqual(a * b, partial_sum * self.extra) |
| 69 | 70 |
| 70 def TestSimple(self): | 71 def TestSimple(self): |
| 71 time.sleep(0.5) | 72 time.sleep(0.5) |
| 72 self.assertEqual(1, self.extra) | 73 self.assertEqual(1, self.extra) |
| 73 | 74 |
| 74 def TestException(self): | 75 def TestException(self): |
| 75 raise Exception('Expected exception') | 76 raise Exception('Expected exception') |
| 77 |
| 78 |
| 79 def load_tests(loader, tests, pattern): |
| 80 del loader, tests, pattern # Unused. |
| 81 return serially_executed_browser_test_case.LoadAllTestsInModule( |
| 82 sys.modules[__name__]) |
| OLD | NEW |