Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* Any copyright is dedicated to the Public Domain.
2 * http://creativecommons.org/publicdomain/zero/1.0/ */
4 /**
5 * Test that width and height attributes don't get set by widget code on the highlight panel.
6 */
8 "use strict";
10 let gTestTab;
11 let gContentAPI;
12 let gContentWindow;
13 let highlight = document.getElementById("UITourHighlightContainer");
14 let tooltip = document.getElementById("UITourTooltip");
16 Components.utils.import("resource:///modules/UITour.jsm");
18 function test() {
19 UITourTest();
20 }
22 let tests = [
23 function test_highlight_size_attributes(done) {
24 gContentAPI.showHighlight("appMenu");
25 waitForElementToBeVisible(highlight, function moveTheHighlight() {
26 gContentAPI.showHighlight("urlbar");
27 waitForElementToBeVisible(highlight, function checkPanelAttributes() {
28 SimpleTest.executeSoon(() => {
29 ise(highlight.height, "", "Highlight panel should have no explicit height set");
30 ise(highlight.width, "", "Highlight panel should have no explicit width set");
31 done();
32 });
33 }, "Highlight should be moved to the urlbar");
34 }, "Highlight should be shown after showHighlight() for the appMenu");
35 },
37 function test_info_size_attributes(done) {
38 gContentAPI.showInfo("appMenu", "test title", "test text");
39 waitForElementToBeVisible(tooltip, function moveTheTooltip() {
40 gContentAPI.showInfo("urlbar", "new title", "new text");
41 waitForElementToBeVisible(tooltip, function checkPanelAttributes() {
42 SimpleTest.executeSoon(() => {
43 ise(tooltip.height, "", "Info panel should have no explicit height set");
44 ise(tooltip.width, "", "Info panel should have no explicit width set");
45 done();
46 });
47 }, "Tooltip should be moved to the urlbar");
48 }, "Tooltip should be shown after showInfo() for the appMenu");
49 },
51 ];