michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: /** michael@0: * Test that width and height attributes don't get set by widget code on the highlight panel. michael@0: */ michael@0: michael@0: "use strict"; michael@0: michael@0: let gTestTab; michael@0: let gContentAPI; michael@0: let gContentWindow; michael@0: let highlight = document.getElementById("UITourHighlightContainer"); michael@0: let tooltip = document.getElementById("UITourTooltip"); michael@0: michael@0: Components.utils.import("resource:///modules/UITour.jsm"); michael@0: michael@0: function test() { michael@0: UITourTest(); michael@0: } michael@0: michael@0: let tests = [ michael@0: function test_highlight_size_attributes(done) { michael@0: gContentAPI.showHighlight("appMenu"); michael@0: waitForElementToBeVisible(highlight, function moveTheHighlight() { michael@0: gContentAPI.showHighlight("urlbar"); michael@0: waitForElementToBeVisible(highlight, function checkPanelAttributes() { michael@0: SimpleTest.executeSoon(() => { michael@0: ise(highlight.height, "", "Highlight panel should have no explicit height set"); michael@0: ise(highlight.width, "", "Highlight panel should have no explicit width set"); michael@0: done(); michael@0: }); michael@0: }, "Highlight should be moved to the urlbar"); michael@0: }, "Highlight should be shown after showHighlight() for the appMenu"); michael@0: }, michael@0: michael@0: function test_info_size_attributes(done) { michael@0: gContentAPI.showInfo("appMenu", "test title", "test text"); michael@0: waitForElementToBeVisible(tooltip, function moveTheTooltip() { michael@0: gContentAPI.showInfo("urlbar", "new title", "new text"); michael@0: waitForElementToBeVisible(tooltip, function checkPanelAttributes() { michael@0: SimpleTest.executeSoon(() => { michael@0: ise(tooltip.height, "", "Info panel should have no explicit height set"); michael@0: ise(tooltip.width, "", "Info panel should have no explicit width set"); michael@0: done(); michael@0: }); michael@0: }, "Tooltip should be moved to the urlbar"); michael@0: }, "Tooltip should be shown after showInfo() for the appMenu"); michael@0: }, michael@0: michael@0: ];