Index: chrome/common/extensions/docs/server2/test_urlfetch.py |
diff --git a/chrome/common/extensions/docs/server2/test_urlfetch.py b/chrome/common/extensions/docs/server2/test_urlfetch.py |
new file mode 100644 |
index 0000000000000000000000000000000000000000..6102624be9dd7134170e0f6f0e13cf6185554f63 |
--- /dev/null |
+++ b/chrome/common/extensions/docs/server2/test_urlfetch.py |
@@ -0,0 +1,16 @@ |
+# Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+# Use of this source code is governed by a BSD-style license that can be |
+# found in the LICENSE file. |
+ |
+def _ReadFile(filename): |
+ with open(filename, 'r') as f: |
+ return f.read() |
+ |
+class _MockResponse(object): |
+ def __init__(self): |
+ self.content = '' |
+ |
+def fetch(url): |
+ result = _MockResponse() |
+ result.content = _ReadFile('test_data/' + url) |
+ return result |