diff options
author | Matt A. Tobin <email@mattatobin.com> | 2018-02-03 06:00:38 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2018-02-03 06:00:38 -0500 |
commit | 8148615da179fdd60f19018e13b4e94b95609cc6 (patch) | |
tree | 771fccdd99fa3adf35fdd2c81d8197b415a89b91 /browser/components/syncedtabs/test/xpcshell/test_EventEmitter.js | |
parent | 494802c1be7888025b95260d23db187467d2b9dd (diff) | |
download | UXP-8148615da179fdd60f19018e13b4e94b95609cc6.tar UXP-8148615da179fdd60f19018e13b4e94b95609cc6.tar.gz UXP-8148615da179fdd60f19018e13b4e94b95609cc6.tar.lz UXP-8148615da179fdd60f19018e13b4e94b95609cc6.tar.xz UXP-8148615da179fdd60f19018e13b4e94b95609cc6.zip |
Remove browser tests - Part 1: The Tests (except for experiments)
Diffstat (limited to 'browser/components/syncedtabs/test/xpcshell/test_EventEmitter.js')
-rw-r--r-- | browser/components/syncedtabs/test/xpcshell/test_EventEmitter.js | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/browser/components/syncedtabs/test/xpcshell/test_EventEmitter.js b/browser/components/syncedtabs/test/xpcshell/test_EventEmitter.js deleted file mode 100644 index bc73ac621..000000000 --- a/browser/components/syncedtabs/test/xpcshell/test_EventEmitter.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; - -let { EventEmitter } = Cu.import("resource:///modules/syncedtabs/EventEmitter.jsm", {}); - -add_task(function* testSingleListener() { - let eventEmitter = new EventEmitter(); - let spy = sinon.spy(); - - eventEmitter.on("click", spy); - eventEmitter.emit("click", "foo", "bar"); - Assert.ok(spy.calledOnce); - Assert.ok(spy.calledWith("foo", "bar")); - - eventEmitter.off("click", spy); - eventEmitter.emit("click"); - Assert.ok(spy.calledOnce); -}); - -add_task(function* testMultipleListeners() { - let eventEmitter = new EventEmitter(); - let spy1 = sinon.spy(); - let spy2 = sinon.spy(); - - eventEmitter.on("some_event", spy1); - eventEmitter.on("some_event", spy2); - eventEmitter.emit("some_event"); - Assert.ok(spy1.calledOnce); - Assert.ok(spy2.calledOnce); - - eventEmitter.off("some_event", spy1); - eventEmitter.emit("some_event"); - Assert.ok(spy1.calledOnce); - Assert.ok(spy2.calledTwice); -}); - |