aboutsummaryrefslogtreecommitdiffstats
path: root/tests/dom_tests/chrome.coffee
blob: c8ec9d29ed51dd90cf506422a0a13f57edb62d81 (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: ->
    }
    onMessage: {
      addListener: ->
    }
    sendMessage: ->
  }
}