| OLD | NEW |
| 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 common import AndroidOnly | 5 from decorators import AndroidOnly |
| 6 from common import ParseFlags | 6 from common import ParseFlags |
| 7 from common import IntegrationTest | 7 from common import IntegrationTest |
| 8 | 8 |
| 9 | 9 |
| 10 class DecoratorSmokeTest(IntegrationTest): | 10 class DecoratorSmokeTest(IntegrationTest): |
| 11 | 11 |
| 12 def AndroidOnlyFunction(self): | 12 def AndroidOnlyFunction(self): |
| 13 # This function should never be called. | 13 # This function should never be called. |
| 14 self.fail() | 14 self.fail() |
| 15 | 15 |
| 16 @AndroidOnly | 16 @AndroidOnly |
| 17 def testDecorator(self): | 17 def testDecorator(self): |
| 18 # This test should always result as 'skipped' or pass if --android given. | 18 # This test should always result as 'skipped' or pass if --android given. |
| 19 if not ParseFlags().android: | 19 if not ParseFlags().android: |
| 20 self.AndroidOnlyFunction() | 20 self.AndroidOnlyFunction() |
| 21 | 21 |
| 22 | 22 |
| 23 if __name__ == '__main__': | 23 if __name__ == '__main__': |
| 24 IntegrationTest.RunAllTests() | 24 IntegrationTest.RunAllTests() |
| OLD | NEW |