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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/controllers/repaint_overlay.py

Issue 1783073002: Run auto-formatter on files in webkitpy/layout_tests/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ran yapf -i --style '{based_on_style: pep8, column_limit: 132}' then did manual fix-up Created 4 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 import re 5 import re
6 6
7 7
8 def result_contains_repaint_rects(text): 8 def result_contains_repaint_rects(text):
9 return isinstance(text, str) and ( 9 return isinstance(text, str) and (re.search('"repaintRects": \[$', text, re. MULTILINE) is not None or
qyearsley 2016/03/18 00:33:39 `!= None -> is not None` wasn't done by yapf; this
10 re.search('"repaintRects": \[$', text, re.MULTILINE) != None or 10 text.find('Minimum repaint:') != -1)
11 text.find('Minimum repaint:') != -1)
12 11
13 12
14 def extract_layer_tree(input_str): 13 def extract_layer_tree(input_str):
15 if not isinstance(input_str, str): 14 if not isinstance(input_str, str):
16 return '{}' 15 return '{}'
17 16
18 if input_str[0:2] == '{\n': 17 if input_str[0:2] == '{\n':
19 start = 0 18 start = 0
20 else: 19 else:
21 start = input_str.find('\n{\n') 20 start = input_str.find('\n{\n')
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 setInterval(flip, 3000); 199 setInterval(flip, 3000);
201 </script> 200 </script>
202 </body> 201 </body>
203 </html> 202 </html>
204 """ % { 203 """ % {
205 'title': test_name, 204 'title': test_name,
206 'expected': expected_layer_tree, 205 'expected': expected_layer_tree,
207 'actual': actual_layer_tree, 206 'actual': actual_layer_tree,
208 'minimum_repaint': minimum_repaint, 207 'minimum_repaint': minimum_repaint,
209 } 208 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698