michael@0: // -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*- michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: "use strict"; michael@0: michael@0: gTests.push({ michael@0: desc: "about flyout hides navbar, clears navbar selection, doesn't leak", michael@0: run: function() { michael@0: yield showNavBar(); michael@0: michael@0: let edit = document.getElementById("urlbar-edit"); michael@0: edit.value = "http://www.wikipedia.org/"; michael@0: michael@0: sendElementTap(window, edit); michael@0: michael@0: yield waitForCondition(function () { michael@0: return SelectionHelperUI.isSelectionUIVisible; michael@0: }); michael@0: ok(ContextUI.navbarVisible, "nav bar visible"); michael@0: michael@0: let promise = waitForEvent(FlyoutPanelsUI.AboutFlyoutPanel._topmostElement, "transitionend"); michael@0: FlyoutPanelsUI.show('AboutFlyoutPanel'); michael@0: yield promise; michael@0: michael@0: yield waitForCondition(function () { michael@0: return !SelectionHelperUI.isSelectionUIVisible; michael@0: }); michael@0: ok(!ContextUI.navbarVisible, "nav bar hidden"); michael@0: michael@0: promise = waitForEvent(FlyoutPanelsUI.AboutFlyoutPanel._topmostElement, "transitionend"); michael@0: FlyoutPanelsUI.hide('AboutFlyoutPanel'); michael@0: yield promise; michael@0: } michael@0: }); michael@0: michael@0: function test() { michael@0: if (!isLandscapeMode()) { michael@0: todo(false, "browser_selection_tests need landscape mode to run."); michael@0: return; michael@0: } michael@0: runTests(); michael@0: }