OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 unittest | 5 import unittest |
6 | 6 |
7 import request_track | 7 import request_track |
8 import test_utils | 8 import test_utils |
9 import user_satisfied_lens | 9 import user_satisfied_lens |
10 | 10 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 'LayoutObjectsThatHadNeverHadLayout': 12 | 107 'LayoutObjectsThatHadNeverHadLayout': 12 |
108 } } }, | 108 } } }, |
109 {'ts': 15 * self.MILLI_TO_MICRO, 'ph': 'I', | 109 {'ts': 15 * self.MILLI_TO_MICRO, 'ph': 'I', |
110 'cat': 'foobar', 'name': 'biz', | 110 'cat': 'foobar', 'name': 'biz', |
111 'args': {'counters': { | 111 'args': {'counters': { |
112 'LayoutObjectsThatHadNeverHadLayout': 10 | 112 'LayoutObjectsThatHadNeverHadLayout': 10 |
113 } } } ]) | 113 } } } ]) |
114 lens = user_satisfied_lens.FirstSignificantPaintLens(loading_trace) | 114 lens = user_satisfied_lens.FirstSignificantPaintLens(loading_trace) |
115 self.assertEqual(set(['0.1', '0.2']), lens.CriticalRequests()) | 115 self.assertEqual(set(['0.1', '0.2']), lens.CriticalRequests()) |
116 self.assertEqual(7, lens.PostloadTimeMsec()) | 116 self.assertEqual(7, lens.PostloadTimeMsec()) |
| 117 |
| 118 |
| 119 if __name__ == '__main__': |
| 120 unittest.main() |
OLD | NEW |