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