Wed, 31 Dec 2014 06:55:50 +0100
Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2
michael@0 | 1 | // -*- Mode: js2; tab-width: 2; indent-tabs-mode: nil; js2-basic-offset: 2; js2-skip-preprocessor-directives: t; -*- |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | "use strict"; |
michael@0 | 7 | |
michael@0 | 8 | gTests.push({ |
michael@0 | 9 | desc: "about flyout hides navbar, clears navbar selection, doesn't leak", |
michael@0 | 10 | run: function() { |
michael@0 | 11 | yield showNavBar(); |
michael@0 | 12 | |
michael@0 | 13 | let edit = document.getElementById("urlbar-edit"); |
michael@0 | 14 | edit.value = "http://www.wikipedia.org/"; |
michael@0 | 15 | |
michael@0 | 16 | sendElementTap(window, edit); |
michael@0 | 17 | |
michael@0 | 18 | yield waitForCondition(function () { |
michael@0 | 19 | return SelectionHelperUI.isSelectionUIVisible; |
michael@0 | 20 | }); |
michael@0 | 21 | ok(ContextUI.navbarVisible, "nav bar visible"); |
michael@0 | 22 | |
michael@0 | 23 | let promise = waitForEvent(FlyoutPanelsUI.AboutFlyoutPanel._topmostElement, "transitionend"); |
michael@0 | 24 | FlyoutPanelsUI.show('AboutFlyoutPanel'); |
michael@0 | 25 | yield promise; |
michael@0 | 26 | |
michael@0 | 27 | yield waitForCondition(function () { |
michael@0 | 28 | return !SelectionHelperUI.isSelectionUIVisible; |
michael@0 | 29 | }); |
michael@0 | 30 | ok(!ContextUI.navbarVisible, "nav bar hidden"); |
michael@0 | 31 | |
michael@0 | 32 | promise = waitForEvent(FlyoutPanelsUI.AboutFlyoutPanel._topmostElement, "transitionend"); |
michael@0 | 33 | FlyoutPanelsUI.hide('AboutFlyoutPanel'); |
michael@0 | 34 | yield promise; |
michael@0 | 35 | } |
michael@0 | 36 | }); |
michael@0 | 37 | |
michael@0 | 38 | function test() { |
michael@0 | 39 | if (!isLandscapeMode()) { |
michael@0 | 40 | todo(false, "browser_selection_tests need landscape mode to run."); |
michael@0 | 41 | return; |
michael@0 | 42 | } |
michael@0 | 43 | runTests(); |
michael@0 | 44 | } |