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

Side by Side Diff: tools/chrome_proxy/webdriver/decorator_smoke.py

Issue 2826733002: Add Chrome version check decorators (Closed)
Patch Set: Created 3 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
OLDNEW
1 # Copyright 2017 The Chromium Authors. All rights reserved. 1 # Copyright 2017 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 decorators import AndroidOnly 5 from decorators import AndroidOnly
6 from decorators import ChromeVersionAfterM
7 from decorators import ChromeVersionBeforeM
6 from common import ParseFlags 8 from common import ParseFlags
7 from common import IntegrationTest 9 from common import IntegrationTest
8 10
9 11
10 class DecoratorSmokeTest(IntegrationTest): 12 class DecoratorSmokeTest(IntegrationTest):
11 13
12 def AndroidOnlyFunction(self): 14 def AndroidOnlyFunction(self):
13 # This function should never be called. 15 # This function should never be called.
14 self.fail() 16 self.fail()
15 17
16 @AndroidOnly 18 @AndroidOnly
17 def testDecorator(self): 19 def testDecorator(self):
18 # This test should always result as 'skipped' or pass if --android given. 20 # This test should always result as 'skipped' or pass if --android given.
19 if not ParseFlags().android: 21 if not ParseFlags().android:
20 self.AndroidOnlyFunction() 22 self.AndroidOnlyFunction()
21 23
24 @ChromeVersionBeforeM(0)
bengr 2017/05/05 17:53:28 Hmm. Maybe call this ChromeMaximumMilestone or Chr
25 def testVersionBeforeDecorator(self):
26 self.fail('This function should not be called when the Chrome Milestone is '
27 'greater than 0')
28
29 @ChromeVersionAfterM(999999999)
30 def testVersionAfterDecorator(self):
31 self.fail('This function should not be called when the Chrome Milestone is '
32 'less than 999999999')
22 33
23 if __name__ == '__main__': 34 if __name__ == '__main__':
24 IntegrationTest.RunAllTests() 35 IntegrationTest.RunAllTests()
OLDNEW
« no previous file with comments | « no previous file | tools/chrome_proxy/webdriver/decorators.py » ('j') | tools/chrome_proxy/webdriver/decorators.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698