aboutsummaryrefslogtreecommitdiffstats
path: root/tests/dom_tests/chrome.coffee
blob: ff7a53d0529a8ce17382bbc18b4c0b53dc21d2b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#
# Mock the Chrome extension API.
#

root = exports ? window

root.chrome = {
  extension: {
    connect: -> {
      onMessage: {
        addListener: ->
      }
      postMessage: ->
    }
    onRequest: {
      addListener: ->
    }
    sendRequest: ->
  }
}