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

Side by Side Diff: telemetry/examples/browser_tests/simple_numeric_test.py

Issue 2162963002: [polymer] Merge of master into polymer10-migration (Closed) Base URL: git@github.com:catapult-project/catapult.git@polymer10-migration
Patch Set: Merge polymer10-migration int polymer10-merge Created 4 years, 5 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
OLDNEW
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 time 6 import time
7 7
8 from telemetry.testing import serially_executed_browser_test_case 8 from telemetry.testing import serially_executed_browser_test_case
9 9
10 10
11 _prev_test_name = None 11 _prev_test_name = None
12 12
13 class SimpleTest(serially_executed_browser_test_case.SeriallyBrowserTestCase): 13 class SimpleTest(
14 serially_executed_browser_test_case.SeriallyExecutedBrowserTestCase):
14 15
15 @classmethod 16 @classmethod
16 def AddCommandlineArgs(cls, parser): 17 def AddCommandlineArgs(cls, parser):
17 parser.add_option('--adder-sum', type=int, default=5) 18 parser.add_option('--adder-sum', type=int, default=5)
18 19
19 def setUp(self): 20 def setUp(self):
20 self.extra = 5 21 self.extra = 5
21 22
22 @classmethod 23 @classmethod
23 def GenerateTestCases_AdderTest(cls, options): 24 def GenerateTestCases_AdderTest(cls, options):
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 66
66 def MultiplierTest(self, a, b, partial_sum): 67 def MultiplierTest(self, a, b, partial_sum):
67 self.assertEqual(a * b, partial_sum * self.extra) 68 self.assertEqual(a * b, partial_sum * self.extra)
68 69
69 def TestSimple(self): 70 def TestSimple(self):
70 time.sleep(0.5) 71 time.sleep(0.5)
71 self.assertEqual(1, self.extra) 72 self.assertEqual(1, self.extra)
72 73
73 def TestException(self): 74 def TestException(self):
74 raise Exception('Expected exception') 75 raise Exception('Expected exception')
OLDNEW
« no previous file with comments | « telemetry/examples/browser_tests/simple_browser_test.py ('k') | telemetry/examples/browser_tests/simple_sharding_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698