aboutsummaryrefslogtreecommitdiffstats
path: root/tests/dom_tests/chrome.coffee
diff options
context:
space:
mode:
Diffstat (limited to 'tests/dom_tests/chrome.coffee')
-rw-r--r--tests/dom_tests/chrome.coffee20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/dom_tests/chrome.coffee b/tests/dom_tests/chrome.coffee
new file mode 100644
index 00000000..ff7a53d0
--- /dev/null
+++ b/tests/dom_tests/chrome.coffee
@@ -0,0 +1,20 @@
+#
+# Mock the Chrome extension API.
+#
+
+root = exports ? window
+
+root.chrome = {
+ extension: {
+ connect: -> {
+ onMessage: {
+ addListener: ->
+ }
+ postMessage: ->
+ }
+ onRequest: {
+ addListener: ->
+ }
+ sendRequest: ->
+ }
+}