| OLD | NEW |
| 1 # Copyright (C) 2011 Google Inc. All rights reserved. | 1 # Copyright (C) 2011 Google Inc. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 def update(self, **kwargs): | 44 def update(self, **kwargs): |
| 45 self.__dict__.update(**kwargs) | 45 self.__dict__.update(**kwargs) |
| 46 return self | 46 return self |
| 47 | 47 |
| 48 def ensure_value(self, key, value): | 48 def ensure_value(self, key, value): |
| 49 if getattr(self, key, None) is None: | 49 if getattr(self, key, None) is None: |
| 50 self.__dict__[key] = value | 50 self.__dict__[key] = value |
| 51 return self.__dict__[key] | 51 return self.__dict__[key] |
| 52 | 52 |
| 53 | 53 |
| 54 # FIXME: This should be renamed MockWebKitPatch. | 54 class MockWebKitPatch(MockHost): |
| 55 class MockTool(MockHost): | |
| 56 | 55 |
| 57 def __init__(self, *args, **kwargs): | 56 def __init__(self, *args, **kwargs): |
| 58 MockHost.__init__(self, *args, **kwargs) | 57 MockHost.__init__(self, *args, **kwargs) |
| 59 | 58 |
| 60 def path(self): | 59 def path(self): |
| 61 return "echo" | 60 return "echo" |
| OLD | NEW |