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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 return self | 50 return self |
51 | 51 |
52 def ensure_value(self, key, value): | 52 def ensure_value(self, key, value): |
53 if getattr(self, key, None) == None: | 53 if getattr(self, key, None) == None: |
54 self.__dict__[key] = value | 54 self.__dict__[key] = value |
55 return self.__dict__[key] | 55 return self.__dict__[key] |
56 | 56 |
57 | 57 |
58 # FIXME: This should be renamed MockWebKitPatch. | 58 # FIXME: This should be renamed MockWebKitPatch. |
59 class MockTool(MockHost): | 59 class MockTool(MockHost): |
| 60 |
60 def __init__(self, *args, **kwargs): | 61 def __init__(self, *args, **kwargs): |
61 MockHost.__init__(self, *args, **kwargs) | 62 MockHost.__init__(self, *args, **kwargs) |
62 | 63 |
63 self._deprecated_port = MockPort() | 64 self._deprecated_port = MockPort() |
64 | 65 |
65 def deprecated_port(self): | 66 def deprecated_port(self): |
66 return self._deprecated_port | 67 return self._deprecated_port |
67 | 68 |
68 def path(self): | 69 def path(self): |
69 return "echo" | 70 return "echo" |
OLD | NEW |