Commit 324dd225 authored by Igor Makarov's avatar Igor Makarov Committed by Commit Bot

Reformat python code in third_party/blink/tools/blinkpy/presubmit for PEP8

- added .style.yapf file
- reformat *.py files

Bug: 1051750
Change-Id: Id46a74411f7053437297e6857530aaa5f351efca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2135687Reviewed-by: default avatarKent Tamura <tkent@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#758446}
parent 378b7b0f
......@@ -31,19 +31,42 @@ class TestAuditNonBlinkUsageTest(unittest.TestCase):
for entry in audit_non_blink_usage._COMPILED_CONFIG:
if entry['paths'] == ['third_party/blink/renderer/']:
check_list = [
{'type': 'url::mojom::Origin', 'allowed': False},
{'type': '::media::mojom::InterfaceFactory', 'allowed': False},
{'type': 'Hogenetwork::mojom::URLLoaderFactory', 'allowed': False},
{'type': 'url::mojom::blink::Origin', 'allowed': True},
{'type': '::media::mojom::blink::InterfaceFactory', 'allowed': True},
{'type': 'network::mojom::URLLoaderFactory', 'allowed': True},
{'type': '::network::mojom::URLLoaderFactory', 'allowed': True},
{
'type': 'url::mojom::Origin',
'allowed': False
},
{
'type': '::media::mojom::InterfaceFactory',
'allowed': False
},
{
'type': 'Hogenetwork::mojom::URLLoaderFactory',
'allowed': False
},
{
'type': 'url::mojom::blink::Origin',
'allowed': True
},
{
'type': '::media::mojom::blink::InterfaceFactory',
'allowed': True
},
{
'type': 'network::mojom::URLLoaderFactory',
'allowed': True
},
{
'type': '::network::mojom::URLLoaderFactory',
'allowed': True
},
]
for item in check_list:
if item['allowed']:
self.assertIsNone(re.match(entry['disallowed'], item['type']))
self.assertIsNone(
re.match(entry['disallowed'], item['type']))
elif not item['allowed']:
self.assertIsNotNone(re.match(entry['disallowed'], item['type']))
self.assertIsNotNone(
re.match(entry['disallowed'], item['type']))
if __name__ == '__main__':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment