summaryrefslogtreecommitdiff
path: root/chromium/PRESUBMIT_test.py
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2018-08-24 12:15:48 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2018-08-28 13:30:04 +0000
commitb014812705fc80bff0a5c120dfcef88f349816dc (patch)
tree25a2e2d9fa285f1add86aa333389a839f81a39ae /chromium/PRESUBMIT_test.py
parent9f4560b1027ae06fdb497023cdcaf91b8511fa74 (diff)
downloadqtwebengine-chromium-b014812705fc80bff0a5c120dfcef88f349816dc.tar.gz
BASELINE: Update Chromium to 68.0.3440.125
Change-Id: I23f19369e01f688e496f5bf179abb521ad73874f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/PRESUBMIT_test.py')
-rwxr-xr-xchromium/PRESUBMIT_test.py28
1 files changed, 21 insertions, 7 deletions
diff --git a/chromium/PRESUBMIT_test.py b/chromium/PRESUBMIT_test.py
index 997625b7789..3908e4d7c6b 100755
--- a/chromium/PRESUBMIT_test.py
+++ b/chromium/PRESUBMIT_test.py
@@ -906,22 +906,23 @@ class IncludeGuardTest(unittest.TestCase):
'struct McBoatFace;',
'#endif // NotInBlink_h',
]),
- # Using a Blink style include guard in Blink is ok for now.
- MockAffectedFile('third_party/WebKit/InBlink.h', [
+ # Using a Blink style include guard in Blink is no longer ok.
+ MockAffectedFile('third_party/blink/InBlink.h', [
'#ifndef InBlink_h',
'#define InBlink_h',
'struct McBoatFace;',
'#endif // InBlink_h',
]),
# Using a bad include guard in Blink is not ok.
- MockAffectedFile('third_party/WebKit/AlsoInBlink.h', [
+ MockAffectedFile('third_party/blink/AlsoInBlink.h', [
'#ifndef WrongInBlink_h',
'#define WrongInBlink_h',
'struct McBoatFace;',
'#endif // WrongInBlink_h',
]),
- # Using a bad include guard in Blink is accepted if it's an old file.
- MockAffectedFile('third_party/WebKit/StillInBlink.h', [
+ # Using a bad include guard in Blink is not accepted even if
+ # it's an old file.
+ MockAffectedFile('third_party/blink/StillInBlink.h', [
'// New contents',
'#ifndef AcceptedInBlink_h',
'#define AcceptedInBlink_h',
@@ -934,10 +935,18 @@ class IncludeGuardTest(unittest.TestCase):
'struct McBoatFace;',
'#endif // AcceptedInBlink_h',
]),
+ # Using a non-Chromium include guard in third_party
+ # (outside blink) is accepted.
+ MockAffectedFile('third_party/foo/some_file.h', [
+ '#ifndef REQUIRED_RPCNDR_H_',
+ '#define REQUIRED_RPCNDR_H_',
+ 'struct SomeFileFoo;',
+ '#endif // REQUIRED_RPCNDR_H_',
+ ]),
]
msgs = PRESUBMIT._CheckForIncludeGuards(
mock_input_api, mock_output_api)
- expected_fail_count = 6
+ expected_fail_count = 7
self.assertEqual(expected_fail_count, len(msgs),
'Expected %d items, found %d: %s'
% (expected_fail_count, len(msgs), msgs))
@@ -965,9 +974,14 @@ class IncludeGuardTest(unittest.TestCase):
'Header using the wrong include guard name '
'NotInBlink_h')
- self.assertEqual(msgs[5].items, [ 'third_party/WebKit/AlsoInBlink.h:1' ])
+ self.assertEqual(msgs[5].items, [ 'third_party/blink/InBlink.h:1' ])
self.assertEqual(msgs[5].message,
'Header using the wrong include guard name '
+ 'InBlink_h')
+
+ self.assertEqual(msgs[6].items, [ 'third_party/blink/AlsoInBlink.h:1' ])
+ self.assertEqual(msgs[6].message,
+ 'Header using the wrong include guard name '
'WrongInBlink_h')
class AndroidDeprecatedTestAnnotationTest(unittest.TestCase):