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