aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit_tests/handler_stack_test.coffee
diff options
context:
space:
mode:
authorStephen Blott2016-03-31 10:23:23 +0100
committerStephen Blott2016-03-31 10:23:23 +0100
commitcaac7b924af6570c7f3ec3a2f555ba9a45b31813 (patch)
treeb77b5df67336cf01749b3b47771fa70d29050d90 /tests/unit_tests/handler_stack_test.coffee
parenta2fba970e089254adae2631a5b154e6bd92ec1e2 (diff)
parentdd04abbfed292d7c73f7c29176dd611107da6805 (diff)
downloadvimium-caac7b924af6570c7f3ec3a2f555ba9a45b31813.tar.bz2
Merge pull request #2079 from smblott-github/rename-handlerStack-constants-v3
Rename handler stack constants, and rework logic for greater clarity
Diffstat (limited to 'tests/unit_tests/handler_stack_test.coffee')
-rw-r--r--tests/unit_tests/handler_stack_test.coffee9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/unit_tests/handler_stack_test.coffee b/tests/unit_tests/handler_stack_test.coffee
index 629fc3ed..7b62af07 100644
--- a/tests/unit_tests/handler_stack_test.coffee
+++ b/tests/unit_tests/handler_stack_test.coffee
@@ -5,6 +5,7 @@ context "handlerStack",
setup ->
stub global, "DomUtils", {}
stub DomUtils, "suppressEvent", ->
+ stub DomUtils, "suppressPropagation", ->
@handlerStack = new HandlerStack
@handler1Called = false
@handler2Called = false
@@ -23,16 +24,16 @@ context "handlerStack",
assert.isTrue @handler2Called
assert.isFalse @handler1Called
- should "terminate bubbling on stopBubblingAndTrue, and be true", ->
+ should "terminate bubbling on passEventToPage, and be true", ->
@handlerStack.push { keydown: => @handler1Called = true }
- @handlerStack.push { keydown: => @handler2Called = true; @handlerStack.stopBubblingAndTrue }
+ @handlerStack.push { keydown: => @handler2Called = true; @handlerStack.passEventToPage }
assert.isTrue @handlerStack.bubbleEvent 'keydown', {}
assert.isTrue @handler2Called
assert.isFalse @handler1Called
- should "terminate bubbling on stopBubblingAndTrue, and be false", ->
+ should "terminate bubbling on passEventToPage, and be false", ->
@handlerStack.push { keydown: => @handler1Called = true }
- @handlerStack.push { keydown: => @handler2Called = true; @handlerStack.stopBubblingAndFalse }
+ @handlerStack.push { keydown: => @handler2Called = true; @handlerStack.suppressPropagation }
assert.isFalse @handlerStack.bubbleEvent 'keydown', {}
assert.isTrue @handler2Called
assert.isFalse @handler1Called