|
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/. */ |
|
5 |
|
6 "use strict"; |
|
7 |
|
8 gTests.push({ |
|
9 desc: "about flyout hides navbar, clears navbar selection, doesn't leak", |
|
10 run: function() { |
|
11 yield showNavBar(); |
|
12 |
|
13 let edit = document.getElementById("urlbar-edit"); |
|
14 edit.value = "http://www.wikipedia.org/"; |
|
15 |
|
16 sendElementTap(window, edit); |
|
17 |
|
18 yield waitForCondition(function () { |
|
19 return SelectionHelperUI.isSelectionUIVisible; |
|
20 }); |
|
21 ok(ContextUI.navbarVisible, "nav bar visible"); |
|
22 |
|
23 let promise = waitForEvent(FlyoutPanelsUI.AboutFlyoutPanel._topmostElement, "transitionend"); |
|
24 FlyoutPanelsUI.show('AboutFlyoutPanel'); |
|
25 yield promise; |
|
26 |
|
27 yield waitForCondition(function () { |
|
28 return !SelectionHelperUI.isSelectionUIVisible; |
|
29 }); |
|
30 ok(!ContextUI.navbarVisible, "nav bar hidden"); |
|
31 |
|
32 promise = waitForEvent(FlyoutPanelsUI.AboutFlyoutPanel._topmostElement, "transitionend"); |
|
33 FlyoutPanelsUI.hide('AboutFlyoutPanel'); |
|
34 yield promise; |
|
35 } |
|
36 }); |
|
37 |
|
38 function test() { |
|
39 if (!isLandscapeMode()) { |
|
40 todo(false, "browser_selection_tests need landscape mode to run."); |
|
41 return; |
|
42 } |
|
43 runTests(); |
|
44 } |