michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: function test() { michael@0: waitForExplicitFinish(); michael@0: michael@0: showTabView(function () { michael@0: let tab = gBrowser.addTab(); michael@0: registerCleanupFunction(function () gBrowser.removeTab(tab)); michael@0: michael@0: let cw = TabView.getContentWindow(); michael@0: whenAppTabIconAdded(cw.GroupItems.groupItems[0], function() { michael@0: let body = cw.document.body; michael@0: let [appTabIcon] = cw.iQ(".appTabTray .appTabIcon"); michael@0: michael@0: EventUtils.synthesizeMouseAtCenter(appTabIcon, {type: "mousedown"}, cw); michael@0: EventUtils.synthesizeMouse(body, 500, 100, {type: "mousemove"}, cw); michael@0: EventUtils.synthesizeMouse(body, 500, 100, {type: "mouseup"}, cw); michael@0: michael@0: ok(TabView.isVisible(), "tabview is still visible"); michael@0: michael@0: hideTabView(finish); michael@0: }); michael@0: gBrowser.pinTab(tab); michael@0: }); michael@0: }