| 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 difflib | 5 import difflib |
| 6 import json | 6 import json |
| 7 import os | 7 import os |
| 8 import pprint | 8 import pprint |
| 9 | 9 |
| 10 from collections import OrderedDict | 10 from collections import OrderedDict |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 return new | 118 return new |
| 119 if old == new: | 119 if old == new: |
| 120 return None | 120 return None |
| 121 else: | 121 else: |
| 122 return list(difflib.context_diff( | 122 return list(difflib.context_diff( |
| 123 pprint.pformat(old).splitlines(), | 123 pprint.pformat(old).splitlines(), |
| 124 pprint.pformat(new).splitlines(), | 124 pprint.pformat(new).splitlines(), |
| 125 fromfile='expected', tofile='current', | 125 fromfile='expected', tofile='current', |
| 126 n=4, lineterm='' | 126 n=4, lineterm='' |
| 127 )) | 127 )) |
| OLD | NEW |