From 9c4c79eef9267d4bde62a996f82fcb0eff66df91 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Mon, 18 Apr 2016 06:49:30 +0100 Subject: Require documentReady for all UI components. This replaces c01d7eea8675f9a7d84999777e8de72244d687b6. All UI components require the document to be ready. So, here the constructor waits for DomUtils.documentReady(). The diff looks big, but mainly it's a result of changes in indentation in the constructor and in hide(). Also, hide() now uses @postMessage() to post a null message. This forces hide to use @iframePort.use(), which ensures that hide()s cannot overtake activate()s. This continues #2100. --- tests/dom_tests/vomnibar_test.coffee | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tests') diff --git a/tests/dom_tests/vomnibar_test.coffee b/tests/dom_tests/vomnibar_test.coffee index c5974a4c..501fd5dd 100644 --- a/tests/dom_tests/vomnibar_test.coffee +++ b/tests/dom_tests/vomnibar_test.coffee @@ -20,13 +20,12 @@ context "Keep selection within bounds", completer # Shoulda.js doesn't support async tests, so we have to hack around. + stub Vomnibar.vomnibarUI, "hide", -> stub Vomnibar.vomnibarUI, "postMessage", (data) -> vomnibarFrame.UIComponentServer.handleMessage {data} stub vomnibarFrame.UIComponentServer, "postMessage", (data) -> UIComponent.handleMessage {data} - stub Vomnibar.vomnibarUI, "uiComponentIsReady", true - tearDown -> Vomnibar.vomnibarUI.hide() -- cgit v1.2.3