Bug 574688 - replace the status bar with the addon bar (r=mano, a=blocking-beta7)

This commit is contained in:
Dietrich Ayala 2010-09-16 13:09:27 +07:00
Родитель d6e8363cef
Коммит d321b44ff8
34 изменённых файлов: 165 добавлений и 551 удалений

Просмотреть файл

@ -415,15 +415,12 @@ pref("general.warnOnAboutConfig", false);
pref("dom.max_script_run_time", 20);
#endif
// Make the status bar reliably present and unaffected by pages
pref("dom.disable_window_open_feature.status", true);
// This is the pref to control the location bar, change this to true to
// force this instead of or in addition to the status bar - this makes
// the origin of popup windows more obvious to avoid spoofing. We would
// rather not do it by default because it affects UE for web applications, but
// without it there isn't a really good way to prevent chrome spoofing, see bug 337344
// force this - this makes the origin of popup windows more obvious to avoid
// spoofing. We would rather not do it by default because it affects UE for web
// applications, but without it there isn't a really good way to prevent chrome
// spoofing, see bug 337344
pref("dom.disable_window_open_feature.location", true);
pref("dom.disable_window_status_change", true);
// allow JS to move and resize existing windows
pref("dom.disable_window_move_resize", false);
// prevent JS from monkeying with window focus, etc
@ -996,8 +993,6 @@ pref("services.sync.prefs.sync.browser.urlbar.maxRichResults", true);
pref("services.sync.prefs.sync.dom.disable_open_during_load", true);
pref("services.sync.prefs.sync.dom.disable_window_flip", true);
pref("services.sync.prefs.sync.dom.disable_window_move_resize", true);
pref("services.sync.prefs.sync.dom.disable_window_open_feature.status", true);
pref("services.sync.prefs.sync.dom.disable_window_status_change", true);
pref("services.sync.prefs.sync.dom.event.contextmenu.enabled", true);
pref("services.sync.prefs.sync.extensions.personas.current", true);
pref("services.sync.prefs.sync.extensions.update.enabled", true);

Просмотреть файл

@ -229,16 +229,6 @@
command="cmd_CustomizeToolbars"/>
</menupopup>
</menu>
<menuitem id="toggle_taskbar"
label="&taskbarCmd.label;"
accesskey="&taskbarCmd.accesskey;"
type="checkbox"
command="cmd_toggleTaskbar"
#ifndef WINCE
checked="true" />
#else
checked="false" />
#endif
<menu id="viewSidebarMenuMenu"
label="&viewSidebarMenu.label;"
accesskey="&viewSidebarMenu.accesskey;">

Просмотреть файл

