OLD | NEW |
---|---|
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 Loading... | |
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 } |
OLD | NEW |