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

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

Issue 546133003: Reformat webkitpy.layout_tests w/ format-webkitpy. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
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 (
10 re.search('"repaintRects": \[$', text, re.MULTILINE) != None or 10 re.search('"repaintRects": \[$', text, re.MULTILINE) is not None or
11 text.find('Minimum repaint:') != -1) 11 text.find('Minimum repaint:') != -1)
12 12
13 13
14 def extract_layer_tree(input_str): 14 def extract_layer_tree(input_str):
15 if not isinstance(input_str, str): 15 if not isinstance(input_str, str):
16 return '{}' 16 return '{}'
17 17
18 if input_str[0:2] == '{\n': 18 if input_str[0:2] == '{\n':
19 start = 0 19 start = 0
20 else: 20 else:
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 setInterval(flip, 3000); 200 setInterval(flip, 3000);
201 </script> 201 </script>
202 </body> 202 </body>
203 </html> 203 </html>
204 """ % { 204 """ % {
205 'title': test_name, 205 'title': test_name,
206 'expected': expected_layer_tree, 206 'expected': expected_layer_tree,
207 'actual': actual_layer_tree, 207 'actual': actual_layer_tree,
208 'minimum_repaint': minimum_repaint, 208 'minimum_repaint': minimum_repaint,
209 } 209 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698