@ -635,8 +635,9 @@ HistoryMenu.prototype = {
m.setAttribute("value", i);
m.setAttribute("oncommand", "undoCloseTab(" + i + ");");
// Set the targetURI attribute so it will be shown in tooltip and statusbar.
// SessionStore uses one-based indexes, so we need to normalize them.
// Set the targetURI attribute so it will be shown in tooltip and trigger
// onLinkHovered. SessionStore uses one-based indexes, so we need to
// normalize them.
let tabData = undoItems[i].state;
let activeIndex = (tabData.index || tabData.entries.length) - 1;
if (activeIndex >= 0 && tabData.entries[activeIndex])
@ -716,7 +717,7 @@ HistoryMenu.prototype = {
m.setAttribute("class", "menuitem-iconic bookmark-item menuitem-with-favicon");
m.setAttribute("oncommand", "undoCloseWindow(" + i + ");");
// Set the targetURI attribute so it will be shown in tooltip and statusbar.
// Set the targetURI attribute so it will be shown in tooltip.
// SessionStore uses one-based indexes, so we need to normalize them.
let activeIndex = (selectedTab.index || selectedTab.entries.length) - 1;
if (activeIndex >= 0 && selectedTab.entries[activeIndex])
@ -1164,9 +1165,7 @@ let BookmarksMenuButton = {
// First popupshowing event, initialize immutable attributes.
this._popupInitialized = true;
// Update View bookmarks toolbar checkbox menuitem.
viewToolbar.setAttribute("toolbarindex",
Array.indexOf(gNavToolbox.childNodes,
this.personalToolbar));
viewToolbar.setAttribute("toolbarId", this.personalToolbar.id);
// Need to set the label on Unsorted Bookmarks menu.
let unsortedBookmarksElt =

Просмотреть файл

@ -69,7 +69,6 @@
<command id="cmd_printPreview" oncommand="PrintUtils.printPreview(PrintPreviewListener);"/>
<command id="cmd_close" oncommand="BrowserCloseTabOrWindow()"/>
<command id="cmd_closeWindow" oncommand="BrowserTryToCloseWindow()"/>
<command id="cmd_toggleTaskbar" oncommand="goToggleToolbar('status-bar','toggle_taskbar');"/>
<command id="cmd_ToggleTabsOnTop" oncommand="TabsOnTop.toggle()"/>
<command id="cmd_CustomizeToolbars" oncommand="BrowserCustomizeToolbar()"/>
<command id="cmd_quitApplication" oncommand="goQuitApplication()"/>

Просмотреть файл

@ -140,7 +140,7 @@ let gSyncUI = {
// Fake the tab object on the menu entries, so that we don't have to worry
// about removing them ourselves. They will just get cleaned up by popup
// binding. This also makes sure the statusbar updates with the URL.
// binding.
menuitem.tab = { "linkedBrowser": { "currentURI": { "spec": label } } };
sep.tab = { "linkedBrowser": { "currentURI": { "spec": " " } } };

Просмотреть файл

@ -317,22 +317,10 @@ window[chromehidden~="toolbar"] toolbar:not(.toolbar-primary):not(.chromeclass-m
}
#navigator-toolbox ,
#status-bar ,
#mainPopupSet {
min-width: 1px;
}
/* Sync statusbar UI */
%ifdef MOZ_SERVICES_SYNC
#sync-notifications-box {
-moz-binding: url("chrome://browser/content/syncNotification.xml#notificationbox");
}
#sync-notifications-box notification {
-moz-binding: url("chrome://browser/content/syncNotification.xml#notification");
}
%endif
/* Identity UI */
#identity-popup-content-box.unknownIdentity > #identity-popup-connectedToLabel ,
#identity-popup-content-box.unknownIdentity > #identity-popup-runByLabel ,

Просмотреть файл

@ -373,24 +373,14 @@ function findChildShell(aDocument, aDocShell, aSoughtURI) {
}
const gPopupBlockerObserver = {
_reportButton: null,
onUpdatePageReport: function (aEvent)
{
if (aEvent.originalTarget != gBrowser.selectedBrowser)
return;
if (!this._reportButton)
this._reportButton = document.getElementById("page-report-button");
if (!gBrowser.pageReport) {
// Hide the popup blocker statusbar button
this._reportButton.hidden = true;
if (!gBrowser.pageReport)
return;
}
this._reportButton.hidden = false;
// Only show the notification again if we've not already shown it. Since
// notifications are per-browser, we don't need to worry about re-adding
@ -548,10 +538,7 @@ const gPopupBlockerObserver = {
var blockedPopupDontShowMessage = document.getElementById("blockedPopupDontShowMessage");
var showMessage = gPrefService.getBoolPref("privacy.popups.showBrowserMessage");
blockedPopupDontShowMessage.setAttribute("checked", !showMessage);
if (aEvent.target.localName == "popup")
blockedPopupDontShowMessage.setAttribute("label", gNavigatorBundle.getString("popupWarningDontShowFromMessage"));
else
blockedPopupDontShowMessage.setAttribute("label", gNavigatorBundle.getString("popupWarningDontShowFromStatusbar"));
blockedPopupDontShowMessage.setAttribute("label", gNavigatorBundle.getString("popupWarningDontShowFromMessage"));
},
showBlockedPopup: function (aEvent)
@ -598,6 +585,8 @@ const gPopupBlockerObserver = {
dontShowMessage: function ()
{
#if 0
// Disabled until bug 594294 is fixed.
var showMessage = gPrefService.getBoolPref("privacy.popups.showBrowserMessage");
var firstTime = gPrefService.getBoolPref("privacy.popups.firstTime");
@ -608,6 +597,7 @@ const gPopupBlockerObserver = {
this._displayPageReportFirstTime();
gPrefService.setBoolPref("privacy.popups.showBrowserMessage", !showMessage);
#endif
gBrowser.getNotificationBox().removeCurrentNotification();
},
@ -1536,9 +1526,6 @@ function delayedStartup(isLoadingBlank, mustLoadSidebar) {
gDownloadMgr = Cc["@mozilla.org/download-manager;1"].
getService(Ci.nsIDownloadManager);
// Initialize the downloads monitor panel listener
DownloadMonitorPanel.init();
if (Win7Features) {
let tempScope = {};
Cu.import("resource://gre/modules/DownloadTaskbarProgress.jsm",
@ -1648,7 +1635,6 @@ function BrowserShutdown()
BrowserOffline.uninit();
OfflineApps.uninit();
DownloadMonitorPanel.uninit();
gPrivateBrowsingUI.uninit();
IndexedDBPromptHelper.uninit();
@ -1681,7 +1667,7 @@ function nonBrowserWindowStartup()
// Disable inappropriate commands / submenus
var disabledItems = ['Browser:SavePage',
'Browser:SendLink', 'cmd_pageSetup', 'cmd_print', 'cmd_find', 'cmd_findAgain',
'viewToolbarsMenu', 'cmd_toggleTaskbar', 'viewSidebarMenuMenu', 'Browser:Reload',
'viewToolbarsMenu', 'viewSidebarMenuMenu', 'Browser:Reload',
'viewFullZoomMenu', 'pageStyleMenu', 'charsetMenu', 'View:PageSource', 'View:FullScreen',
'viewHistorySidebar', 'Browser:AddBookmarkAs', 'View:PageInfo', 'Tasks:InspectPage'];
var element;
@ -2797,9 +2783,9 @@ var PrintPreviewListener = {
notificationBox.notificationsHidden = true;
document.getElementById("sidebar").setAttribute("src", "about:blank");
var statusbar = document.getElementById("status-bar");
this._chromeState.statusbarOpen = !statusbar.hidden;
statusbar.hidden = true;
var addonBar = document.getElementById("addon-bar");
this._chromeState.addonBarOpen = !addonBar.collapsed;
addonBar.collapsed = true;
this._chromeState.findOpen = gFindBarInitialized && !gFindBar.hidden;
if (gFindBarInitialized)
@ -2809,8 +2795,8 @@ var PrintPreviewListener = {
if (this._chromeState.notificationsOpen)
gBrowser.getNotificationBox().notificationsHidden = false;
if (this._chromeState.statusbarOpen)
document.getElementById("status-bar").hidden = false;
if (this._chromeState.addonBarOpen)
document.getElementById("addon-bar").collapsed = false;
if (this._chromeState.findOpen)
gFindBar.open();
@ -2937,8 +2923,7 @@ var browserDragAndDrop = {
aEvent.preventDefault();
if (statusString) {
var statusTextFld = document.getElementById("statusbar-display");
statusTextFld.label = gNavigatorBundle.getString(statusString);
XULBrowserWindow.setStatusText(gNavigatorBundle.getString(statusString));
}
}
},
@ -2959,8 +2944,7 @@ var homeButtonObserver = {
},
onDragLeave: function (aEvent)
{
var statusTextFld = document.getElementById("statusbar-display");
statusTextFld.label = "";
XULWindowBrowser.setStatusText("");
}
}
@ -3003,8 +2987,7 @@ var bookmarksButtonObserver = {
onDragLeave: function (aEvent)
{
var statusTextFld = document.getElementById("statusbar-display");
statusTextFld.label = "";
XULWindowBrowser.setStatusText("");
}
}
@ -3016,8 +2999,7 @@ var newTabButtonObserver = {
onDragLeave: function (aEvent)
{
var statusTextFld = document.getElementById("statusbar-display");
statusTextFld.label = "";
XULWindowBrowser.setStatusText("");
},
onDrop: function (aEvent)
@ -3039,8 +3021,7 @@ var newWindowButtonObserver = {
},
onDragLeave: function (aEvent)
{
var statusTextFld = document.getElementById("statusbar-display");
statusTextFld.label = "";
XULWindowBrowser.setStatusText("");
},
onDrop: function (aEvent)
{
@ -3057,8 +3038,7 @@ var newWindowButtonObserver = {
var DownloadsButtonDNDObserver = {
onDragOver: function (aEvent)
{
var statusTextFld = document.getElementById("statusbar-display");
statusTextFld.label = gNavigatorBundle.getString("dropondownloadsbutton");
XULWindowBrowser.setStatusText(gNavigatorBundle.getString("dropondownloadsbutton"));
var types = aEvent.dataTransfer.types;
if (types.contains("text/x-moz-url") ||
types.contains("text/uri-list") ||
@ -3068,8 +3048,7 @@ var DownloadsButtonDNDObserver = {
onDragLeave: function (aEvent)
{
var statusTextFld = document.getElementById("statusbar-display");
statusTextFld.label = "";
XULWindowBrowser.setStatusText("");
},
onDrop: function (aEvent)
@ -3688,9 +3667,8 @@ var FullScreen = {
if (event && event.type == "fullscreen")
enterFS = !enterFS;
// show/hide all menubars, toolbars, and statusbars (except the full screen toolbar)
// show/hide all menubars, toolbars (except the full screen toolbar)
this.showXULChrome("toolbar", !enterFS);
this.showXULChrome("statusbar", !enterFS);
document.getElementById("View:FullScreen").setAttribute("checked", enterFS);
if (enterFS) {
@ -4036,14 +4014,6 @@ var XULBrowserWindow = {
delete this.reloadCommand;
return this.reloadCommand = document.getElementById("Browser:Reload");
},
get statusTextField () {
delete this.statusTextField;
return this.statusTextField = document.getElementById("statusbar-display");
},
get securityButton () {
delete this.securityButton;
return this.securityButton = document.getElementById("security-button");
},
get isImage () {
delete this.isImage;
return this.isImage = document.getElementById("isImage");
@ -4070,24 +4040,19 @@ var XULBrowserWindow = {
delete this.statusMeter;
delete this.stopCommand;
delete this.reloadCommand;
delete this.statusTextField;
delete this.securityButton;
delete this.statusText;
},
setJSStatus: function (status) {
this.jsStatus = status;
this.updateStatusField();
},
setJSDefaultStatus: function (status) {
this.jsDefaultStatus = status;
this.updateStatusField();
},
setDefaultStatus: function (status) {
this.defaultStatus = status;
this.updateStatusField();
},
setOverLink: function (link) {
@ -4098,17 +4063,6 @@ var XULBrowserWindow = {
gURLBar.setOverLink(link);
},
updateStatusField: function () {
var text = this.status || this.jsStatus || this.jsDefaultStatus || this.defaultStatus;
// check the current value so we don't trigger an attribute change
// and cause needless (slow!) UI updates
if (this.statusText != text) {
this.statusTextField.label = text;
this.statusText = text;
}
},
onLinkIconAvailable: function (aIconURL) {
if (gProxyFavIcon && gBrowser.userTypedValue === null)
PageProxySetIcon(aIconURL); // update the favicon in the URL bar
@ -4361,14 +4315,13 @@ var XULBrowserWindow = {
this.asyncUpdateUI();
},
asyncUpdateUI: function () {
asyncUpdateUI: function XWB_asyncUpdateUI() {
FeedHandler.updateFeeds();
BrowserSearch.updateSearchButton();
},
onStatusChange: function (aWebProgress, aRequest, aStatus, aMessage) {
onStatusChange: function XWB_onStatusChange(aWebProgress, aRequest, aStatus, aMessage) {
this.status = aMessage;
this.updateStatusField();
},
// Properties used to cache security state used to update the UI
@ -4376,7 +4329,7 @@ var XULBrowserWindow = {
_tooltipText: null,
_hostChanged: false, // onLocationChange will flip this bit
onSecurityChange: function (aWebProgress, aRequest, aState) {
onSecurityChange: function XWB_onSecurityChange(aWebProgress, aRequest, aState) {
// Don't need to do anything if the data we use to update the UI hasn't
// changed
if (this._state == aState &&
@ -4433,21 +4386,15 @@ var XULBrowserWindow = {
}
if (level) {
this.securityButton.setAttribute("level", level);
this.securityButton.hidden = false;
// We don't style the Location Bar based on the the 'level' attribute
// anymore, but still set it for third-party themes.
if (gURLBar)
gURLBar.setAttribute("level", level);
} else {
this.securityButton.hidden = true;
this.securityButton.removeAttribute("level");
if (gURLBar)
gURLBar.removeAttribute("level");
}
this.securityButton.setAttribute("tooltiptext", this._tooltipText);
// Don't pass in the actual location object, since it can cause us to
// hold on to the window object too long. Just pass in the fields we
// care about. (bug 424829)
@ -4466,7 +4413,7 @@ var XULBrowserWindow = {
},
// simulate all change notifications after switching tabs
onUpdateCurrentBrowser: function (aStateFlags, aStatus, aMessage, aTotalProgress) {
onUpdateCurrentBrowser: function XWB_onUpdateCurrentBrowser(aStateFlags, aStatus, aMessage, aTotalProgress) {
if (FullZoom.updateBackgroundTabs)
FullZoom.onLocationChange(gBrowser.currentURI, true);
var nsIWebProgressListener = Components.interfaces.nsIWebProgressListener;
@ -4487,7 +4434,7 @@ var XULBrowserWindow = {
this.onProgressChange(gBrowser.webProgress, 0, 0, aTotalProgress, 1);
},
startDocumentLoad: function (aRequest) {
startDocumentLoad: function XWB_startDocumentLoad(aRequest) {
// clear out feed data
gBrowser.selectedBrowser.feeds = null;
@ -4501,7 +4448,7 @@ var XULBrowserWindow = {
}
},
endDocumentLoad: function (aRequest, aStatus) {
endDocumentLoad: function XWB_endDocumentLoad(aRequest, aStatus) {
var urlStr = aRequest.QueryInterface(Ci.nsIChannel).originalURI.spec;
var notification = Components.isSuccessCode(aStatus) ? "EndDocumentLoad" : "FailDocumentLoad";
@ -4773,20 +4720,23 @@ function onViewToolbarsPopupShowing(aEvent, aInsertPoint) {
// Empty the menu
for (i = popup.childNodes.length-1; i >= 0; --i) {
var deadItem = popup.childNodes[i];
if (deadItem.hasAttribute("toolbarindex"))
if (deadItem.hasAttribute("toolbarId"))
popup.removeChild(deadItem);
}
var firstMenuItem = aInsertPoint || popup.firstChild;
for (i = 0; i < gNavToolbox.childNodes.length; ++i) {
var toolbar = gNavToolbox.childNodes[i];
let toolbarNodes = [document.getElementById("addon-bar")];
for (i = 0; i < gNavToolbox.childNodes.length; ++i)
toolbarNodes.push(gNavToolbox.childNodes[i]);
toolbarNodes.forEach(function(toolbar) {
var toolbarName = toolbar.getAttribute("toolbarname");
if (toolbarName) {
let menuItem = document.createElement("menuitem");
let hidingAttribute = toolbar.getAttribute("type") == "menubar" ?
"autohide" : "collapsed";
menuItem.setAttribute("toolbarindex", i);
menuItem.setAttribute("id", "toggle_" + toolbar.id);
menuItem.setAttribute("toolbarId", toolbar.id);
menuItem.setAttribute("type", "checkbox");
menuItem.setAttribute("label", toolbarName);
menuItem.setAttribute("checked", toolbar.getAttribute(hidingAttribute) != "true");
@ -4796,22 +4746,21 @@ function onViewToolbarsPopupShowing(aEvent, aInsertPoint) {
menuItem.addEventListener("command", onViewToolbarCommand, false);
}
toolbar = toolbar.nextSibling;
}
}, this);
}
function onViewToolbarCommand(aEvent) {
var index = aEvent.originalTarget.getAttribute("toolbarindex");
var toolbar = gNavToolbox.childNodes[index];
var visible = aEvent.originalTarget.getAttribute("checked") == "true";
setToolbarVisibility(toolbar, visible);
var toolbarId = aEvent.originalTarget.getAttribute("toolbarId");
var toolbar = document.getElementById(toolbarId);
var isVisible = aEvent.originalTarget.getAttribute("checked") == "true";
setToolbarVisibility(toolbar, isVisible);
}
function setToolbarVisibility(toolbar, visible) {
function setToolbarVisibility(toolbar, isVisible) {
var hidingAttribute = toolbar.getAttribute("type") == "menubar" ?
"autohide" : "collapsed";
toolbar.setAttribute(hidingAttribute, !visible);
toolbar.setAttribute(hidingAttribute, !isVisible);
document.persist(toolbar.id, hidingAttribute);
PlacesToolbarHelper.init();
@ -7680,10 +7629,6 @@ let gPrivateBrowsingUI = {
gBrowser.updateTitlebar();
}
setTimeout(function () {
DownloadMonitorPanel.updateStatus();
}, 0);
if (!aOnWindowOpen && this._disableUIOnToggle)
document.getElementById("Tools:PrivateBrowsing")
.setAttribute("disabled", "true");
@ -7742,10 +7687,6 @@ let gPrivateBrowsingUI = {
gLastOpenDirectory.reset();
setTimeout(function () {
DownloadMonitorPanel.updateStatus();
}, 0);
if (this._disableUIOnToggle)
document.getElementById("Tools:PrivateBrowsing")
.setAttribute("disabled", "true");

Просмотреть файл

@ -721,7 +721,7 @@
<menu class="split-menuitem-menu"
label="&preferencesCmd.label;">
<menupopup id="appmenu_customizeMenu"
onpopupshowing="onViewToolbarsPopupShowing(event, document.getElementById('appmenu_toggleStatusbar'));">
onpopupshowing="onViewToolbarsPopupShowing(event, document.getElementById('appmenu_preferences').nextSibling.nextSibling);">
<menuitem id="appmenu_preferences"
#ifdef XP_UNIX
label="&preferencesCmdUnix.label;"
@ -730,10 +730,6 @@
#endif
oncommand="openPreferences();"/>
<menuseparator/>
<menuitem id="appmenu_toggleStatusbar"
type="checkbox"
command="cmd_toggleTaskbar"
observes="toggle_taskbar"/>
<menuseparator/>
<menuitem id="appmenu_toggleTabsOnTop"
label="&viewTabsOnTop.label;"
@ -1282,40 +1278,10 @@
</hbox>
<vbox id="browser-bottombox" layer="true">
<statusbar class="chromeclass-status" id="status-bar"
#ifdef WINCE
hidden="true"
#endif
>
<statusbarpanel id="statusbar-display" label="" flex="1"/>
<statusbarpanel id="download-monitor" class="statusbarpanel-iconic-text"
tooltiptext="&downloadMonitor2.tooltip;" hidden="true"
command="Tools:Downloads"/>
<statusbarpanel id="security-button" class="statusbarpanel-iconic"
hidden="true"
onclick="if (event.button == 0 &amp;&amp; event.detail == 1) displaySecurityInfo();"/>
#ifdef MOZ_SERVICES_SYNC
<statusbarpanel id="sync-notifications-button"
class="statusbarpanel-iconic-text"
hidden="true"
popup="sync-notifications-panel">
</statusbarpanel>
<panel id="sync-notifications-panel" position="before_end">
<notificationbox id="sync-notifications-box"/>
</panel>
#endif
<statusbarpanel id="page-report-button" type="menu"
class="statusbarpanel-menu-iconic"
hidden="true"
tooltiptext="&pageReportIcon.tooltip;">
<menupopup onpopupshowing="gPopupBlockerObserver.fillPopupList(event);">
<menuitem observes="blockedPopupAllowSite"/>
<menuitem observes="blockedPopupEditSettings"/>
<menuitem observes="blockedPopupDontShowMessage"/>
<menuseparator observes="blockedPopupsSeparator"/>
</menupopup>
</statusbarpanel>
</statusbar>
<toolbar id="addon-bar" toolbarname="&addonBarCmd.label;" collapsed="true"
class="toolbar-primary chromeclass-toolbar"
context="toolbar-context-menu" toolboxid="navigator-toolbox"
customizable="true"/>
</vbox>
#ifndef XP_UNIX
<svg:svg height="0">

Просмотреть файл

@ -56,16 +56,13 @@
screenX="24" screenY="24">
<description>
&startDescription.label;
&startDescriptionText.label;
</description>
<separator class="thin"/>
<hbox pack="center">
<statusbar style="width:20em">
<statusbarpanel flex="1" pack="left"><description>&done.label;</description></statusbarpanel>
<statusbarpanel class="statusbarpanel-iconic" style="min-height:18px" id="page-report-button"/>
</statusbar>
<!-- insert example here! (bug 594294) -->
</hbox>
<separator class="thin"/>

Просмотреть файл

@ -341,7 +341,7 @@
mBrowser: aBrowser,
mBlank: aStartsBlank,
// cache flags for correct status bar update after tab switching
// cache flags for correct status UI update after tab switching
mStateFlags: 0,
mStatus: 0,
mMessage: "",

Просмотреть файл

@ -95,6 +95,7 @@ endif
_BROWSER_FILES = \
browser_typeAheadFind.js \
browser_NetworkPrioritizer.js \
browser_addon_bar.js \
browser_allTabsPanel.js \
browser_alltabslistener.js \
browser_bug304198.js \

Просмотреть файл

@ -0,0 +1,78 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is browser add-on bar test code.
*
* The Initial Developer of the Original Code is the Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2010
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Dietrich Ayala <dietrich@mozilla.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
function test() {
waitForExplicitFinish();
let addonbar = document.getElementById("addon-bar");
ok(addonbar.collapsed, "addon bar is collapsed by default");
let topMenu, toolbarMenu;
function onTopMenuShown(event) {
event.currentTarget.removeEventListener("popupshown", arguments.callee, false);
// open the customize or toolbars menu
let toolbarMenu = document.getElementById("appmenu_customizeMenu") ||
document.getElementById("viewToolbarsMenu").firstElementChild;
toolbarMenu.addEventListener("popupshown", onToolbarMenuShown, false);
toolbarMenu.openPopup();
}
function onToolbarMenuShown(event) {
event.currentTarget.removeEventListener("popupshown", arguments.callee, false);
// test the menu item's default state
let menuitem = document.getElementById("toggle_addon-bar");
ok(menuitem, "found the menu item");
is(menuitem.getAttribute("checked"), "false", "menuitem is not checked by default");
// click on the menu item
// TODO: there's got to be a way to check+command in one shot
menuitem.setAttribute("checked", "true");
menuitem.click();
// now the addon bar should be visible and the menu checked
is(addonbar.getAttribute("collapsed"), "false", "addon bar is visible after executing the command");
is(menuitem.getAttribute("checked"), "true", "menuitem is checked after executing the command");
finish();
}
// open the appmenu or view menu
topMenu = document.getElementById("appmenu-popup") ||
document.getElementById("menu_viewPopup");
topMenu.addEventListener("popupshown", onTopMenuShown, false);
topMenu.openPopup();
}

Просмотреть файл

@ -1,7 +1,7 @@
function test() {
waitForExplicitFinish();
var pageInfo, atTest = 0;
var pageInfo;
gBrowser.selectedTab = gBrowser.addTab();
gBrowser.selectedBrowser.addEventListener("load", function () {
gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
@ -15,22 +15,7 @@ function test() {
if (topic != "page-info-dialog-loaded")
return;
switch (atTest) {
case 0:
atTest++;
handlePageInfo();
break;
case 1:
atTest++;
pageInfo = win;
testLockClick();
break;
case 2:
atTest++;
Services.obs.removeObserver(observer, "page-info-dialog-loaded");
testLockDoubleClick();
break;
}
handlePageInfo();
}
function $(aId) { return pageInfo.document.getElementById(aId) };
@ -53,35 +38,7 @@ function test() {
"Name given: " + feedItem.getAttribute("name") + ", should be " + (i+1));
}
pageInfo.addEventListener("unload", function() {
pageInfo.removeEventListener("unload", arguments.callee, false);
var lockIcon = document.getElementById("security-button");
EventUtils.synthesizeMouse(lockIcon, 0, 0, {clickCount: 1});
}, false);
pageInfo.close();
}
function testLockClick() {
var deck = $("mainDeck");
is(deck.selectedPanel.id, "securityPanel", "The security tab should open when the lock icon is clicked");
pageInfo.addEventListener("unload", function() {
pageInfo.removeEventListener("unload", arguments.callee, false);
var lockIcon = document.getElementById("security-button");
EventUtils.synthesizeMouse(lockIcon, 0, 0, {clickCount: 1});
EventUtils.synthesizeMouse(lockIcon, 0, 0, {clickCount: 2});
}, false);
pageInfo.close();
}
function testLockDoubleClick() {
var pageInfoDialogs = Services.wm.getEnumerator("Browser:page-info");
var i = 0;
while (pageInfoDialogs.hasMoreElements()) {
i++;
pageInfo = pageInfoDialogs.getNext();
pageInfo.close();
}
is(i, 1, "When the lock is clicked twice there should be only one page info dialog");
gBrowser.removeCurrentTab();
finish();
}

Просмотреть файл

@ -50,22 +50,6 @@ function getBrowserURL()
return "chrome://browser/content/browser.xul";
}
function goToggleToolbar( id, elementID )
{
var toolbar = document.getElementById(id);
var element = document.getElementById(elementID);
if (toolbar)
{
var isHidden = toolbar.hidden;
toolbar.hidden = !isHidden;
document.persist(id, 'hidden');
if (element) {
element.setAttribute("checked", isHidden ? "true" : "false");
document.persist(elementID, 'checked');
}
}
}
function getTopWin()
{
return Services.wm.getMostRecentWindow("navigator:browser");

Просмотреть файл

@ -50,7 +50,7 @@
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="init();"
onunload="SidebarUtils.clearURLFromStatusBar();">
onunload="SidebarUtils.setMouseoverURL('');">
<script type="application/javascript"
src="chrome://browser/content/bookmarks/sidebarUtils.js"/>
@ -79,7 +79,7 @@
onkeypress="SidebarUtils.handleTreeKeyPress(event);"
onclick="SidebarUtils.handleTreeClick(this, event, true);"
onmousemove="SidebarUtils.handleTreeMouseMove(event);"
onmouseout="SidebarUtils.clearURLFromStatusBar();">
onmouseout="SidebarUtils.setMouseoverURL('');">
<treecols>
<treecol id="title" flex="1" primary="true" hideheader="true"/>
</treecols>

Просмотреть файл

@ -58,7 +58,7 @@
<page id="history-panel" orient="vertical"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="HistorySidebarInit();"
onunload="SidebarUtils.clearURLFromStatusBar();">
onunload="SidebarUtils.setMouseoverURL('');">
<script type="application/javascript"
src="chrome://browser/content/bookmarks/sidebarUtils.js"/>
@ -122,7 +122,7 @@
onkeypress="SidebarUtils.handleTreeKeyPress(event);"
onclick="SidebarUtils.handleTreeClick(this, event, true);"
onmousemove="SidebarUtils.handleTreeMouseMove(event);"
onmouseout="SidebarUtils.clearURLFromStatusBar();">
onmouseout="SidebarUtils.setMouseoverURL('');">
<treecols>
<treecol id="title" flex="1" primary="true" hideheader="true"/>
</treecols>

Просмотреть файл

@ -117,21 +117,20 @@ var SidebarUtils = {
tbo.getCellAt(aEvent.clientX, aEvent.clientY, row, col, obj);
// row.value is -1 when the mouse is hovering an empty area within the tree.
// To avoid showing a URL from a previously hovered node,
// for a currently hovered non-url node, we must clear the URL from the
// status bar in these cases.
// To avoid showing a URL from a previously hovered node for a currently
// hovered non-url node, we must clear the moused-over URL in these cases.
if (row.value != -1) {
var cell = tree.view.nodeForTreeIndex(row.value);
if (PlacesUtils.nodeIsURI(cell))
window.top.XULBrowserWindow.setOverLink(cell.uri, null);
var node = tree.view.nodeForTreeIndex(row.value);
if (PlacesUtils.nodeIsURI(node))
this.setMouseoverURL(node.uri);
else
this.clearURLFromStatusBar();
this.setMouseoverURL("");
}
else
this.clearURLFromStatusBar();
this.setMouseoverURL("");
},
clearURLFromStatusBar: function SU_clearURLFromStatusBar() {
window.top.XULBrowserWindow.setOverLink("", null);
setMouseoverURL: function SU_setMouseoverURL(aURL) {
window.top.XULBrowserWindow.setOverLink(aURL, null);
}
};

Просмотреть файл

@ -57,10 +57,6 @@
<preference id="dom.event.contextmenu.enabled" name="dom.event.contextmenu.enabled" type="bool"/>
<preference id="dom.disable_window_move_resize" name="dom.disable_window_move_resize" type="bool" inverted="true"/>
<preference id="dom.disable_window_flip" name="dom.disable_window_flip" type="bool" inverted="true"/>
<preference id="dom.disable_window_open_feature.status" inverted="true"
name="dom.disable_window_open_feature.status" type="bool"/>
<preference id="dom.disable_window_status_change" inverted="true"
name="dom.disable_window_status_change" type="bool"/>
</preferences>
<script type="application/javascript" src="chrome://browser/content/preferences/advanced-scripts.js"/>
@ -78,12 +74,6 @@
<checkbox id="disableContextMenus" label="&disableContextMenus.label;"
accesskey="&disableContextMenus.accesskey;"
preference="dom.event.contextmenu.enabled"/>
<checkbox id="hideStatusBar" label="&hideStatusBar.label;"
accesskey="&hideStatusBar.accesskey;"
preference="dom.disable_window_open_feature.status"/>
<checkbox id="changeStatusBar" label="&changeStatusBar.label;"
accesskey="&changeStatusBar.accesskey;"
preference="dom.disable_window_status_change"/>
</prefpane>
</prefwindow>

Просмотреть файл

@ -49,7 +49,6 @@ _BROWSER_TEST_FILES = \
browser_privatebrowsing_certexceptionsui.js \
browser_privatebrowsing_commandline_toggle.js \
browser_privatebrowsing_crh.js \
browser_privatebrowsing_downloadmonitor.js \
browser_privatebrowsing_fastswitch.js \
browser_privatebrowsing_findbar.js \
browser_privatebrowsing_forgetthissite.js \
@ -84,6 +83,9 @@ _BROWSER_TEST_FILES = \
title.sjs \
$(NULL)
# Disabled until bug 564934 is fixed:
# browser_privatebrowsing_downloadmonitor.js \
# Turn off private browsing tests that perma-timeout on Linux.
ifneq (Linux,$(OS_ARCH))
_BROWSER_TEST_FILES += \

Просмотреть файл

@ -54,14 +54,14 @@ function test() {
gBrowser.addEventListener("DOMUpdatePageReport", function() {
gBrowser.removeEventListener("DOMUpdatePageReport", arguments.callee, false);
executeSoon(function() {
let pageReportButton = document.getElementById("page-report-button");
let notification = gBrowser.getNotificationBox().getNotificationWithValue("popup-blocked");
ok(!pageReportButton.hidden, "The page report button should not be hidden");
ok(notification, "The notification box should be displayed");
function checkMenuItem(callback) {
dump("CMI: in\n");
document.addEventListener("popupshown", function(event) {
dump("CMI: popupshown\n");
document.removeEventListener("popupshown", arguments.callee, false);
if (expectedDisabled)
@ -69,18 +69,18 @@ function test() {
"The allow popups menu item should be disabled");
event.originalTarget.hidePopup();
dump("CMI: calling back\n");
callback();
dump("CMI: called back\n");
}, false);
dump("CMI: out\n");
}
checkMenuItem(function() {
checkMenuItem(function() {
gBrowser.removeTab(tab);
callback();
});
notification.querySelector("button").doCommand();
gBrowser.removeTab(tab);
callback();
});
EventUtils.synthesizeMouse(document.getElementById("page-report-button"), 1, 1, {});
notification.querySelector("button").doCommand();
});
}, false);

Просмотреть файл

@ -70,8 +70,8 @@ can reach it easily. -->
<!ENTITY personalbarCmd.label "Bookmarks Toolbar">
<!ENTITY personalbarCmd.accesskey "B">
<!ENTITY bookmarksToolbarItem.label "Bookmarks Toolbar Items">
<!ENTITY taskbarCmd.label "Status Bar">
<!ENTITY taskbarCmd.accesskey "B">
<!ENTITY addonBarCmd.label "Add-on Bar">
<!ENTITY addonBarCmd.accesskey "B">
<!ENTITY pageSourceCmd.label "Page Source">
<!ENTITY pageSourceCmd.accesskey "o">

Просмотреть файл

@ -88,7 +88,6 @@ popupWarningButtonUnix.accesskey=P
popupAllow=Allow pop-ups for %S
popupBlock=Block pop-ups for %S
popupWarningDontShowFromMessage=Don't show this message when pop-ups are blocked
popupWarningDontShowFromStatusbar=Don't show info message when pop-ups are blocked
popupShowPopupPrefix=Show '%S'
# missing plugin installer

Просмотреть файл

@ -1,4 +1,4 @@
<!ENTITY startDescription.label "A web site has attempted to open a pop-up window without your permission. &brandShortName; has automatically closed the pop-up window. Whenever &brandShortName; blocks these pop-ups, you will see an icon on the status bar.">
<!ENTITY startDescriptionText.label "A web site has attempted to open a pop-up window without your permission. &brandShortName; has automatically closed the pop-up window.">
<!ENTITY endDescription.label "You can click on this icon to see which sites &brandShortName; blocked and to allow those sites to open pop-ups if they are required for the site to function correctly.">

Просмотреть файл

@ -46,7 +46,3 @@
<!ENTITY raiseLowerWindows.accesskey "R">
<!ENTITY disableContextMenus.label "Disable or replace context menus">
<!ENTITY disableContextMenus.accesskey "D">
<!ENTITY hideStatusBar.label "Hide the status bar">
<!ENTITY hideStatusBar.accesskey "H">
<!ENTITY changeStatusBar.label "Change status bar text">
<!ENTITY changeStatusBar.accesskey "C">

Просмотреть файл

@ -1,5 +1,4 @@
<!ENTITY testpilot.brand.label "Test Pilot">
<!-- browser window: menu and status bar -->
<!ENTITY testpilot.settings.label "Settings">
<!ENTITY testpilot.settings.dataSubmission.label "Data Submission">
<!ENTITY testpilot.settings.notifications.label "Notifications">

Просмотреть файл

@ -1401,28 +1401,6 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-
background-color: Window;
}
#status-bar {
border-top: none;
}
statusbarpanel#statusbar-display {
-moz-padding-start: 0;
}
#security-button[level="high"],
#security-button[level="low"] {
list-style-image: url("chrome://browser/skin/Secure.png");
}
#security-button[level="broken"] {
list-style-image: url("chrome://browser/skin/Security-broken.png");
}
#page-report-button {
list-style-image: url("chrome://browser/skin/Info.png");
width: 20px;
}
/* Throbber */
#navigator-throbber {
width: 16px;
@ -1721,11 +1699,6 @@ toolbar[mode="text"] toolbarbutton.chevron > .toolbarbutton-icon {
display: -moz-box; /* display chevron icon in text mode */
}
/* Popup blocking dialog */
#pageReportFirstTime statusbarpanel.statusbar-resizerpanel {
visibility: collapse;
}
#download-monitor {
list-style-image: url("chrome://browser/skin/Toolbar-small.png");
-moz-image-region: rect(0px 16px 16px 0px);

Просмотреть файл

@ -877,15 +877,6 @@ toolbar[mode="icons"] #zoom-in-button {
margin-top: 2px;
}
statusbarpanel#statusbar-display {
-moz-padding-start: 0;
}
.statusbarpanel-text {
margin-top: 2px;
margin-bottom: 0;
}
/* over-link in location bar */
.urlbar-origin-label {
@ -1488,25 +1479,6 @@ sidebarheader > .tabs-closebutton > .toolbarbutton-text {
display: none;
}
/* ----- SECURITY DISPLAY ----- */
#security-button[level="high"] ,
#security-button[level="low"] {
list-style-image: url("chrome://browser/skin/Secure-statusbar.png");
}
#security-button[level="broken"] {
list-style-image: url("chrome://browser/skin/Secure-statusbar-broken.png");
}
/* ----- PAGE REPORT DISPLAY ----- */
#page-report-button {
list-style-image: url("chrome://browser/skin/Popup-blocked.png");
padding: 0px 3px 0px 3px;
}
/* ----- FEED CONTENT DISPLAY ---- */
#feed-button {

Просмотреть файл

@ -51,8 +51,6 @@ browser.jar:
skin/classic/browser/section_collapsed-rtl.png
skin/classic/browser/section_expanded.png
skin/classic/browser/Secure-Glyph-White.png
skin/classic/browser/Secure-statusbar.png
skin/classic/browser/Secure-statusbar-broken.png
skin/classic/browser/Secure-background.gif
skin/classic/browser/Toolbar.png
skin/classic/browser/toolbarbutton-dropmarker.png

Просмотреть файл

@ -107,10 +107,6 @@
-moz-appearance: toolbox;
}
statusbarpanel#statusbar-display {
-moz-padding-start: 0;
}
/* ::::: app menu button ::::: */
#appmenu-button {
@ -1450,24 +1446,6 @@ richlistitem[type~="action"][actiontype="switchtab"] > .ac-url-box > .ac-action-
-moz-padding-start: 0px;
}
#status-bar {
border-top: none;
}
#security-button[level="high"],
#security-button[level="low"] {
list-style-image: url("chrome://browser/skin/Secure.png");
}
#security-button[level="broken"] {
list-style-image: url("chrome://browser/skin/Security-broken.png");
}
#page-report-button {
width: 20px;
list-style-image: url("chrome://browser/skin/Info.png");
}
/* ::::: throbber ::::: */
#navigator-throbber {
@ -1862,11 +1840,6 @@ toolbar[mode="text"] toolbarbutton.chevron > .toolbarbutton-icon {
-moz-image-region: rect(0px 48px 16px 32px);
}
/* ::::: About Popup Blocking dialog ::::: */
#pageReportFirstTime statusbarpanel.statusbar-resizerpanel {
visibility: collapse;
}
/* Bookmarks toolbar */
#PlacesToolbarDropIndicator {
list-style-image: url(chrome://browser/skin/places/toolbarDropMarker.png);

Просмотреть файл

@ -82,11 +82,6 @@ var testPopUpAllowed = function()
'/{"class":"messageCloseButton tabbable"}');
controller.assertNodeNotExist(button);
// Check for the status bar icon
var cssInfo = controller.window.getComputedStyle(controller.window.document.getElementById("page-report-button"), "");
controller.assertJS("subject.isReportButtonVisible == false",
{isReportButtonVisible: cssInfo.getPropertyValue('display') != 'none'});
// Check that the window count has changed
controller.assertJS("subject.preWindowCount != subject.postWindowCount",
{preWindowCount: windowCount, postWindowCount: mozmill.utils.getWindows().length});

Просмотреть файл

@ -84,11 +84,6 @@ var testPopUpBlocked = function()
'/{"class":"messageCloseButton tabbable"}');
controller.waitForElement(button, gTimeout);
// Check for the status bar icon
var cssInfo = controller.window.getComputedStyle(controller.window.document.getElementById("page-report-button"), "");
controller.assertJS("subject.isReportButtonVisible == true",
{isReportButtonVisible: cssInfo.getPropertyValue('display') == '-moz-box'});
// Check that the window count has not changed
controller.assertJS("subject.preWindowCount == subject.postWindowCount",
{preWindowCount: windowCount, postWindowCount: mozmill.utils.getWindows().length});

Просмотреть файл

@ -1,95 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozmill Test Code.
*
* The Initial Developer of the Original Code is Mozilla Corporation.
* Portions created by the Initial Developer are Copyright (C) 2009
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Anthony Hughes <ashughes@mozilla.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
const gDelay = 0;
const gTimeout = 5000;
var setupModule = function(module)
{
module.controller = mozmill.getBrowserController();
}
/**
* Test clicking the padlock in the statusbar opens the Page Info dialog
* to the Security tab
*/
var testSecurityInfoViaPadlock = function()
{
// Go to a secure website
controller.open("https://www.verisign.com/");
controller.waitForPageLoad();
// Get the information from the certificate for comparison
var secUI = controller.window.getBrowser().mCurrentBrowser.securityUI;
var cert = secUI.QueryInterface(Ci.nsISSLStatusProvider).SSLStatus.serverCert;
// Click the padlock icon
controller.click(new elementslib.ID(controller.window.document, "security-button"));
// Check the Page Info - Security Tab
controller.sleep(500);
var window = mozmill.wm.getMostRecentWindow('Browser:page-info');
var pageInfoController = new mozmill.controller.MozMillController(window);
// Check that the Security tab is selected by default
var securityTab = new elementslib.ID(pageInfoController.window.document, "securityTab");
pageInfoController.assertProperty(securityTab, "selected", "true");
// Check the Web Site label against the Cert CName
var webIDDomainLabel = new elementslib.ID(pageInfoController.window.document, "security-identity-domain-value");
pageInfoController.waitForEval("subject.domainLabel.indexOf(subject.CName) != -1", gTimeout, 100,
{domainLabel: webIDDomainLabel.getNode().value, CName: cert.commonName});
// Check the Owner label against the Cert Owner
var webIDOwnerLabel = new elementslib.ID(pageInfoController.window.document, "security-identity-owner-value");
pageInfoController.assertValue(webIDOwnerLabel, cert.organization);
// Check the Verifier label against the Cert Issuer
var webIDVerifierLabel = new elementslib.ID(pageInfoController.window.document, "security-identity-verifier-value");
pageInfoController.assertValue(webIDVerifierLabel, cert.issuerOrganization);
// Press ESC to close the Page Info dialog
pageInfoController.keypress(null, 'VK_ESCAPE', {});
// Wait a bit to make sure the page info window has been closed
controller.sleep(200);
}
/**
* Map test functions to litmus tests
*/
// testSecurityInfoViaPadlock.meta = {litmusids : [8205]};

Просмотреть файл

@ -62,11 +62,6 @@ var testSecNotification = function() {
var identLabel = new elementslib.ID(controller.window.document, "identity-icon-label");
controller.assertValue(identLabel, 'Mozilla Corporation (US)');
// The security button should be visible in the status bar
var securityButton = controller.window.document.getElementById("security-button");
var cssSecButton = controller.window.getComputedStyle(securityButton, "");
controller.assertJS("subject.getPropertyValue('list-style-image') != 'none'", cssSecButton);
// Identity box should have a green background
var identityBox = new elementslib.ID(controller.window.document, "identity-box");
controller.assertProperty(identityBox, "className", "verifiedIdentity");
@ -78,9 +73,6 @@ var testSecNotification = function() {
var projects = new elementslib.Link(controller.tabs.activeTab, "Our Projects");
controller.assertNode(projects);
// Security button should not be visible
controller.assertJS("subject.getPropertyValue('list-style-image') == 'none'", cssSecButton);
// Identity box should have a gray background
controller.assertProperty(identityBox, "className", "unknownIdentity");

Просмотреть файл

@ -1,69 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is Mozmill Test Code.
*
* The Initial Developer of the Original Code is Mozilla Corporation.
* Portions created by the Initial Developer are Copyright (C) 2010
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Anthony Hughes <anthony.s.hughes@gmail.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
var setupModule = function(module)
{
module.controller = mozmill.getBrowserController();
}
/**
* Test what displays in the status bar for an SSL secured domain
*/
var testSSLDomainLabelInStatusBar = function()
{
// Go to a secure website
controller.open("https://addons.mozilla.org");
controller.waitForPageLoad();
// Check for the Padlock icon in the status bar
var padlockIcon = new elementslib.ID(controller.window.document,
"security-button");
controller.assertNode(padlockIcon);
// Check the domain name does NOT display in the status bar
var lookupPath = '/id("main-window")' +
'/id("browser-bottombox")' +
'/id("status-bar")' +
'/id("security-button")' +
'/anon({"class":"statusbarpanel-text"})';
var domainText = new elementslib.Lookup(controller.window.document, lookupPath);
controller.assertNodeNotExist(domainText);
}
/**
* Map test functions to litmus tests
*/
// testSSLDomainLabelInStatusBar.meta = {litmusids : [9328]};