Remove EWK_BRINGUPS for M120 #3
[platform/framework/web/chromium-efl.git] / chrome / PRESUBMIT_test.py
1 #!/usr/bin/env python3
2 # Copyright 2017 The Chromium Authors
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 import os
7 import sys
8 import unittest
9
10 import PRESUBMIT
11
12 sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
13 from PRESUBMIT_test_mocks import MockFile, MockInputApi
14
15 class DisallowedBuildFlagsTest(unittest.TestCase):
16   def testChromeDoesNotUseISAPPLE(self):
17     lines = ['#if BUILDFLAG(IS_APPLE)',
18              '#error IS_APPLE not allowed',
19              '#endif']
20     errors = PRESUBMIT._CheckNoIsAppleBuildFlagsInChromeFile(
21         MockInputApi(), MockFile('chrome/path/foo_platform.cc', lines))
22     self.assertEqual(1, len(errors))
23     self.assertEqual('    chrome/path/foo_platform.cc:1', errors[0])
24
25   def testChromeDoesNotUseISIOS(self):
26     lines = ['#if BUILDFLAG(IS_IOS)',
27              '#error IS_IOS not allowed',
28              '#endif']
29     errors = PRESUBMIT._CheckNoIsIOSBuildFlagsInChromeFile(
30         MockInputApi(), MockFile('chrome/path/foo_platform.cc', lines))
31     self.assertEqual(1, len(errors))
32     self.assertEqual('    chrome/path/foo_platform.cc:1', errors[0])
33
34 if __name__ == '__main__':
35   unittest.main()