Merge m-c to graphics
MozReview-Commit-ID: Id83SqNnzku
|
@ -184,6 +184,12 @@ mobile/android/modules/HomeProvider.jsm
|
|||
# Uses `#filter substitution`
|
||||
services/sync/modules/constants.js
|
||||
|
||||
# Third party services
|
||||
services/sync/tps/extensions/mozmill/resource/stdlib/json2.js
|
||||
services/common/kinto-http-client.js
|
||||
services/common/kinto-offline-client.js
|
||||
services/sync/tps/extensions/mozmill
|
||||
|
||||
# toolkit/ exclusions
|
||||
|
||||
# Not part of the default build
|
||||
|
|
|
@ -18,7 +18,6 @@ MOZ_OFFICIAL_BRANDING_DIRECTORY=b2g/branding/official
|
|||
# MOZ_APP_DISPLAYNAME is set by branding/configure.sh
|
||||
|
||||
MOZ_NO_SMART_CARDS=1
|
||||
MOZ_APP_STATIC_INI=1
|
||||
|
||||
if test "$OS_TARGET" = "Android"; then
|
||||
MOZ_CAPTURE=1
|
||||
|
|
|
@ -27,7 +27,6 @@ MOZ_OFFICIAL_BRANDING_DIRECTORY=b2g/branding/official
|
|||
MOZ_CAPTIVEDETECT=1
|
||||
|
||||
MOZ_NO_SMART_CARDS=1
|
||||
MOZ_APP_STATIC_INI=1
|
||||
NSS_NO_LIBPKIX=1
|
||||
|
||||
if test "$OS_TARGET" = "Android"; then
|
||||
|
|
|
@ -824,10 +824,6 @@
|
|||
</prefs>
|
||||
<versionRange minVersion="0" maxVersion="*" severity="1"/>
|
||||
</emItem>
|
||||
<emItem blockID="i508" id="advance@windowsclient.com">
|
||||
<prefs/>
|
||||
<versionRange minVersion="0" maxVersion="*" severity="3"/>
|
||||
</emItem>
|
||||
<emItem blockID="i1022" id="g99hiaoekjoasiijdkoleabsy278djasi@jetpack">
|
||||
<prefs/>
|
||||
<versionRange minVersion="0" maxVersion="*" severity="3"/>
|
||||
|
@ -996,6 +992,10 @@
|
|||
<prefs/>
|
||||
<versionRange minVersion="0" maxVersion="*" severity="3"/>
|
||||
</emItem>
|
||||
<emItem blockID="i1493" id="{de71f09a-3342-48c5-95c1-4b0f17567554}">
|
||||
<prefs/>
|
||||
<versionRange minVersion="0" maxVersion="*" severity="3"/>
|
||||
</emItem>
|
||||
<emItem blockID="i712" id="{a2bfe612-4cf5-48ea-907c-f3fb25bc9d6b}">
|
||||
<prefs/>
|
||||
<versionRange minVersion="0" maxVersion="*" severity="3"/>
|
||||
|
@ -2015,6 +2015,10 @@
|
|||
<prefs/>
|
||||
<versionRange minVersion="0" maxVersion="*" severity="3"/>
|
||||
</emItem>
|
||||
<emItem blockID="i508" id="advance@windowsclient.com">
|
||||
<prefs/>
|
||||
<versionRange minVersion="0" maxVersion="*" severity="3"/>
|
||||
</emItem>
|
||||
</emItems>
|
||||
<pluginItems>
|
||||
<pluginItem blockID="p416">
|
||||
|
|
|
@ -65,6 +65,9 @@ pref("extensions.systemAddon.update.url", "https://aus5.mozilla.org/update/3/Sys
|
|||
// See the SCOPE constants in AddonManager.jsm for values to use here.
|
||||
pref("extensions.autoDisableScopes", 15);
|
||||
|
||||
// Whether or not webextension themes are supported.
|
||||
pref("extensions.webextensions.themes.enabled", false);
|
||||
|
||||
// Add-on content security policies.
|
||||
pref("extensions.webextensions.base-content-security-policy", "script-src 'self' https://* moz-extension: blob: filesystem: 'unsafe-eval' 'unsafe-inline'; object-src 'self' https://* moz-extension: blob: filesystem:;");
|
||||
pref("extensions.webextensions.default-content-security-policy", "script-src 'self'; object-src 'self';");
|
||||
|
@ -1130,7 +1133,7 @@ pref("services.sync.sendTabToDevice.enabled", true);
|
|||
|
||||
// Developer edition preferences
|
||||
#ifdef MOZ_DEV_EDITION
|
||||
sticky_pref("lightweightThemes.selectedThemeID", "firefox-devedition@mozilla.org");
|
||||
sticky_pref("lightweightThemes.selectedThemeID", "firefox-compact-dark@mozilla.org");
|
||||
#else
|
||||
sticky_pref("lightweightThemes.selectedThemeID", "");
|
||||
#endif
|
||||
|
@ -1425,10 +1428,16 @@ pref("privacy.trackingprotection.introURL", "https://www.mozilla.org/%LOCALE%/fi
|
|||
pref("privacy.userContext.enabled", true);
|
||||
pref("privacy.userContext.ui.enabled", true);
|
||||
pref("privacy.usercontext.about_newtab_segregation.enabled", true);
|
||||
|
||||
// 0 disables long press, 1 when clicked, the menu is shown, 2 the menu is shown after X milliseconds.
|
||||
pref("privacy.userContext.longPressBehavior", 2);
|
||||
#else
|
||||
pref("privacy.userContext.enabled", false);
|
||||
pref("privacy.userContext.ui.enabled", false);
|
||||
pref("privacy.usercontext.about_newtab_segregation.enabled", false);
|
||||
|
||||
// 0 disables long press, 1 when clicked, the menu is shown, 2 the menu is shown after X milliseconds.
|
||||
pref("privacy.userContext.longPressBehavior", 0);
|
||||
#endif
|
||||
|
||||
#ifndef RELEASE_OR_BETA
|
||||
|
|
|
@ -0,0 +1,105 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/**
|
||||
* Listeners for the compact theme. This adds an extra stylesheet
|
||||
* to browser.xul if a pref is set and no other themes are applied.
|
||||
*/
|
||||
var CompactTheme = {
|
||||
styleSheetLocation: "chrome://browser/skin/compacttheme.css",
|
||||
styleSheet: null,
|
||||
initialized: false,
|
||||
|
||||
get isStyleSheetEnabled() {
|
||||
return this.styleSheet && !this.styleSheet.sheet.disabled;
|
||||
},
|
||||
|
||||
get isThemeCurrentlyApplied() {
|
||||
let theme = LightweightThemeManager.currentTheme;
|
||||
return theme && (
|
||||
theme.id == "firefox-compact-dark@mozilla.org" ||
|
||||
theme.id == "firefox-compact-light@mozilla.org");
|
||||
},
|
||||
|
||||
init() {
|
||||
this.initialized = true;
|
||||
Services.obs.addObserver(this, "lightweight-theme-styling-update", false);
|
||||
|
||||
if (this.isThemeCurrentlyApplied) {
|
||||
this._toggleStyleSheet(true);
|
||||
}
|
||||
},
|
||||
|
||||
createStyleSheet() {
|
||||
let styleSheetAttr = `href="${this.styleSheetLocation}" type="text/css"`;
|
||||
this.styleSheet = document.createProcessingInstruction(
|
||||
"xml-stylesheet", styleSheetAttr);
|
||||
this.styleSheet.addEventListener("load", this);
|
||||
document.insertBefore(this.styleSheet, document.documentElement);
|
||||
this.styleSheet.sheet.disabled = true;
|
||||
},
|
||||
|
||||
observe(subject, topic, data) {
|
||||
if (topic == "lightweight-theme-styling-update") {
|
||||
let newTheme = JSON.parse(data);
|
||||
if (newTheme && (
|
||||
newTheme.id == "firefox-compact-light@mozilla.org" ||
|
||||
newTheme.id == "firefox-compact-dark@mozilla.org")) {
|
||||
// We are using the theme ID on this object instead of always referencing
|
||||
// LightweightThemeManager.currentTheme in case this is a preview
|
||||
this._toggleStyleSheet(true);
|
||||
} else {
|
||||
this._toggleStyleSheet(false);
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
handleEvent(e) {
|
||||
if (e.type === "load") {
|
||||
this.styleSheet.removeEventListener("load", this);
|
||||
this.refreshBrowserDisplay();
|
||||
}
|
||||
},
|
||||
|
||||
refreshBrowserDisplay() {
|
||||
// Don't touch things on the browser if gBrowserInit.onLoad hasn't
|
||||
// yet fired.
|
||||
if (this.initialized) {
|
||||
gBrowser.tabContainer._positionPinnedTabs();
|
||||
}
|
||||
},
|
||||
|
||||
_toggleStyleSheet(enabled) {
|
||||
let wasEnabled = this.isStyleSheetEnabled;
|
||||
if (enabled) {
|
||||
// The stylesheet may not have been created yet if it wasn't
|
||||
// needed on initial load. Make it now.
|
||||
if (!this.styleSheet) {
|
||||
this.createStyleSheet();
|
||||
}
|
||||
this.styleSheet.sheet.disabled = false;
|
||||
this.refreshBrowserDisplay();
|
||||
} else if (!enabled && wasEnabled) {
|
||||
this.styleSheet.sheet.disabled = true;
|
||||
this.refreshBrowserDisplay();
|
||||
}
|
||||
},
|
||||
|
||||
uninit() {
|
||||
Services.obs.removeObserver(this, "lightweight-theme-styling-update");
|
||||
if (this.styleSheet) {
|
||||
this.styleSheet.removeEventListener("load", this);
|
||||
}
|
||||
this.styleSheet = null;
|
||||
}
|
||||
};
|
||||
|
||||
// If the compact theme is going to be applied in gBrowserInit.onLoad,
|
||||
// then preload it now. This prevents a flash of unstyled content where the
|
||||
// normal theme is applied while the compact theme stylesheet is loading.
|
||||
if (AppConstants.INSTALL_COMPACT_THEMES &&
|
||||
this != Services.appShell.hiddenDOMWindow && CompactTheme.isThemeCurrentlyApplied) {
|
||||
CompactTheme.createStyleSheet();
|
||||
}
|
|
@ -1,142 +0,0 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/**
|
||||
* Listeners for the DevEdition theme. This adds an extra stylesheet
|
||||
* to browser.xul if a pref is set and no other themes are applied.
|
||||
*/
|
||||
var DevEdition = {
|
||||
_devtoolsThemePrefName: "devtools.theme",
|
||||
styleSheetLocation: "chrome://browser/skin/devedition.css",
|
||||
styleSheet: null,
|
||||
initialized: false,
|
||||
|
||||
get isStyleSheetEnabled() {
|
||||
return this.styleSheet && !this.styleSheet.sheet.disabled;
|
||||
},
|
||||
|
||||
get isThemeCurrentlyApplied() {
|
||||
let theme = LightweightThemeManager.currentTheme;
|
||||
return theme && theme.id == "firefox-devedition@mozilla.org";
|
||||
},
|
||||
|
||||
init() {
|
||||
this.initialized = true;
|
||||
Services.prefs.addObserver(this._devtoolsThemePrefName, this, false);
|
||||
Services.obs.addObserver(this, "lightweight-theme-styling-update", false);
|
||||
Services.obs.addObserver(this, "lightweight-theme-window-updated", false);
|
||||
this._updateDevtoolsThemeAttribute();
|
||||
|
||||
if (this.isThemeCurrentlyApplied) {
|
||||
this._toggleStyleSheet(true);
|
||||
}
|
||||
},
|
||||
|
||||
createStyleSheet() {
|
||||
let styleSheetAttr = `href="${this.styleSheetLocation}" type="text/css"`;
|
||||
this.styleSheet = document.createProcessingInstruction(
|
||||
"xml-stylesheet", styleSheetAttr);
|
||||
this.styleSheet.addEventListener("load", this);
|
||||
document.insertBefore(this.styleSheet, document.documentElement);
|
||||
this.styleSheet.sheet.disabled = true;
|
||||
},
|
||||
|
||||
observe(subject, topic, data) {
|
||||
if (topic == "lightweight-theme-styling-update") {
|
||||
let newTheme = JSON.parse(data);
|
||||
if (newTheme && newTheme.id == "firefox-devedition@mozilla.org") {
|
||||
this._toggleStyleSheet(true);
|
||||
} else {
|
||||
this._toggleStyleSheet(false);
|
||||
}
|
||||
} else if (topic == "lightweight-theme-window-updated" && subject == window) {
|
||||
this._updateLWTBrightness();
|
||||
}
|
||||
|
||||
if (topic == "nsPref:changed" && data == this._devtoolsThemePrefName) {
|
||||
this._updateDevtoolsThemeAttribute();
|
||||
}
|
||||
},
|
||||
|
||||
_inferBrightness() {
|
||||
ToolbarIconColor.inferFromText();
|
||||
// Get an inverted full screen button if the dark theme is applied.
|
||||
if (this.isStyleSheetEnabled &&
|
||||
document.documentElement.getAttribute("devtoolstheme") == "dark") {
|
||||
document.documentElement.setAttribute("brighttitlebarforeground", "true");
|
||||
} else {
|
||||
document.documentElement.removeAttribute("brighttitlebarforeground");
|
||||
}
|
||||
},
|
||||
|
||||
_updateLWTBrightness() {
|
||||
if (this.isThemeCurrentlyApplied) {
|
||||
let devtoolsTheme = Services.prefs.getCharPref(this._devtoolsThemePrefName);
|
||||
let textColor = devtoolsTheme == "dark" ? "bright" : "dark";
|
||||
document.documentElement.setAttribute("lwthemetextcolor", textColor);
|
||||
}
|
||||
},
|
||||
|
||||
_updateDevtoolsThemeAttribute() {
|
||||
// Set an attribute on root element to make it possible
|
||||
// to change colors based on the selected devtools theme.
|
||||
let devtoolsTheme = Services.prefs.getCharPref(this._devtoolsThemePrefName);
|
||||
if (devtoolsTheme != "dark") {
|
||||
devtoolsTheme = "light";
|
||||
}
|
||||
document.documentElement.setAttribute("devtoolstheme", devtoolsTheme);
|
||||
this._updateLWTBrightness();
|
||||
this._inferBrightness();
|
||||
},
|
||||
|
||||
handleEvent(e) {
|
||||
if (e.type === "load") {
|
||||
this.styleSheet.removeEventListener("load", this);
|
||||
this.refreshBrowserDisplay();
|
||||
}
|
||||
},
|
||||
|
||||
refreshBrowserDisplay() {
|
||||
// Don't touch things on the browser if gBrowserInit.onLoad hasn't
|
||||
// yet fired.
|
||||
if (this.initialized) {
|
||||
gBrowser.tabContainer._positionPinnedTabs();
|
||||
this._inferBrightness();
|
||||
}
|
||||
},
|
||||
|
||||
_toggleStyleSheet(deveditionThemeEnabled) {
|
||||
let wasEnabled = this.isStyleSheetEnabled;
|
||||
if (deveditionThemeEnabled && !wasEnabled) {
|
||||
// The stylesheet may not have been created yet if it wasn't
|
||||
// needed on initial load. Make it now.
|
||||
if (!this.styleSheet) {
|
||||
this.createStyleSheet();
|
||||
}
|
||||
this.styleSheet.sheet.disabled = false;
|
||||
this.refreshBrowserDisplay();
|
||||
} else if (!deveditionThemeEnabled && wasEnabled) {
|
||||
this.styleSheet.sheet.disabled = true;
|
||||
this.refreshBrowserDisplay();
|
||||
}
|
||||
},
|
||||
|
||||
uninit() {
|
||||
Services.prefs.removeObserver(this._devtoolsThemePrefName, this);
|
||||
Services.obs.removeObserver(this, "lightweight-theme-styling-update");
|
||||
Services.obs.removeObserver(this, "lightweight-theme-window-updated");
|
||||
if (this.styleSheet) {
|
||||
this.styleSheet.removeEventListener("load", this);
|
||||
}
|
||||
this.styleSheet = null;
|
||||
}
|
||||
};
|
||||
|
||||
// If the DevEdition theme is going to be applied in gBrowserInit.onLoad,
|
||||
// then preload it now. This prevents a flash of unstyled content where the
|
||||
// normal theme is applied while the DevEdition stylesheet is loading.
|
||||
if (!AppConstants.RELEASE_OR_BETA &&
|
||||
this != Services.appShell.hiddenDOMWindow && DevEdition.isThemeCurrentlyApplied) {
|
||||
DevEdition.createStyleSheet();
|
||||
}
|
|
@ -998,7 +998,7 @@ var gBrowserInit = {
|
|||
LanguageDetectionListener.init();
|
||||
BrowserOnClick.init();
|
||||
FeedHandler.init();
|
||||
DevEdition.init();
|
||||
CompactTheme.init();
|
||||
AboutPrivateBrowsingListener.init();
|
||||
TrackingProtection.init();
|
||||
RefreshBlocker.init();
|
||||
|
@ -1515,7 +1515,7 @@ var gBrowserInit = {
|
|||
|
||||
FeedHandler.uninit();
|
||||
|
||||
DevEdition.uninit();
|
||||
CompactTheme.uninit();
|
||||
|
||||
TrackingProtection.uninit();
|
||||
|
||||
|
|
До Ширина: | Высота: | Размер: 95 B После Ширина: | Высота: | Размер: 95 B |
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32">
|
||||
<rect fill="#727780" x="1" y="1" width="30" height="30" rx="2" ry="2"/>
|
||||
<path fill="#393f4c" d="M3 1h26a2 2 0 0 1 2 2v14H1V3a2 2 0 0 1 2-2z"/>
|
||||
<rect fill="#171b1f" x="3.5" y="3.5" width="25" height="11" rx="1" ry="1"/>
|
||||
<path fill="#252c33" d="M4.5 3.5h12v11h-12a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1z"/>
|
||||
<rect stroke="#1d2328" fill="none" stroke-width="2" x="1" y="1" width="30" height="30" rx="2" ry="2"/>
|
||||
<path class="icon-line-2px" d="M10 6L7 9l3 3M7.5 9H13"/>
|
||||
<path stroke="#1d2328" d="M1.5 16.5h29"/>
|
||||
<path class="separator-toolbar-items" d="M16.5 3.5v11"/>
|
||||
<rect fill="none" stroke="#171b1f" x="3.5" y="3.5" width="25" height="11" rx="1" ry="1"/>
|
||||
<path fill="#f0f1f2" d="M13 8H9.4l1.3-1.3a1 1 0 0 0-1.4-1.4l-3 3a1 1 0 0 0 0 1.4l3 3a1 1 0 0 0 1.4-1.4L9.4 10H13a1 1 0 0 0 0-2z"/>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 1.1 KiB |
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32">
|
||||
<rect fill="#fff" x="1" y="1" width="30" height="30" rx="2" ry="2"/>
|
||||
<path fill="#e3e3e3" d="M3 1h26a2 2 0 0 1 2 2v14H1V3a2 2 0 0 1 2-2z"/>
|
||||
<rect fill="#fff" x="3.5" y="3.5" width="25" height="11" rx="1" ry="1"/>
|
||||
<path fill="#fcfcfc" d="M4.5 3.5h12v11h-12a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1z"/>
|
||||
<rect fill="none" stroke="#999" stroke-width="2" x="1" y="1" width="30" height="30" rx="2" ry="2"/>
|
||||
<path stroke="#999" d="M1.5 16.5h29"/>
|
||||
<path stroke="#b3b3b3" d="M16.5 3.5v11"/>
|
||||
<rect fill="none" stroke="#b3b3b3" x="3.5" y="3.5" width="25" height="11" rx="1" ry="1"/>
|
||||
<path fill="#595959" d="M13 8H9.4l1.3-1.3a1 1 0 0 0-1.4-1.4l-3 3a1 1 0 0 0 0 1.4l3 3a1 1 0 0 0 1.4-1.4L9.4 10H13a1 1 0 0 0 0-2z"/>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 1.0 KiB |
Двоичные данные
browser/base/content/defaultthemes/devedition.icon.png
До Ширина: | Высота: | Размер: 2.3 KiB |
|
@ -13,7 +13,7 @@
|
|||
<script type="application/javascript" src="chrome://browser/content/browser-addons.js"/>
|
||||
<script type="application/javascript" src="chrome://browser/content/browser-ctrlTab.js"/>
|
||||
<script type="application/javascript" src="chrome://browser/content/browser-customization.js"/>
|
||||
<script type="application/javascript" src="chrome://browser/content/browser-devedition.js"/>
|
||||
<script type="application/javascript" src="chrome://browser/content/browser-compacttheme.js"/>
|
||||
<script type="application/javascript" src="chrome://browser/content/browser-feeds.js"/>
|
||||
<script type="application/javascript" src="chrome://browser/content/browser-fullScreenAndPointerLock.js"/>
|
||||
<script type="application/javascript" src="chrome://browser/content/browser-fullZoom.js"/>
|
||||
|
|
|
@ -5476,14 +5476,14 @@
|
|||
this._tabAnimationLoggingEnabled = false;
|
||||
}
|
||||
this._browserNewtabpageEnabled = Services.prefs.getBoolPref("browser.newtabpage.enabled");
|
||||
Services.prefs.addObserver("privacy.userContext", this, false);
|
||||
this.observe(null, "nsPref:changed", "privacy.userContext.enabled");
|
||||
Services.prefs.addObserver("privacy.userContext.enabled", this, false);
|
||||
]]>
|
||||
</constructor>
|
||||
|
||||
<destructor>
|
||||
<![CDATA[
|
||||
Services.prefs.removeObserver("privacy.userContext.enabled", this);
|
||||
Services.prefs.removeObserver("privacy.userContext", this);
|
||||
]]>
|
||||
</destructor>
|
||||
|
||||
|
@ -5519,17 +5519,35 @@
|
|||
<body><![CDATA[
|
||||
switch (aTopic) {
|
||||
case "nsPref:changed":
|
||||
// This is the only pref observed.
|
||||
// This is has to deal with changes in
|
||||
// privacy.userContext.enabled and
|
||||
// privacy.userContext.longPressBehavior.
|
||||
let containersEnabled = Services.prefs.getBoolPref("privacy.userContext.enabled")
|
||||
&& !PrivateBrowsingUtils.isWindowPrivate(window);
|
||||
|
||||
// This pref won't change so often, so just recreate the menu.
|
||||
let longPressBehavior = Services.prefs.getIntPref("privacy.userContext.longPressBehavior");
|
||||
|
||||
// If longPressBehavior pref is set to 0 (or any invalid value)
|
||||
// long press menu is disabled.
|
||||
if (containersEnabled && (longPressBehavior <= 0 || longPressBehavior > 2)) {
|
||||
containersEnabled = false;
|
||||
}
|
||||
|
||||
const newTab = document.getElementById("new-tab-button");
|
||||
const newTab2 = document.getAnonymousElementByAttribute(this, "anonid", "tabs-newtab-button")
|
||||
|
||||
if (containersEnabled) {
|
||||
for (let parent of [newTab, newTab2]) {
|
||||
if (!parent)
|
||||
continue;
|
||||
for (let parent of [newTab, newTab2]) {
|
||||
if (!parent)
|
||||
continue;
|
||||
|
||||
gClickAndHoldListenersOnElement.remove(parent);
|
||||
parent.removeAttribute("type");
|
||||
if (parent.firstChild) {
|
||||
parent.firstChild.remove();
|
||||
}
|
||||
|
||||
if (containersEnabled) {
|
||||
let popup = document.createElementNS(
|
||||
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
|
||||
"menupopup");
|
||||
|
@ -5542,19 +5560,14 @@
|
|||
popup.setAttribute("position", "after_end");
|
||||
parent.appendChild(popup);
|
||||
|
||||
gClickAndHoldListenersOnElement.add(parent);
|
||||
// longPressBehavior == 2 means that the menu is shown after X
|
||||
// millisecs. Otherwise, with 1, the menu is open immediatelly.
|
||||
if (longPressBehavior == 2) {
|
||||
gClickAndHoldListenersOnElement.add(parent);
|
||||
}
|
||||
|
||||
parent.setAttribute("type", "menu");
|
||||
}
|
||||
} else {
|
||||
for (let parent of [newTab, newTab2]) {
|
||||
if (!parent)
|
||||
continue;
|
||||
gClickAndHoldListenersOnElement.remove(parent);
|
||||
parent.removeAttribute("type");
|
||||
if (!parent.firstChild)
|
||||
continue;
|
||||
parent.firstChild.remove();
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
@ -280,6 +280,7 @@ skip-if = os == 'win'
|
|||
subsuite = clipboard
|
||||
[browser_clipboard_pastefile.js]
|
||||
skip-if = true # Disabled due to the clipboard not supporting real file types yet (bug 1288773)
|
||||
[browser_compacttheme.js]
|
||||
[browser_contentAreaClick.js]
|
||||
skip-if = e10s # Clicks in content don't go through contentAreaClick with e10s.
|
||||
[browser_contentAltClick.js]
|
||||
|
@ -294,7 +295,6 @@ skip-if = toolkit == "gtk2" || toolkit == "gtk3" # disabled on Linux due to bug
|
|||
skip-if = !datareporting
|
||||
[browser_decoderDoctor.js]
|
||||
skip-if = os == "mac" # decoder doctor isn't implemented on osx
|
||||
[browser_devedition.js]
|
||||
[browser_discovery.js]
|
||||
[browser_double_close_tab.js]
|
||||
[browser_documentnavigation.js]
|
||||
|
|
|
@ -0,0 +1,90 @@
|
|||
/*
|
||||
* Testing changes for compact themes.
|
||||
* A special stylesheet should be added to the browser.xul document
|
||||
* when the firefox-compact-light and firefox-compact-dark lightweight
|
||||
* themes are applied.
|
||||
*/
|
||||
|
||||
const PREF_LWTHEME_USED_THEMES = "lightweightThemes.usedThemes";
|
||||
const COMPACT_LIGHT_ID = "firefox-compact-light@mozilla.org";
|
||||
const COMPACT_DARK_ID = "firefox-compact-dark@mozilla.org";
|
||||
const SKIP_TEST = !AppConstants.INSTALL_COMPACT_THEMES;
|
||||
const {LightweightThemeManager} = Components.utils.import("resource://gre/modules/LightweightThemeManager.jsm", {});
|
||||
|
||||
registerCleanupFunction(() => {
|
||||
// Set preferences back to their original values
|
||||
LightweightThemeManager.currentTheme = null;
|
||||
Services.prefs.clearUserPref(PREF_LWTHEME_USED_THEMES);
|
||||
});
|
||||
|
||||
add_task(function* startTests() {
|
||||
if (SKIP_TEST) {
|
||||
ok(true, "No need to run this test since themes aren't installed");
|
||||
return;
|
||||
}
|
||||
|
||||
info("Setting the current theme to null");
|
||||
LightweightThemeManager.currentTheme = null;
|
||||
ok(!CompactTheme.isStyleSheetEnabled, "There is no compact style sheet when no lw theme is applied.");
|
||||
|
||||
info("Adding a lightweight theme.");
|
||||
LightweightThemeManager.currentTheme = dummyLightweightTheme("preview0");
|
||||
ok(!CompactTheme.isStyleSheetEnabled, "The compact stylesheet has been removed when a lightweight theme is applied.");
|
||||
|
||||
info("Applying the dark compact theme.");
|
||||
LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme(COMPACT_DARK_ID);
|
||||
ok(CompactTheme.isStyleSheetEnabled, "The compact stylesheet has been added when the compact lightweight theme is applied");
|
||||
|
||||
info("Applying the light compact theme.");
|
||||
LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme(COMPACT_LIGHT_ID);
|
||||
ok(CompactTheme.isStyleSheetEnabled, "The compact stylesheet has been added when the compact lightweight theme is applied");
|
||||
|
||||
info("Adding a different lightweight theme.");
|
||||
LightweightThemeManager.currentTheme = dummyLightweightTheme("preview1");
|
||||
ok(!CompactTheme.isStyleSheetEnabled, "The compact stylesheet has been removed when a lightweight theme is applied.");
|
||||
|
||||
info("Unapplying all themes.");
|
||||
LightweightThemeManager.currentTheme = null;
|
||||
ok(!CompactTheme.isStyleSheetEnabled, "There is no compact style sheet when no lw theme is applied.");
|
||||
});
|
||||
|
||||
function dummyLightweightTheme(id) {
|
||||
return {
|
||||
id,
|
||||
name: id,
|
||||
headerURL: "resource:///chrome/browser/content/browser/defaultthemes/compact.header.png",
|
||||
iconURL: "resource:///chrome/browser/content/browser/defaultthemes/compactlight.icon.svg",
|
||||
textcolor: "red",
|
||||
accentcolor: "blue"
|
||||
};
|
||||
}
|
||||
|
||||
add_task(function* testLightweightThemePreview() {
|
||||
if (SKIP_TEST) {
|
||||
ok(true, "No need to run this test since themes aren't installed");
|
||||
return;
|
||||
}
|
||||
info("Setting compact to current and previewing others");
|
||||
LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme(COMPACT_LIGHT_ID);
|
||||
ok(CompactTheme.isStyleSheetEnabled, "The compact stylesheet is enabled.");
|
||||
LightweightThemeManager.previewTheme(dummyLightweightTheme("preview0"));
|
||||
ok(!CompactTheme.isStyleSheetEnabled, "The compact stylesheet is not enabled after a lightweight theme preview.");
|
||||
LightweightThemeManager.resetPreview();
|
||||
LightweightThemeManager.previewTheme(dummyLightweightTheme("preview1"));
|
||||
ok(!CompactTheme.isStyleSheetEnabled, "The compact stylesheet is not enabled after a second lightweight theme preview.");
|
||||
LightweightThemeManager.resetPreview();
|
||||
ok(CompactTheme.isStyleSheetEnabled, "The compact stylesheet is enabled again after resetting the preview.");
|
||||
LightweightThemeManager.currentTheme = null;
|
||||
ok(!CompactTheme.isStyleSheetEnabled, "The compact stylesheet is gone after removing the current theme.");
|
||||
|
||||
info("Previewing the compact theme");
|
||||
LightweightThemeManager.previewTheme(LightweightThemeManager.getUsedTheme(COMPACT_LIGHT_ID));
|
||||
ok(CompactTheme.isStyleSheetEnabled, "The compact stylesheet is enabled.");
|
||||
LightweightThemeManager.previewTheme(LightweightThemeManager.getUsedTheme(COMPACT_DARK_ID));
|
||||
ok(CompactTheme.isStyleSheetEnabled, "The compact stylesheet is enabled.");
|
||||
|
||||
LightweightThemeManager.previewTheme(dummyLightweightTheme("preview2"));
|
||||
ok(!CompactTheme.isStyleSheetEnabled, "The compact stylesheet is now disabled after previewing a new sheet.");
|
||||
LightweightThemeManager.resetPreview();
|
||||
ok(!CompactTheme.isStyleSheetEnabled, "The compact stylesheet is now disabled after resetting the preview.");
|
||||
});
|
|
@ -1,129 +0,0 @@
|
|||
/*
|
||||
* Testing changes for Developer Edition theme.
|
||||
* A special stylesheet should be added to the browser.xul document
|
||||
* when the firefox-devedition@mozilla.org lightweight theme
|
||||
* is applied.
|
||||
*/
|
||||
|
||||
const PREF_LWTHEME_USED_THEMES = "lightweightThemes.usedThemes";
|
||||
const PREF_DEVTOOLS_THEME = "devtools.theme";
|
||||
const {LightweightThemeManager} = Components.utils.import("resource://gre/modules/LightweightThemeManager.jsm", {});
|
||||
|
||||
LightweightThemeManager.clearBuiltInThemes();
|
||||
LightweightThemeManager.addBuiltInTheme(dummyLightweightTheme("firefox-devedition@mozilla.org"));
|
||||
|
||||
registerCleanupFunction(() => {
|
||||
// Set preferences back to their original values
|
||||
LightweightThemeManager.currentTheme = null;
|
||||
Services.prefs.clearUserPref(PREF_DEVTOOLS_THEME);
|
||||
Services.prefs.clearUserPref(PREF_LWTHEME_USED_THEMES);
|
||||
|
||||
LightweightThemeManager.currentTheme = null;
|
||||
LightweightThemeManager.clearBuiltInThemes();
|
||||
});
|
||||
|
||||
add_task(function* startTests() {
|
||||
Services.prefs.setCharPref(PREF_DEVTOOLS_THEME, "dark");
|
||||
|
||||
info("Setting the current theme to null");
|
||||
LightweightThemeManager.currentTheme = null;
|
||||
ok(!DevEdition.isStyleSheetEnabled, "There is no devedition style sheet when no lw theme is applied.");
|
||||
|
||||
info("Adding a lightweight theme.");
|
||||
LightweightThemeManager.currentTheme = dummyLightweightTheme("preview0");
|
||||
ok(!DevEdition.isStyleSheetEnabled, "The devedition stylesheet has been removed when a lightweight theme is applied.");
|
||||
|
||||
info("Applying the devedition lightweight theme.");
|
||||
let onAttributeAdded = waitForBrightTitlebarAttribute();
|
||||
LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme("firefox-devedition@mozilla.org");
|
||||
ok(DevEdition.isStyleSheetEnabled, "The devedition stylesheet has been added when the devedition lightweight theme is applied");
|
||||
yield onAttributeAdded;
|
||||
is(document.documentElement.getAttribute("brighttitlebarforeground"), "true",
|
||||
"The brighttitlebarforeground attribute is set on the window.");
|
||||
|
||||
info("Unapplying all themes.");
|
||||
LightweightThemeManager.currentTheme = null;
|
||||
ok(!DevEdition.isStyleSheetEnabled, "There is no devedition style sheet when no lw theme is applied.");
|
||||
|
||||
info("Applying the devedition lightweight theme.");
|
||||
onAttributeAdded = waitForBrightTitlebarAttribute();
|
||||
LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme("firefox-devedition@mozilla.org");
|
||||
ok(DevEdition.isStyleSheetEnabled, "The devedition stylesheet has been added when the devedition lightweight theme is applied");
|
||||
yield onAttributeAdded;
|
||||
ok(document.documentElement.hasAttribute("brighttitlebarforeground"),
|
||||
"The brighttitlebarforeground attribute is set on the window with dark devtools theme.");
|
||||
});
|
||||
|
||||
add_task(function* testDevtoolsTheme() {
|
||||
info("Checking stylesheet and :root attributes based on devtools theme.");
|
||||
Services.prefs.setCharPref(PREF_DEVTOOLS_THEME, "light");
|
||||
is(document.documentElement.getAttribute("devtoolstheme"), "light",
|
||||
"The documentElement has an attribute based on devtools theme.");
|
||||
ok(DevEdition.isStyleSheetEnabled, "The devedition stylesheet is still there with the light devtools theme.");
|
||||
ok(!document.documentElement.hasAttribute("brighttitlebarforeground"),
|
||||
"The brighttitlebarforeground attribute is not set on the window with light devtools theme.");
|
||||
|
||||
Services.prefs.setCharPref(PREF_DEVTOOLS_THEME, "dark");
|
||||
is(document.documentElement.getAttribute("devtoolstheme"), "dark",
|
||||
"The documentElement has an attribute based on devtools theme.");
|
||||
ok(DevEdition.isStyleSheetEnabled, "The devedition stylesheet is still there with the dark devtools theme.");
|
||||
is(document.documentElement.getAttribute("brighttitlebarforeground"), "true",
|
||||
"The brighttitlebarforeground attribute is set on the window with dark devtools theme.");
|
||||
|
||||
Services.prefs.setCharPref(PREF_DEVTOOLS_THEME, "foobar");
|
||||
is(document.documentElement.getAttribute("devtoolstheme"), "light",
|
||||
"The documentElement has 'light' as a default for the devtoolstheme attribute");
|
||||
ok(DevEdition.isStyleSheetEnabled, "The devedition stylesheet is still there with the foobar devtools theme.");
|
||||
ok(!document.documentElement.hasAttribute("brighttitlebarforeground"),
|
||||
"The brighttitlebarforeground attribute is not set on the window with light devtools theme.");
|
||||
});
|
||||
|
||||
function dummyLightweightTheme(id) {
|
||||
return {
|
||||
id,
|
||||
name: id,
|
||||
headerURL: "resource:///chrome/browser/content/browser/defaultthemes/devedition.header.png",
|
||||
iconURL: "resource:///chrome/browser/content/browser/defaultthemes/devedition.icon.png",
|
||||
textcolor: "red",
|
||||
accentcolor: "blue"
|
||||
};
|
||||
}
|
||||
|
||||
add_task(function* testLightweightThemePreview() {
|
||||
info("Setting devedition to current and the previewing others");
|
||||
LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme("firefox-devedition@mozilla.org");
|
||||
ok(DevEdition.isStyleSheetEnabled, "The devedition stylesheet is enabled.");
|
||||
LightweightThemeManager.previewTheme(dummyLightweightTheme("preview0"));
|
||||
ok(!DevEdition.isStyleSheetEnabled, "The devedition stylesheet is not enabled after a lightweight theme preview.");
|
||||
LightweightThemeManager.resetPreview();
|
||||
LightweightThemeManager.previewTheme(dummyLightweightTheme("preview1"));
|
||||
ok(!DevEdition.isStyleSheetEnabled, "The devedition stylesheet is not enabled after a second lightweight theme preview.");
|
||||
LightweightThemeManager.resetPreview();
|
||||
ok(DevEdition.isStyleSheetEnabled, "The devedition stylesheet is enabled again after resetting the preview.");
|
||||
LightweightThemeManager.currentTheme = null;
|
||||
ok(!DevEdition.isStyleSheetEnabled, "The devedition stylesheet is gone after removing the current theme.");
|
||||
|
||||
info("Previewing the devedition theme");
|
||||
LightweightThemeManager.previewTheme(LightweightThemeManager.getUsedTheme("firefox-devedition@mozilla.org"));
|
||||
ok(DevEdition.isStyleSheetEnabled, "The devedition stylesheet is enabled.");
|
||||
LightweightThemeManager.previewTheme(dummyLightweightTheme("preview2"));
|
||||
LightweightThemeManager.resetPreview();
|
||||
ok(!DevEdition.isStyleSheetEnabled, "The devedition stylesheet is now disabled after resetting the preview.");
|
||||
});
|
||||
|
||||
// Use a mutation observer to wait for the brighttitlebarforeground
|
||||
// attribute to change. Using this instead of waiting for the load
|
||||
// event on the DevEdition styleSheet.
|
||||
function waitForBrightTitlebarAttribute() {
|
||||
return new Promise((resolve, reject) => {
|
||||
let mutationObserver = new MutationObserver(function(mutations) {
|
||||
for (let mutation of mutations) {
|
||||
if (mutation.attributeName == "brighttitlebarforeground") {
|
||||
mutationObserver.disconnect();
|
||||
resolve();
|
||||
}
|
||||
}
|
||||
});
|
||||
mutationObserver.observe(document.documentElement, { attributes: true });
|
||||
});
|
||||
}
|
|
@ -4,7 +4,7 @@ const ROOT = getRootDirectory(gTestPath).replace("chrome://mochitests/content/",
|
|||
let pageWithAlert = ROOT + "openPromptOffTimeout.html";
|
||||
|
||||
registerCleanupFunction(function() {
|
||||
Services.perms.removeAll(makeURI(pageWithAlert));
|
||||
Services.perms.removeAll();
|
||||
});
|
||||
|
||||
/*
|
||||
|
|
|
@ -69,7 +69,7 @@ browser.jar:
|
|||
content/browser/browser-ctrlTab.js (content/browser-ctrlTab.js)
|
||||
content/browser/browser-customization.js (content/browser-customization.js)
|
||||
content/browser/browser-data-submission-info-bar.js (content/browser-data-submission-info-bar.js)
|
||||
content/browser/browser-devedition.js (content/browser-devedition.js)
|
||||
content/browser/browser-compacttheme.js (content/browser-compacttheme.js)
|
||||
content/browser/browser-feeds.js (content/browser-feeds.js)
|
||||
content/browser/browser-fullScreenAndPointerLock.js (content/browser-fullScreenAndPointerLock.js)
|
||||
content/browser/browser-fullZoom.js (content/browser-fullZoom.js)
|
||||
|
@ -115,8 +115,9 @@ browser.jar:
|
|||
content/browser/defaultthemes/5.header.png (content/defaultthemes/5.header.png)
|
||||
content/browser/defaultthemes/5.icon.jpg (content/defaultthemes/5.icon.jpg)
|
||||
content/browser/defaultthemes/5.preview.jpg (content/defaultthemes/5.preview.jpg)
|
||||
content/browser/defaultthemes/devedition.header.png (content/defaultthemes/devedition.header.png)
|
||||
content/browser/defaultthemes/devedition.icon.png (content/defaultthemes/devedition.icon.png)
|
||||
content/browser/defaultthemes/compact.header.png (content/defaultthemes/compact.header.png)
|
||||
content/browser/defaultthemes/compactdark.icon.svg (content/defaultthemes/compactdark.icon.svg)
|
||||
content/browser/defaultthemes/compactlight.icon.svg (content/defaultthemes/compactlight.icon.svg)
|
||||
content/browser/gcli_sec_bad.svg (content/gcli_sec_bad.svg)
|
||||
content/browser/gcli_sec_good.svg (content/gcli_sec_good.svg)
|
||||
content/browser/gcli_sec_moderate.svg (content/gcli_sec_moderate.svg)
|
||||
|
|
|
@ -3,9 +3,10 @@
|
|||
// Testing that when the user opens the add tab menu and clicks menu items
|
||||
// the correct context id is opened
|
||||
|
||||
add_task(function* test() {
|
||||
add_task(function* test_menu_with_timeout() {
|
||||
yield SpecialPowers.pushPrefEnv({"set": [
|
||||
["privacy.userContext.enabled", true]
|
||||
["privacy.userContext.enabled", true],
|
||||
["privacy.userContext.longPressBehavior", 2]
|
||||
]});
|
||||
|
||||
let newTab = document.getElementById('tabbrowser-tabs');
|
||||
|
@ -34,6 +35,51 @@ add_task(function* test() {
|
|||
}
|
||||
});
|
||||
|
||||
add_task(function* test_menu_without_timeout() {
|
||||
yield SpecialPowers.pushPrefEnv({"set": [
|
||||
["privacy.userContext.enabled", true],
|
||||
["privacy.userContext.longPressBehavior", 1]
|
||||
]});
|
||||
|
||||
let newTab = document.getElementById('tabbrowser-tabs');
|
||||
let newTabButton = document.getAnonymousElementByAttribute(newTab, "anonid", "tabs-newtab-button");
|
||||
ok(newTabButton, "New tab button exists");
|
||||
ok(!newTabButton.hidden, "New tab button is visible");
|
||||
yield BrowserTestUtils.waitForCondition(() => !!document.getAnonymousElementByAttribute(newTab, "anonid", "newtab-popup"), "Wait for popup to exist");
|
||||
let popup = document.getAnonymousElementByAttribute(newTab, "anonid", "newtab-popup");
|
||||
|
||||
for (let i = 1; i <= 4; i++) {
|
||||
let popupShownPromise = BrowserTestUtils.waitForEvent(popup, "popupshown");
|
||||
EventUtils.synthesizeMouseAtCenter(newTabButton, {type: "mousedown"});
|
||||
|
||||
yield popupShownPromise;
|
||||
let contextIdItem = popup.querySelector(`menuitem[data-usercontextid="${i}"]`);
|
||||
|
||||
ok(contextIdItem, `User context id ${i} exists`);
|
||||
|
||||
let waitForTabPromise = BrowserTestUtils.waitForNewTab(gBrowser);
|
||||
EventUtils.synthesizeMouseAtCenter(contextIdItem, {});
|
||||
|
||||
let tab = yield waitForTabPromise;
|
||||
|
||||
is(tab.getAttribute('usercontextid'), i, `New tab has UCI equal ${i}`);
|
||||
yield BrowserTestUtils.removeTab(tab);
|
||||
}
|
||||
});
|
||||
|
||||
add_task(function* test_no_menu() {
|
||||
yield SpecialPowers.pushPrefEnv({"set": [
|
||||
["privacy.userContext.enabled", true],
|
||||
["privacy.userContext.longPressBehavior", 0]
|
||||
]});
|
||||
|
||||
let newTab = document.getElementById('tabbrowser-tabs');
|
||||
let newTabButton = document.getAnonymousElementByAttribute(newTab, "anonid", "tabs-newtab-button");
|
||||
ok(newTabButton, "New tab button exists");
|
||||
ok(!newTabButton.hidden, "New tab button is visible");
|
||||
let popup = document.getAnonymousElementByAttribute(newTab, "anonid", "newtab-popup");
|
||||
ok(!popup, "new tab should not have a popup");
|
||||
});
|
||||
|
||||
add_task(function* test_private_mode() {
|
||||
let privateWindow = yield BrowserTestUtils.openNewBrowserWindow({private: true});
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
"use strict";
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "Preferences",
|
||||
"resource://gre/modules/Preferences.jsm");
|
||||
|
||||
/* eslint-disable mozilla/balanced-listeners */
|
||||
extensions.on("manifest_theme", (type, directive, extension, manifest) => {
|
||||
let enabled = Preferences.get("extensions.webextensions.themes.enabled");
|
||||
extension.emit("test-message", "themes-enabled", enabled);
|
||||
|
||||
if (enabled) {
|
||||
// Apply theme only if themes are enabled.
|
||||
}
|
||||
});
|
||||
|
||||
extensions.on("shutdown", (type, extension) => {
|
||||
// Remove theme only if it has been applied.
|
||||
});
|
||||
/* eslint-enable mozilla/balanced-listeners */
|
|
@ -10,6 +10,7 @@ category webextension-scripts omnibox chrome://browser/content/ext-omnibox.js
|
|||
category webextension-scripts pageAction chrome://browser/content/ext-pageAction.js
|
||||
category webextension-scripts sessions chrome://browser/content/ext-sessions.js
|
||||
category webextension-scripts tabs chrome://browser/content/ext-tabs.js
|
||||
category webextension-scripts theme chrome://browser/content/ext-theme.js
|
||||
category webextension-scripts utils chrome://browser/content/ext-utils.js
|
||||
category webextension-scripts windows chrome://browser/content/ext-windows.js
|
||||
|
||||
|
@ -30,4 +31,5 @@ category webextension-schemas omnibox chrome://browser/content/schemas/omnibox.j
|
|||
category webextension-schemas page_action chrome://browser/content/schemas/page_action.json
|
||||
category webextension-schemas sessions chrome://browser/content/schemas/sessions.json
|
||||
category webextension-schemas tabs chrome://browser/content/schemas/tabs.json
|
||||
category webextension-schemas theme chrome://browser/content/schemas/theme.json
|
||||
category webextension-schemas windows chrome://browser/content/schemas/windows.json
|
||||
|
|
|
@ -23,6 +23,7 @@ browser.jar:
|
|||
content/browser/ext-pageAction.js
|
||||
content/browser/ext-sessions.js
|
||||
content/browser/ext-tabs.js
|
||||
content/browser/ext-theme.js
|
||||
content/browser/ext-utils.js
|
||||
content/browser/ext-windows.js
|
||||
content/browser/ext-c-contextMenus.js
|
||||
|
|
|
@ -14,4 +14,5 @@ browser.jar:
|
|||
content/browser/schemas/page_action.json
|
||||
content/browser/schemas/sessions.json
|
||||
content/browser/schemas/tabs.json
|
||||
content/browser/schemas/theme.json
|
||||
content/browser/schemas/windows.json
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
// This Source Code Form is subject to the terms of the Mozilla Public
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
[
|
||||
{
|
||||
"namespace": "manifest",
|
||||
"types": [
|
||||
{
|
||||
"id": "ThemeType",
|
||||
"type": "object"
|
||||
},
|
||||
{
|
||||
"$extend": "WebExtensionManifest",
|
||||
"properties": {
|
||||
"theme": {
|
||||
"optional": true,
|
||||
"$ref": "ThemeType"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
|
@ -96,6 +96,7 @@ support-files =
|
|||
[browser_ext_tabs_update.js]
|
||||
[browser_ext_tabs_zoom.js]
|
||||
[browser_ext_tabs_update_url.js]
|
||||
[browser_ext_themes.js]
|
||||
[browser_ext_topwindowid.js]
|
||||
[browser_ext_webRequest.js]
|
||||
[browser_ext_webNavigation_frameId0.js]
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
"use strict";
|
||||
|
||||
add_task(function* test_themes_disabled_by_default() {
|
||||
let manifest = {"theme": {}};
|
||||
let extension = ExtensionTestUtils.loadExtension({manifest});
|
||||
|
||||
yield extension.startup();
|
||||
let enabled = yield extension.awaitMessage("themes-enabled");
|
||||
is(enabled, false, "Themes should be disabled");
|
||||
yield extension.unload();
|
||||
});
|
||||
|
||||
add_task(function* test_themes_enabled_with_preference() {
|
||||
Services.prefs.setBoolPref("extensions.webextensions.themes.enabled", true);
|
||||
|
||||
let manifest = {"theme": {}};
|
||||
let extension = ExtensionTestUtils.loadExtension({manifest});
|
||||
|
||||
yield extension.startup();
|
||||
let enabled = yield extension.awaitMessage("themes-enabled");
|
||||
is(enabled, true, "Themes should be enabled");
|
||||
yield extension.unload();
|
||||
});
|
|
@ -172,7 +172,7 @@ AboutNewTabService.prototype = {
|
|||
.replace("%VERSION%", this.remoteVersion)
|
||||
.replace("%LOCALE%", Locale.getLocale())
|
||||
.replace("%CHANNEL%", releaseName);
|
||||
let mode = Services.prefs.getCharPref(PREF_REMOTE_MODE, "production");
|
||||
let mode = Services.prefs.getCharPref(PREF_REMOTE_MODE);
|
||||
if (!(mode in NewTabRemoteResources.MODE_CHANNEL_MAP)) {
|
||||
mode = "production";
|
||||
}
|
||||
|
@ -229,7 +229,7 @@ AboutNewTabService.prototype = {
|
|||
},
|
||||
|
||||
get remoteVersion() {
|
||||
return Services.prefs.getCharPref(PREF_REMOTE_VERSION, "1");
|
||||
return Services.prefs.getCharPref(PREF_REMOTE_VERSION);
|
||||
},
|
||||
|
||||
get remoteReleaseName() {
|
||||
|
|
|
@ -651,15 +651,27 @@ BrowserGlue.prototype = {
|
|||
// Ensure we keep track of places/pw-mananager undo by init'ing this early.
|
||||
Cu.import("resource:///modules/AutoMigrate.jsm");
|
||||
|
||||
if (!AppConstants.RELEASE_OR_BETA) {
|
||||
let themeName = gBrowserBundle.GetStringFromName("deveditionTheme.name");
|
||||
if (AppConstants.INSTALL_COMPACT_THEMES) {
|
||||
let vendorShortName = gBrandBundle.GetStringFromName("vendorShortName");
|
||||
|
||||
LightweightThemeManager.addBuiltInTheme({
|
||||
id: "firefox-devedition@mozilla.org",
|
||||
name: themeName,
|
||||
headerURL: "resource:///chrome/browser/content/browser/defaultthemes/devedition.header.png",
|
||||
iconURL: "resource:///chrome/browser/content/browser/defaultthemes/devedition.icon.png",
|
||||
id: "firefox-compact-light@mozilla.org",
|
||||
name: gBrowserBundle.GetStringFromName("compactLightTheme.name"),
|
||||
description: gBrowserBundle.GetStringFromName("compactLightTheme.description"),
|
||||
headerURL: "resource:///chrome/browser/content/browser/defaultthemes/compact.header.png",
|
||||
iconURL: "resource:///chrome/browser/content/browser/defaultthemes/compactlight.icon.svg",
|
||||
textcolor: "black",
|
||||
accentcolor: "white",
|
||||
author: vendorShortName,
|
||||
});
|
||||
LightweightThemeManager.addBuiltInTheme({
|
||||
id: "firefox-compact-dark@mozilla.org",
|
||||
name: gBrowserBundle.GetStringFromName("compactDarkTheme.name"),
|
||||
description: gBrowserBundle.GetStringFromName("compactDarkTheme.description"),
|
||||
headerURL: "resource:///chrome/browser/content/browser/defaultthemes/compact.header.png",
|
||||
iconURL: "resource:///chrome/browser/content/browser/defaultthemes/compactdark.icon.svg",
|
||||
textcolor: "white",
|
||||
accentcolor: "black",
|
||||
author: vendorShortName,
|
||||
});
|
||||
}
|
||||
|
@ -1718,7 +1730,7 @@ BrowserGlue.prototype = {
|
|||
},
|
||||
|
||||
_migrateUI: function BG__migrateUI() {
|
||||
const UI_VERSION = 42;
|
||||
const UI_VERSION = 43;
|
||||
const BROWSER_DOCURL = "chrome://browser/content/browser.xul";
|
||||
|
||||
let currentUIVersion;
|
||||
|
@ -2051,6 +2063,18 @@ BrowserGlue.prototype = {
|
|||
OS.File.remove(backupFile.path, {ignoreAbsent: true}).catch(ex => Cu.reportError(ex));
|
||||
}
|
||||
|
||||
if (currentUIVersion < 43) {
|
||||
let currentTheme = null;
|
||||
try {
|
||||
currentTheme = Services.prefs.getCharPref("lightweightThemes.selectedThemeID");
|
||||
} catch (e) {}
|
||||
if (currentTheme == "firefox-devedition@mozilla.org") {
|
||||
let newTheme = Services.prefs.getCharPref("devtools.theme") == "dark" ?
|
||||
"firefox-compact-dark@mozilla.org" : "firefox-compact-light@mozilla.org";
|
||||
Services.prefs.setCharPref("lightweightThemes.selectedThemeID", newTheme);
|
||||
}
|
||||
}
|
||||
|
||||
// Update the migration version.
|
||||
Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
|
||||
},
|
||||
|
|
|
@ -85,15 +85,15 @@
|
|||
#else
|
||||
<vbox>
|
||||
#endif
|
||||
<label accesskey="&overridePageColors.accesskey;"
|
||||
control="useDocumentColors">&overridePageColors.label;</label>
|
||||
<label accesskey="&overrideDefaultPageColors.accesskey;"
|
||||
control="useDocumentColors">&overrideDefaultPageColors.label;</label>
|
||||
<menulist id="useDocumentColors" preference="browser.display.document_color_use">
|
||||
<menupopup>
|
||||
<menuitem label="&overridePageColors.always.label;"
|
||||
<menuitem label="&overrideDefaultPageColors.always.label;"
|
||||
value="2" id="documentColorAlways"/>
|
||||
<menuitem label="&overridePageColors.auto.label;"
|
||||
<menuitem label="&overrideDefaultPageColors.auto.label;"
|
||||
value="0" id="documentColorAutomatic"/>
|
||||
<menuitem label="&overridePageColors.never.label;"
|
||||
<menuitem label="&overrideDefaultPageColors.never.label;"
|
||||
value="1" id="documentColorNever"/>
|
||||
</menupopup>
|
||||
</menulist>
|
||||
|
|
|
@ -238,7 +238,7 @@
|
|||
<separator class="groove"/>
|
||||
<hbox>
|
||||
<checkbox id="useDocumentFonts"
|
||||
label="&allowPagesToUse.label;" accesskey="&allowPagesToUse.accesskey;"
|
||||
label="&allowPagesToUseOwn.label;" accesskey="&allowPagesToUseOwn.accesskey;"
|
||||
preference="browser.display.use_document_fonts"
|
||||
onsyncfrompreference="return gFontsDialog.readUseDocumentFonts();"
|
||||
onsynctopreference="return gFontsDialog.writeUseDocumentFonts();"/>
|
||||
|
|
|
@ -167,12 +167,12 @@
|
|||
accesskey="&useCursorNavigation.accesskey;"
|
||||
preference="accessibility.browsewithcaret"/>
|
||||
<checkbox id="searchStartTyping"
|
||||
label="&searchStartTyping.label;"
|
||||
accesskey="&searchStartTyping.accesskey;"
|
||||
label="&searchOnStartTyping.label;"
|
||||
accesskey="&searchOnStartTyping.accesskey;"
|
||||
preference="accessibility.typeaheadfind"/>
|
||||
<checkbox id="blockAutoRefresh"
|
||||
label="&blockAutoRefresh.label;"
|
||||
accesskey="&blockAutoRefresh.accesskey;"
|
||||
label="&blockAutoReload.label;"
|
||||
accesskey="&blockAutoReload.accesskey;"
|
||||
preference="accessibility.blockautorefresh"/>
|
||||
</groupbox>
|
||||
<!-- Browsing -->
|
||||
|
@ -192,8 +192,8 @@
|
|||
accesskey="&allowHWAccel.accesskey;"
|
||||
preference="layers.acceleration.disabled"/>
|
||||
<checkbox id="checkSpelling"
|
||||
label="&checkSpelling.label;"
|
||||
accesskey="&checkSpelling.accesskey;"
|
||||
label="&checkUserSpelling.label;"
|
||||
accesskey="&checkUserSpelling.accesskey;"
|
||||
onsyncfrompreference="return gAdvancedPane.readCheckSpelling();"
|
||||
onsynctopreference="return gAdvancedPane.writeCheckSpelling();"
|
||||
preference="layout.spellcheckDefault"/>
|
||||
|
@ -301,13 +301,13 @@
|
|||
</hbox>
|
||||
<hbox align="center">
|
||||
<checkbox id="offlineNotify"
|
||||
label="&offlineNotify.label;" accesskey="&offlineNotify.accesskey;"
|
||||
label="&offlineStorageNotify.label;" accesskey="&offlineStorageNotify.accesskey;"
|
||||
preference="browser.offline-apps.notify"
|
||||
onsyncfrompreference="return gAdvancedPane.readOfflineNotify();"/>
|
||||
<spacer flex="1"/>
|
||||
<button id="offlineNotifyExceptions"
|
||||
label="&offlineNotifyExceptions.label;"
|
||||
accesskey="&offlineNotifyExceptions.accesskey;"/>
|
||||
label="&offlineStorageNotifyExceptions.label;"
|
||||
accesskey="&offlineStorageNotifyExceptions.accesskey;"/>
|
||||
</hbox>
|
||||
<hbox>
|
||||
<vbox flex="1">
|
||||
|
@ -354,8 +354,8 @@
|
|||
label="&updateAuto1.label;"
|
||||
accesskey="&updateAuto1.accesskey;"/>
|
||||
<radio value="checkOnly"
|
||||
label="&updateCheck.label;"
|
||||
accesskey="&updateCheck.accesskey;"/>
|
||||
label="&updateCheckChoose.label;"
|
||||
accesskey="&updateCheckChoose.accesskey;"/>
|
||||
<radio value="manual"
|
||||
label="&updateManual.label;"
|
||||
accesskey="&updateManual.accesskey;"/>
|
||||
|
@ -388,8 +388,8 @@
|
|||
<!-- Certificates -->
|
||||
<tabpanel id="encryptionPanel" orient="vertical">
|
||||
<groupbox id="certSelection" align="start">
|
||||
<caption><label>&certSelection.label;</label></caption>
|
||||
<description id="CertSelectionDesc" control="certSelection">&certSelection.description;</description>
|
||||
<caption><label>&certPersonal.label;</label></caption>
|
||||
<description id="CertSelectionDesc" control="certSelection">&certPersonal.description;</description>
|
||||
|
||||
<!--
|
||||
The values on these radio buttons may look like l12y issues, but
|
||||
|
@ -400,11 +400,11 @@
|
|||
preftype="string"
|
||||
preference="security.default_personal_cert"
|
||||
aria-labelledby="CertSelectionDesc">
|
||||
<radio label="&certs.auto;"
|
||||
accesskey="&certs.auto.accesskey;"
|
||||
<radio label="&selectCerts.auto;"
|
||||
accesskey="&selectCerts.auto.accesskey;"
|
||||
value="Select Automatically"/>
|
||||
<radio label="&certs.ask;"
|
||||
accesskey="&certs.ask.accesskey;"
|
||||
<radio label="&selectCerts.ask;"
|
||||
accesskey="&selectCerts.ask.accesskey;"
|
||||
value="Ask Every Time"/>
|
||||
</radiogroup>
|
||||
</groupbox>
|
||||
|
|
|
@ -172,13 +172,13 @@
|
|||
class="content-cell-item"
|
||||
preference="browser.startup.page">
|
||||
<menupopup>
|
||||
<menuitem label="&startupHomePage.label;"
|
||||
<menuitem label="&startupUserHomePage.label;"
|
||||
value="1"
|
||||
id="browserStartupHomePage"/>
|
||||
<menuitem label="&startupBlankPage.label;"
|
||||
value="0"
|
||||
id="browserStartupBlank"/>
|
||||
<menuitem label="&startupLastSession.label;"
|
||||
<menuitem label="&startupPrevSession.label;"
|
||||
value="3"
|
||||
id="browserStartupLastSession"/>
|
||||
</menupopup>
|
||||
|
@ -260,8 +260,8 @@
|
|||
<hbox>
|
||||
<radio id="alwaysAsk"
|
||||
value="false"
|
||||
label="&alwaysAsk.label;"
|
||||
accesskey="&alwaysAsk.accesskey;"/>
|
||||
label="&alwaysAskWhere.label;"
|
||||
accesskey="&alwaysAskWhere.accesskey;"/>
|
||||
</hbox>
|
||||
</radiogroup>
|
||||
</groupbox>
|
||||
|
@ -281,16 +281,16 @@
|
|||
onsyncfrompreference="return gMainPane.readLinkTarget();"
|
||||
onsynctopreference="return gMainPane.writeLinkTarget();"/>
|
||||
|
||||
<checkbox id="warnCloseMultiple" label="&warnCloseMultipleTabs.label;"
|
||||
accesskey="&warnCloseMultipleTabs.accesskey;"
|
||||
<checkbox id="warnCloseMultiple" label="&warnOnCloseMultipleTabs.label;"
|
||||
accesskey="&warnOnCloseMultipleTabs.accesskey;"
|
||||
preference="browser.tabs.warnOnClose"/>
|
||||
|
||||
<checkbox id="warnOpenMany" label="&warnOpenManyTabs.label;"
|
||||
accesskey="&warnOpenManyTabs.accesskey;"
|
||||
<checkbox id="warnOpenMany" label="&warnOnOpenManyTabs.label;"
|
||||
accesskey="&warnOnOpenManyTabs.accesskey;"
|
||||
preference="browser.tabs.warnOnOpen"/>
|
||||
|
||||
<checkbox id="switchToNewTabs" label="&switchToNewTabs.label;"
|
||||
accesskey="&switchToNewTabs.accesskey;"
|
||||
<checkbox id="switchToNewTabs" label="&switchLinksToNewTabs.label;"
|
||||
accesskey="&switchLinksToNewTabs.accesskey;"
|
||||
preference="browser.tabs.loadInBackground"/>
|
||||
|
||||
#ifdef XP_WIN
|
||||
|
|
|
@ -62,8 +62,8 @@
|
|||
|
||||
<hbox id="addonInstallBox">
|
||||
<checkbox id="warnAddonInstall"
|
||||
label="&warnAddonInstall.label;"
|
||||
accesskey="&warnAddonInstall.accesskey;"
|
||||
label="&warnOnAddonInstall.label;"
|
||||
accesskey="&warnOnAddonInstall.accesskey;"
|
||||
preference="xpinstall.whitelist.required"
|
||||
onsyncfrompreference="return gSecurityPane.readWarnAddonInstall();"/>
|
||||
<spacer flex="1"/>
|
||||
|
@ -82,8 +82,8 @@
|
|||
label="&blockDownloads.label;"
|
||||
accesskey="&blockDownloads.accesskey;" />
|
||||
<checkbox id="blockUncommonUnwanted"
|
||||
label="&blockUncommonUnwanted.label;"
|
||||
accesskey="&blockUncommonUnwanted.accesskey;" />
|
||||
label="&blockUncommonAndUnwanted.label;"
|
||||
accesskey="&blockUncommonAndUnwanted.accesskey;" />
|
||||
</vbox>
|
||||
</vbox>
|
||||
</groupbox>
|
||||
|
|
|
@ -55,7 +55,6 @@ ACCEPTED_MAR_CHANNEL_IDS=firefox-mozilla-central
|
|||
# The MAR_CHANNEL_ID must not contain the following 3 characters: ",\t "
|
||||
MAR_CHANNEL_ID=firefox-mozilla-central
|
||||
MOZ_PROFILE_MIGRATOR=1
|
||||
MOZ_APP_STATIC_INI=1
|
||||
MOZ_WEBGL_CONFORMANT=1
|
||||
MOZ_JSDOWNLOADS=1
|
||||
MOZ_RUST_MP4PARSE=1
|
||||
|
|
|
@ -6,16 +6,24 @@
|
|||
|
||||
this.EXPORTED_SYMBOLS = ["CleanupManager"];
|
||||
|
||||
const cleanupHandlers = [];
|
||||
const cleanupHandlers = new Set();
|
||||
|
||||
this.CleanupManager = {
|
||||
addCleanupHandler(handler) {
|
||||
cleanupHandlers.push(handler);
|
||||
cleanupHandlers.add(handler);
|
||||
},
|
||||
|
||||
removeCleanupHandler(handler) {
|
||||
cleanupHandlers.delete(handler);
|
||||
},
|
||||
|
||||
cleanup() {
|
||||
for (const handler of cleanupHandlers) {
|
||||
handler();
|
||||
try {
|
||||
handler();
|
||||
} catch (ex) {
|
||||
Cu.reportError(ex);
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
|
@ -100,6 +100,7 @@ this.Heartbeat = class {
|
|||
|
||||
// so event handlers are consistent
|
||||
this.handleWindowClosed = this.handleWindowClosed.bind(this);
|
||||
this.close = this.close.bind(this);
|
||||
|
||||
if (this.options.engagementButtonLabel) {
|
||||
this.buttons = [{
|
||||
|
@ -208,7 +209,7 @@ this.Heartbeat = class {
|
|||
}, surveyDuration);
|
||||
|
||||
this.sandboxManager.addHold("heartbeat");
|
||||
CleanupManager.addCleanupHandler(() => this.close());
|
||||
CleanupManager.addCleanupHandler(this.close);
|
||||
}
|
||||
|
||||
maybeNotifyHeartbeat(name, data = {}) {
|
||||
|
@ -281,10 +282,7 @@ this.Heartbeat = class {
|
|||
this.eventEmitter.emit("TelemetrySent", Cu.cloneInto(payload, this.sandboxManager.sandbox));
|
||||
|
||||
// Survey is complete, clear out the expiry timer & survey configuration
|
||||
if (this.surveyEndTimer) {
|
||||
clearTimeout(this.surveyEndTimer);
|
||||
this.surveyEndTimer = null;
|
||||
}
|
||||
this.endTimerIfPresent("surveyEndTimer");
|
||||
|
||||
this.pingSent = true;
|
||||
this.surveyResults = null;
|
||||
|
@ -315,12 +313,16 @@ this.Heartbeat = class {
|
|||
this.chromeWindow.gBrowser.selectedTab = this.chromeWindow.gBrowser.addTab(this.options.postAnswerUrl.toString());
|
||||
}
|
||||
|
||||
if (this.surveyEndTimer) {
|
||||
clearTimeout(this.surveyEndTimer);
|
||||
this.surveyEndTimer = null;
|
||||
}
|
||||
this.endTimerIfPresent("surveyEndTimer");
|
||||
|
||||
setTimeout(() => this.close(), NOTIFICATION_TIME);
|
||||
this.engagementCloseTimer = setTimeout(() => this.close(), NOTIFICATION_TIME);
|
||||
}
|
||||
|
||||
endTimerIfPresent(timerName) {
|
||||
if (this[timerName]) {
|
||||
clearTimeout(this[timerName]);
|
||||
this[timerName] = null;
|
||||
}
|
||||
}
|
||||
|
||||
handleWindowClosed() {
|
||||
|
@ -333,6 +335,10 @@ this.Heartbeat = class {
|
|||
}
|
||||
|
||||
cleanup() {
|
||||
// Kill the timers which might call things after we've cleaned up:
|
||||
this.endTimerIfPresent("surveyEndTimer");
|
||||
this.endTimerIfPresent("engagementCloseTimer");
|
||||
|
||||
this.sandboxManager.removeHold("heartbeat");
|
||||
// remove listeners
|
||||
this.chromeWindow.removeEventListener("SSWindowClosing", this.handleWindowClosed);
|
||||
|
@ -340,7 +346,10 @@ this.Heartbeat = class {
|
|||
this.chromeWindow = null;
|
||||
this.notificationBox = null;
|
||||
this.notification = null;
|
||||
this.notice = null;
|
||||
this.eventEmitter = null;
|
||||
this.sandboxManager = null;
|
||||
// Ensure we don't re-enter and release the CleanupManager's reference to us:
|
||||
CleanupManager.removeCleanupHandler(this.close);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
[browser_EventEmitter.js]
|
||||
[browser_Storage.js]
|
||||
[browser_Heartbeat.js]
|
||||
skip-if = true # bug 1325409
|
||||
[browser_NormandyApi.js]
|
||||
support-files =
|
||||
test_server.sjs
|
||||
|
|
|
@ -218,6 +218,5 @@ res/table-remove-row-active.gif
|
|||
res/table-remove-row-hover.gif
|
||||
res/table-remove-row.gif
|
||||
# Aurora branding
|
||||
browser/chrome/browser/content/browser/defaultthemes/devedition.icon.png
|
||||
browser/chrome/browser/content/branding/icon64.png
|
||||
browser/chrome/devtools/content/framework/dev-edition-promo/dev-edition-logo.png
|
||||
|
|
|
@ -106,9 +106,13 @@ unsignedAddonsDisabled.message=One or more installed add-ons cannot be verified
|
|||
unsignedAddonsDisabled.learnMore.label=Learn More
|
||||
unsignedAddonsDisabled.learnMore.accesskey=L
|
||||
|
||||
# LOCALIZATION NOTE (deveditionTheme.name): This should be nearly the brand name for aurora.
|
||||
# See browser/branding/aurora/locales/*/brand.properties
|
||||
deveditionTheme.name=Developer Edition
|
||||
# LOCALIZATION NOTE (compactLightTheme.name): This is displayed in about:addons -> Appearance
|
||||
compactLightTheme.name=Compact Light
|
||||
compactLightTheme.description=A compact theme with a light color scheme.
|
||||
|
||||
# LOCALIZATION NOTE (compactDarkTheme.name): This is displayed in about:addons -> Appearance
|
||||
compactDarkTheme.name=Compact Dark
|
||||
compactDarkTheme.description=A compact theme with a dark color scheme.
|
||||
|
||||
# LOCALIZATION NOTE (lwthemeInstallRequest.message): %S will be replaced with
|
||||
# the host name of the site.
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
|
||||
<!ENTITY useCursorNavigation.label "Always use the cursor keys to navigate within pages">
|
||||
<!ENTITY useCursorNavigation.accesskey "c">
|
||||
<!ENTITY searchStartTyping.label "Search for text when I start typing">
|
||||
<!ENTITY searchStartTyping.accesskey "x">
|
||||
<!ENTITY blockAutoRefresh.label "Warn me when websites try to redirect or reload the page">
|
||||
<!ENTITY blockAutoRefresh.accesskey "b">
|
||||
<!ENTITY searchOnStartTyping.label "Search for text when you start typing">
|
||||
<!ENTITY searchOnStartTyping.accesskey "x">
|
||||
<!ENTITY blockAutoReload.label "Warn you when websites try to redirect or reload the page">
|
||||
<!ENTITY blockAutoReload.accesskey "b">
|
||||
<!ENTITY useOnScreenKeyboard.label "Show a touch keyboard when necessary">
|
||||
<!ENTITY useOnScreenKeyboard.accesskey "k">
|
||||
|
||||
|
@ -25,8 +25,8 @@
|
|||
<!ENTITY useSmoothScrolling.accesskey "m">
|
||||
<!ENTITY allowHWAccel.label "Use hardware acceleration when available">
|
||||
<!ENTITY allowHWAccel.accesskey "r">
|
||||
<!ENTITY checkSpelling.label "Check my spelling as I type">
|
||||
<!ENTITY checkSpelling.accesskey "t">
|
||||
<!ENTITY checkUserSpelling.label "Check your spelling as you type">
|
||||
<!ENTITY checkUserSpelling.accesskey "t">
|
||||
|
||||
<!ENTITY dataChoicesTab.label "Data Choices">
|
||||
|
||||
|
@ -85,8 +85,8 @@
|
|||
<!ENTITY updateApplication.label "&brandShortName; updates">
|
||||
<!ENTITY updateAuto1.label "Automatically install updates (recommended: improved security)">
|
||||
<!ENTITY updateAuto1.accesskey "A">
|
||||
<!ENTITY updateCheck.label "Check for updates, but let me choose whether to install them">
|
||||
<!ENTITY updateCheck.accesskey "C">
|
||||
<!ENTITY updateCheckChoose.label "Check for updates, but let you choose whether to install them">
|
||||
<!ENTITY updateCheckChoose.accesskey "C">
|
||||
<!ENTITY updateManual.label "Never check for updates (not recommended: security risk)">
|
||||
<!ENTITY updateManual.accesskey "N">
|
||||
|
||||
|
@ -100,10 +100,10 @@
|
|||
<!ENTITY enableSearchUpdate.label "Search Engines">
|
||||
<!ENTITY enableSearchUpdate.accesskey "E">
|
||||
|
||||
<!ENTITY offlineNotify.label "Tell me when a website asks to store data for offline use">
|
||||
<!ENTITY offlineNotify.accesskey "T">
|
||||
<!ENTITY offlineNotifyExceptions.label "Exceptions…">
|
||||
<!ENTITY offlineNotifyExceptions.accesskey "x">
|
||||
<!ENTITY offlineStorageNotify.label "Tell you when a website asks to store data for offline use">
|
||||
<!ENTITY offlineStorageNotify.accesskey "T">
|
||||
<!ENTITY offlineStorageNotifyExceptions.label "Exceptions…">
|
||||
<!ENTITY offlineStorageNotifyExceptions.accesskey "x">
|
||||
|
||||
<!ENTITY offlineAppsList2.label "The following websites are allowed to store data for offline use:">
|
||||
<!ENTITY offlineAppsList.height "7em">
|
||||
|
@ -112,12 +112,12 @@
|
|||
<!ENTITY offlineAppRemove.confirm "Remove offline data">
|
||||
|
||||
<!ENTITY certificateTab.label "Certificates">
|
||||
<!ENTITY certSelection.label "Requests">
|
||||
<!ENTITY certSelection.description "When a server requests my personal certificate:">
|
||||
<!ENTITY certs.auto "Select one automatically">
|
||||
<!ENTITY certs.auto.accesskey "S">
|
||||
<!ENTITY certs.ask "Ask me every time">
|
||||
<!ENTITY certs.ask.accesskey "A">
|
||||
<!ENTITY certPersonal.label "Requests">
|
||||
<!ENTITY certPersonal.description "When a server requests your personal certificate:">
|
||||
<!ENTITY selectCerts.auto "Select one automatically">
|
||||
<!ENTITY selectCerts.auto.accesskey "S">
|
||||
<!ENTITY selectCerts.ask "Ask you every time">
|
||||
<!ENTITY selectCerts.ask.accesskey "A">
|
||||
<!ENTITY enableOCSP.label "Query OCSP responder servers to confirm the current validity of certificates">
|
||||
<!ENTITY enableOCSP.accesskey "Q">
|
||||
<!ENTITY viewCerts.label "View Certificates">
|
||||
|
|
|
@ -6,12 +6,12 @@
|
|||
<!ENTITY window.width "38em">
|
||||
<!ENTITY window.macWidth "41em">
|
||||
|
||||
<!ENTITY overridePageColors.label "Override the colors specified by the page with my selections above:">
|
||||
<!ENTITY overridePageColors.accesskey "O">
|
||||
<!ENTITY overrideDefaultPageColors.label "Override the colors specified by the page with your selections above:">
|
||||
<!ENTITY overrideDefaultPageColors.accesskey "O">
|
||||
|
||||
<!ENTITY overridePageColors.always.label "Always">
|
||||
<!ENTITY overridePageColors.auto.label "Only with High Contrast themes">
|
||||
<!ENTITY overridePageColors.never.label "Never">
|
||||
<!ENTITY overrideDefaultPageColors.always.label "Always">
|
||||
<!ENTITY overrideDefaultPageColors.auto.label "Only with High Contrast themes">
|
||||
<!ENTITY overrideDefaultPageColors.never.label "Never">
|
||||
|
||||
<!ENTITY color "Text and Background">
|
||||
<!ENTITY textColor.label "Text:">
|
||||
|
|
|
@ -61,8 +61,8 @@
|
|||
<!ENTITY useDefaultFontSerif.label "Serif">
|
||||
<!ENTITY useDefaultFontSansSerif.label "Sans Serif">
|
||||
|
||||
<!ENTITY allowPagesToUse.label "Allow pages to choose their own fonts, instead of my selections above">
|
||||
<!ENTITY allowPagesToUse.accesskey "A">
|
||||
<!ENTITY allowPagesToUseOwn.label "Allow pages to choose their own fonts, instead of your selections above">
|
||||
<!ENTITY allowPagesToUseOwn.accesskey "A">
|
||||
|
||||
<!ENTITY languages.customize.Fallback2.grouplabel "Text Encoding for Legacy Content">
|
||||
<!ENTITY languages.customize.Fallback2.label "Fallback Text Encoding:">
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
<!ENTITY startupPage.label "When &brandShortName; starts:">
|
||||
<!ENTITY startupPage.accesskey "s">
|
||||
<!ENTITY startupHomePage.label "Show my home page">
|
||||
<!ENTITY startupUserHomePage.label "Show your home page">
|
||||
<!ENTITY startupBlankPage.label "Show a blank page">
|
||||
<!ENTITY startupLastSession.label "Show my windows and tabs from last time">
|
||||
<!ENTITY startupPrevSession.label "Show your windows and tabs from last time">
|
||||
|
||||
<!ENTITY homepage.label "Home Page:">
|
||||
<!ENTITY homepage.accesskey "P">
|
||||
|
@ -28,8 +28,8 @@
|
|||
<!ENTITY chooseFolderWin.accesskey "o">
|
||||
<!ENTITY chooseFolderMac.label "Choose…">
|
||||
<!ENTITY chooseFolderMac.accesskey "e">
|
||||
<!ENTITY alwaysAsk.label "Always ask me where to save files">
|
||||
<!ENTITY alwaysAsk.accesskey "A">
|
||||
<!ENTITY alwaysAskWhere.label "Always ask you where to save files">
|
||||
<!ENTITY alwaysAskWhere.accesskey "A">
|
||||
|
||||
<!ENTITY alwaysCheckDefault2.label "Always check if &brandShortName; is your default browser">
|
||||
<!ENTITY alwaysCheckDefault2.accesskey "y">
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
|
||||
<!ENTITY general.label "General">
|
||||
|
||||
<!ENTITY warnAddonInstall.label "Warn me when sites try to install add-ons">
|
||||
<!ENTITY warnAddonInstall.accesskey "W">
|
||||
<!ENTITY warnOnAddonInstall.label "Warn you when sites try to install add-ons">
|
||||
<!ENTITY warnOnAddonInstall.accesskey "W">
|
||||
|
||||
<!-- LOCALIZATION NOTE (enableSafeBrowsing.label, blockDownloads.label, blockUncommonUnwanted.label):
|
||||
It is important that wording follows the guidelines outlined on this page:
|
||||
|
@ -17,8 +17,8 @@
|
|||
<!ENTITY blockDownloads.label "Block dangerous downloads">
|
||||
<!ENTITY blockDownloads.accesskey "D">
|
||||
|
||||
<!ENTITY blockUncommonUnwanted.label "Warn me about unwanted and uncommon software">
|
||||
<!ENTITY blockUncommonUnwanted.accesskey "C">
|
||||
<!ENTITY blockUncommonAndUnwanted.label "Warn you about unwanted and uncommon software">
|
||||
<!ENTITY blockUncommonAndUnwanted.accesskey "C">
|
||||
|
||||
<!ENTITY addonExceptions.label "Exceptions…">
|
||||
<!ENTITY addonExceptions.accesskey "E">
|
||||
|
|
|
@ -8,14 +8,14 @@
|
|||
<!ENTITY newWindowsAsTabs.label "Open new windows in a new tab instead">
|
||||
<!ENTITY newWindowsAsTabs.accesskey "w">
|
||||
|
||||
<!ENTITY warnCloseMultipleTabs.label "Warn me when closing multiple tabs">
|
||||
<!ENTITY warnCloseMultipleTabs.accesskey "m">
|
||||
<!ENTITY warnOnCloseMultipleTabs.label "Warn you when closing multiple tabs">
|
||||
<!ENTITY warnOnCloseMultipleTabs.accesskey "m">
|
||||
|
||||
<!ENTITY warnOpenManyTabs.label "Warn me when opening multiple tabs might slow down &brandShortName;">
|
||||
<!ENTITY warnOpenManyTabs.accesskey "d">
|
||||
<!ENTITY warnOnOpenManyTabs.label "Warn you when opening multiple tabs might slow down &brandShortName;">
|
||||
<!ENTITY warnOnOpenManyTabs.accesskey "d">
|
||||
|
||||
<!ENTITY switchToNewTabs.label "When I open a link in a new tab, switch to it immediately">
|
||||
<!ENTITY switchToNewTabs.accesskey "h">
|
||||
<!ENTITY switchLinksToNewTabs.label "When you open a link in a new tab, switch to it immediately">
|
||||
<!ENTITY switchLinksToNewTabs.accesskey "h">
|
||||
|
||||
<!ENTITY showTabsInTaskbar.label "Show tab previews in the Windows taskbar">
|
||||
<!ENTITY showTabsInTaskbar.accesskey "k">
|
||||
|
|
|
@ -471,7 +471,7 @@ this.TabCrashHandler = {
|
|||
};
|
||||
|
||||
if (emailMe) {
|
||||
data.email = this.prefs.getCharPref("email", "");
|
||||
data.email = this.prefs.getCharPref("email");
|
||||
}
|
||||
|
||||
// Make sure to only count once even if there are multiple windows
|
||||
|
|
|
@ -28,12 +28,16 @@ add_task(function* setup() {
|
|||
["toolkit.telemetry.enabled", true] // And Extended Telemetry to be enabled.
|
||||
]});
|
||||
|
||||
// Enable event recording for the events tested here.
|
||||
Services.telemetry.setEventRecordingEnabled("navigation", true);
|
||||
|
||||
// Make sure to restore the engine once we're done.
|
||||
registerCleanupFunction(function* () {
|
||||
Services.search.currentEngine = originalEngine;
|
||||
Services.search.removeEngine(engineDefault);
|
||||
Services.search.removeEngine(engineOneOff);
|
||||
yield PlacesTestUtils.clearHistory();
|
||||
Services.telemetry.setEventRecordingEnabled("navigation", false);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -30,12 +30,16 @@ add_task(function* setup() {
|
|||
// Enable Extended Telemetry.
|
||||
yield SpecialPowers.pushPrefEnv({"set": [["toolkit.telemetry.enabled", true]]});
|
||||
|
||||
// Enable event recording for the events tested here.
|
||||
Services.telemetry.setEventRecordingEnabled("navigation", true);
|
||||
|
||||
// Make sure to restore the engine once we're done.
|
||||
registerCleanupFunction(function* () {
|
||||
Services.search.currentEngine = originalEngine;
|
||||
Services.search.removeEngine(engineDefault);
|
||||
Services.search.removeEngine(engineOneOff);
|
||||
yield PlacesTestUtils.clearHistory();
|
||||
Services.telemetry.setEventRecordingEnabled("navigation", false);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -70,11 +70,15 @@ add_task(function* setup() {
|
|||
// Enable Extended Telemetry.
|
||||
yield SpecialPowers.pushPrefEnv({"set": [["toolkit.telemetry.enabled", true]]});
|
||||
|
||||
// Enable event recording for the events tested here.
|
||||
Services.telemetry.setEventRecordingEnabled("navigation", true);
|
||||
|
||||
// Make sure to restore the engine once we're done.
|
||||
registerCleanupFunction(function* () {
|
||||
Services.search.currentEngine = originalEngine;
|
||||
Services.search.removeEngine(engineDefault);
|
||||
Services.search.removeEngine(engineOneOff);
|
||||
Services.telemetry.setEventRecordingEnabled("navigation", false);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -81,14 +81,18 @@ add_task(function* setup() {
|
|||
let oldCanRecord = Services.telemetry.canRecordExtended;
|
||||
Services.telemetry.canRecordExtended = true;
|
||||
|
||||
// Enable event recording for the events tested here.
|
||||
Services.telemetry.setEventRecordingEnabled("navigation", true);
|
||||
|
||||
// Make sure to restore the engine once we're done.
|
||||
registerCleanupFunction(function* () {
|
||||
Services.telemetry.canRecordExtended = oldCanRecord;
|
||||
Services.search.currentEngine = originalEngine;
|
||||
Services.search.removeEngine(engine);
|
||||
Services.prefs.clearUserPref(SUGGEST_URLBAR_PREF, true);
|
||||
Services.prefs.clearUserPref(SUGGEST_URLBAR_PREF);
|
||||
Services.prefs.clearUserPref(ONEOFF_URLBAR_PREF);
|
||||
yield PlacesTestUtils.clearHistory();
|
||||
Services.telemetry.setEventRecordingEnabled("navigation", false);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
% License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
% file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
%include ../shared/devedition.inc.css
|
||||
%include ../shared/compacttheme.inc.css
|
||||
|
||||
:root {
|
||||
--forwardbutton-width: 29px;
|
||||
}
|
||||
|
||||
:root[devtoolstheme="light"] {
|
||||
:root:-moz-lwtheme-darktext {
|
||||
--urlbar-dropmarker-url: url("chrome://browser/skin/devedition/urlbar-history-dropmarker.svg");
|
||||
--urlbar-dropmarker-region: rect(0px, 11px, 14px, 0px);
|
||||
--urlbar-dropmarker-hover-region: rect(0, 22px, 14px, 11px);
|
||||
|
@ -19,8 +19,8 @@
|
|||
--urlbar-dropmarker-active-2x-region: rect(0px, 33px, 14px, 22px);
|
||||
}
|
||||
|
||||
:root[devtoolstheme="dark"] .findbar-closebutton:not(:hover),
|
||||
:root[devtoolstheme="dark"] #sidebar-header > .close-icon:not(:hover),
|
||||
.findbar-closebutton:-moz-lwtheme-brighttext:not(:hover),
|
||||
#sidebar-header > .close-icon:-moz-lwtheme-brighttext:not(:hover),
|
||||
.tab-close-button[selected]:not(:hover) {
|
||||
background-image: -moz-image-rect(url("chrome://global/skin/icons/close.svg"), 0, 80, 16, 64);
|
||||
}
|
|
@ -11,7 +11,7 @@ browser.jar:
|
|||
skin/classic/browser/aboutSyncTabs.css
|
||||
* skin/classic/browser/syncedtabs/sidebar.css (syncedtabs/sidebar.css)
|
||||
* skin/classic/browser/browser.css
|
||||
* skin/classic/browser/devedition.css
|
||||
* skin/classic/browser/compacttheme.css
|
||||
* skin/classic/browser/browser-lightweightTheme.css
|
||||
skin/classic/browser/click-to-play-warning-stripes.png
|
||||
skin/classic/browser/Info.png
|
||||
|
@ -79,8 +79,6 @@ browser.jar:
|
|||
skin/classic/browser/preferences/applications.css (preferences/applications.css)
|
||||
skin/classic/browser/social/services-16.png (social/services-16.png)
|
||||
skin/classic/browser/social/services-64.png (social/services-64.png)
|
||||
skin/classic/browser/social/share-button.png (social/share-button.png)
|
||||
skin/classic/browser/social/share-button-active.png (social/share-button-active.png)
|
||||
skin/classic/browser/tabbrowser/alltabs.png (tabbrowser/alltabs.png)
|
||||
skin/classic/browser/tabbrowser/alltabs-inverted.png (tabbrowser/alltabs-inverted.png)
|
||||
skin/classic/browser/tabbrowser/newtab.svg (tabbrowser/newtab.svg)
|
||||
|
|
Двоичные данные
browser/themes/linux/social/share-button-active.png
До Ширина: | Высота: | Размер: 1.3 KiB |
Двоичные данные
browser/themes/linux/social/share-button.png
До Ширина: | Высота: | Размер: 1.3 KiB |
|
@ -2,7 +2,7 @@
|
|||
% License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
% file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
%include ../shared/devedition.inc.css
|
||||
%include ../shared/compacttheme.inc.css
|
||||
|
||||
:root {
|
||||
--forwardbutton-width: 32px;
|
||||
|
@ -106,14 +106,14 @@
|
|||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
:root[devtoolstheme="dark"] .findbar-closebutton:not(:hover),
|
||||
.findbar-closebutton:-moz-lwtheme-brighttext:not(:hover),
|
||||
/* Tab styling - make sure to use an inverted icon for the selected tab
|
||||
(brighttext only covers the unselected tabs) */
|
||||
.tab-close-button[selected=true]:not(:hover) {
|
||||
-moz-image-region: rect(0, 64px, 16px, 48px);
|
||||
}
|
||||
@media (min-resolution: 2dppx) {
|
||||
:root[devtoolstheme="dark"] .findbar-closebutton:not(:hover),
|
||||
.findbar-closebutton:-moz-lwtheme-brighttext :not(:hover),
|
||||
.tab-close-button[selected=true]:not(:hover) {
|
||||
-moz-image-region: rect(0, 128px, 32px, 96px);
|
||||
}
|
|
@ -10,7 +10,7 @@ browser.jar:
|
|||
skin/classic/browser/aboutSyncTabs.css
|
||||
* skin/classic/browser/syncedtabs/sidebar.css (syncedtabs/sidebar.css)
|
||||
* skin/classic/browser/browser.css
|
||||
* skin/classic/browser/devedition.css
|
||||
* skin/classic/browser/compacttheme.css
|
||||
* skin/classic/browser/browser-lightweightTheme.css
|
||||
skin/classic/browser/click-to-play-warning-stripes.png
|
||||
skin/classic/browser/Info.png
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
% License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
% file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
/* devedition.css is loaded in browser.xul after browser.css when it is
|
||||
/* compacttheme.css is loaded in browser.xul after browser.css when it is
|
||||
preffed on. The bulk of the styling is here in the shared file, but
|
||||
there are overrides for each platform in their devedition.css files. */
|
||||
there are overrides for each platform in their compacttheme.css files. */
|
||||
|
||||
:root {
|
||||
--tab-toolbar-navbar-overlap: 0px;
|
||||
|
@ -14,7 +14,7 @@
|
|||
--backbutton-urlbar-overlap: 0px;
|
||||
}
|
||||
|
||||
:root[devtoolstheme="dark"] {
|
||||
:root:-moz-lwtheme-brighttext {
|
||||
/* Chrome */
|
||||
--chrome-background-color: #272b35;
|
||||
--chrome-color: #F5F7FA;
|
||||
|
@ -50,8 +50,8 @@
|
|||
}
|
||||
|
||||
/* Override the lwtheme-specific styling for toolbar buttons */
|
||||
:root[devtoolstheme="dark"],
|
||||
:root[devtoolstheme="dark"] toolbar:-moz-lwtheme {
|
||||
:root:-moz-lwtheme-brighttext,
|
||||
toolbar:-moz-lwtheme-brighttext {
|
||||
--toolbarbutton-hover-background: rgba(25,33, 38,.6) linear-gradient(rgba(25,33,38,.6), rgba(25,33,38,.6)) padding-box;
|
||||
--toolbarbutton-hover-boxshadow: none;
|
||||
--toolbarbutton-hover-bordercolor: rgba(25,33,38,.6);
|
||||
|
@ -62,7 +62,7 @@
|
|||
|
||||
}
|
||||
|
||||
:root[devtoolstheme="light"] {
|
||||
:root:-moz-lwtheme-darktext {
|
||||
--url-and-searchbar-background-color: #fff;
|
||||
|
||||
--chrome-background-color: #E3E4E6;
|
||||
|
@ -85,8 +85,8 @@
|
|||
}
|
||||
|
||||
/* Override the lwtheme-specific styling for toolbar buttons */
|
||||
:root[devtoolstheme="light"],
|
||||
:root[devtoolstheme="light"] toolbar:-moz-lwtheme {
|
||||
:root:-moz-lwtheme-darktext,
|
||||
toolbar:-moz-lwtheme-darktext {
|
||||
--toolbarbutton-hover-background: #eaeaea;
|
||||
--toolbarbutton-hover-boxshadow: none;
|
||||
--toolbarbutton-hover-bordercolor: rgba(0,0,0,0.1);
|
||||
|
@ -197,8 +197,7 @@ toolbar[brighttext] #downloads-indicator-counter {
|
|||
}
|
||||
|
||||
%filter substitution
|
||||
%define selectorPrefix :root[devtoolstheme="dark"]
|
||||
%define selectorSuffix :-moz-lwtheme
|
||||
%define selectorSuffix :-moz-lwtheme-brighttext
|
||||
%define iconVariant -white
|
||||
%include identity-block/icons.inc.css
|
||||
|
||||
|
@ -213,11 +212,11 @@ window:not([chromehidden~="toolbar"]) #urlbar-wrapper {
|
|||
margin-inline-start: 0;
|
||||
}
|
||||
|
||||
:root[devtoolstheme="dark"] #urlbar-zoom-button:hover {
|
||||
#urlbar-zoom-button:-moz-lwtheme-brighttext:hover {
|
||||
background-color: rgba(255,255,255,.2);
|
||||
}
|
||||
|
||||
:root[devtoolstheme="dark"] #urlbar-zoom-button:hover:active {
|
||||
#urlbar-zoom-button:-moz-lwtheme-brighttext:hover:active {
|
||||
background-color: rgba(255,255,255,.3);
|
||||
}
|
||||
|
|
@ -4,59 +4,59 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
%endif
|
||||
|
||||
@selectorPrefix@#identity-icon@selectorSuffix@ {
|
||||
#identity-icon@selectorSuffix@ {
|
||||
list-style-image: url(chrome://browser/skin/identity-icon.svg#normal@iconVariant@);
|
||||
}
|
||||
|
||||
@selectorPrefix@#identity-box:hover > #identity-icon:not(.no-hover)@selectorSuffix@,
|
||||
@selectorPrefix@#identity-box[open=true] > #identity-icon@selectorSuffix@ {
|
||||
#identity-box:hover > #identity-icon:not(.no-hover)@selectorSuffix@,
|
||||
#identity-box[open=true] > #identity-icon@selectorSuffix@ {
|
||||
list-style-image: url(chrome://browser/skin/identity-icon.svg#hover@iconVariant@);
|
||||
}
|
||||
|
||||
@selectorPrefix@#identity-box.grantedPermissions > #identity-icon@selectorSuffix@ {
|
||||
#identity-box.grantedPermissions > #identity-icon@selectorSuffix@ {
|
||||
list-style-image: url(chrome://browser/skin/identity-icon.svg#notice@iconVariant@);
|
||||
}
|
||||
|
||||
@selectorPrefix@#identity-box.grantedPermissions:hover > #identity-icon:not(.no-hover)@selectorSuffix@,
|
||||
@selectorPrefix@#identity-box.grantedPermissions[open=true] > #identity-icon@selectorSuffix@ {
|
||||
#identity-box.grantedPermissions:hover > #identity-icon:not(.no-hover)@selectorSuffix@,
|
||||
#identity-box.grantedPermissions[open=true] > #identity-icon@selectorSuffix@ {
|
||||
list-style-image: url(chrome://browser/skin/identity-icon.svg#notice-hover@iconVariant@);
|
||||
}
|
||||
|
||||
@selectorPrefix@#urlbar[pageproxystate="valid"] > #identity-box.chromeUI > #identity-icon@selectorSuffix@ {
|
||||
#urlbar[pageproxystate="valid"] > #identity-box.chromeUI > #identity-icon@selectorSuffix@ {
|
||||
list-style-image: url(chrome://branding/content/identity-icons-brand.svg);
|
||||
}
|
||||
|
||||
|
||||
@selectorPrefix@#tracking-protection-icon@selectorSuffix@ {
|
||||
#tracking-protection-icon@selectorSuffix@ {
|
||||
list-style-image: url(chrome://browser/skin/tracking-protection-16.svg#enabled@iconVariant@);
|
||||
}
|
||||
|
||||
@selectorPrefix@#tracking-protection-icon[state="loaded-tracking-content"]@selectorSuffix@ {
|
||||
#tracking-protection-icon[state="loaded-tracking-content"]@selectorSuffix@ {
|
||||
list-style-image: url(chrome://browser/skin/tracking-protection-16.svg#disabled@iconVariant@);
|
||||
}
|
||||
|
||||
|
||||
@selectorPrefix@#urlbar[pageproxystate="valid"] > #identity-box.verifiedDomain > #connection-icon@selectorSuffix@,
|
||||
@selectorPrefix@#urlbar[pageproxystate="valid"] > #identity-box.verifiedIdentity > #connection-icon@selectorSuffix@,
|
||||
@selectorPrefix@#urlbar[pageproxystate="valid"] > #identity-box.mixedActiveBlocked > #connection-icon@selectorSuffix@ {
|
||||
#urlbar[pageproxystate="valid"] > #identity-box.verifiedDomain > #connection-icon@selectorSuffix@,
|
||||
#urlbar[pageproxystate="valid"] > #identity-box.verifiedIdentity > #connection-icon@selectorSuffix@,
|
||||
#urlbar[pageproxystate="valid"] > #identity-box.mixedActiveBlocked > #connection-icon@selectorSuffix@ {
|
||||
list-style-image: url(chrome://browser/skin/connection-secure.svg);
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
@selectorPrefix@#urlbar[pageproxystate="valid"] > #identity-box.certUserOverridden > #connection-icon@selectorSuffix@ {
|
||||
#urlbar[pageproxystate="valid"] > #identity-box.certUserOverridden > #connection-icon@selectorSuffix@ {
|
||||
list-style-image: url(chrome://browser/skin/connection-mixed-passive-loaded.svg#icon@iconVariant@);
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
@selectorPrefix@#urlbar[pageproxystate="valid"] > #identity-box.insecureLoginForms > #connection-icon@selectorSuffix@,
|
||||
@selectorPrefix@#urlbar[pageproxystate="valid"] > #identity-box.mixedActiveContent > #connection-icon@selectorSuffix@ {
|
||||
#urlbar[pageproxystate="valid"] > #identity-box.insecureLoginForms > #connection-icon@selectorSuffix@,
|
||||
#urlbar[pageproxystate="valid"] > #identity-box.mixedActiveContent > #connection-icon@selectorSuffix@ {
|
||||
list-style-image: url(chrome://browser/skin/connection-mixed-active-loaded.svg#icon@iconVariant@);
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
@selectorPrefix@#urlbar[pageproxystate="valid"] > #identity-box.weakCipher > #connection-icon@selectorSuffix@,
|
||||
@selectorPrefix@#urlbar[pageproxystate="valid"] > #identity-box.mixedDisplayContent > #connection-icon@selectorSuffix@,
|
||||
@selectorPrefix@#urlbar[pageproxystate="valid"] > #identity-box.mixedDisplayContentLoadedActiveBlocked > #connection-icon@selectorSuffix@ {
|
||||
#urlbar[pageproxystate="valid"] > #identity-box.weakCipher > #connection-icon@selectorSuffix@,
|
||||
#urlbar[pageproxystate="valid"] > #identity-box.mixedDisplayContent > #connection-icon@selectorSuffix@,
|
||||
#urlbar[pageproxystate="valid"] > #identity-box.mixedDisplayContentLoadedActiveBlocked > #connection-icon@selectorSuffix@ {
|
||||
list-style-image: url(chrome://browser/skin/connection-mixed-passive-loaded.svg#icon@iconVariant@);
|
||||
visibility: visible;
|
||||
}
|
||||
|
|
|
@ -6,12 +6,10 @@
|
|||
|
||||
%filter substitution
|
||||
|
||||
%define selectorPrefix
|
||||
%define selectorSuffix
|
||||
%define iconVariant
|
||||
%include icons.inc.css
|
||||
|
||||
%define selectorPrefix
|
||||
%define selectorSuffix :-moz-lwtheme
|
||||
%define iconVariant -black
|
||||
%include icons.inc.css
|
||||
|
|
|
@ -187,7 +187,7 @@ toolbar:-moz-lwtheme {
|
|||
@media (-moz-windows-compositor: 0),
|
||||
(-moz-windows-default-theme: 0) {
|
||||
/* Please keep the menu text colors in this media block in sync with
|
||||
* devedition.css, minus the :not(:-moz-lwtheme) condition - see Bug 1165718.
|
||||
* compacttheme.css, minus the :not(:-moz-lwtheme) condition - see Bug 1165718.
|
||||
*/
|
||||
#main-window[tabsintitlebar]:not([inFullscreen]) #toolbar-menubar:not(:-moz-lwtheme),
|
||||
#main-window[tabsintitlebar]:not([inFullscreen]) #TabsToolbar:not(:-moz-lwtheme) {
|
||||
|
|
|
@ -2,14 +2,10 @@
|
|||
% License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
% file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
%include ../shared/devedition.inc.css
|
||||
%include ../shared/compacttheme.inc.css
|
||||
|
||||
:root {
|
||||
--forwardbutton-width: 29px;
|
||||
}
|
||||
|
||||
:root[devtoolstheme="dark"],
|
||||
:root[devtoolstheme="light"] {
|
||||
/* Matches the #browser-border-start, #browser-border-end color */
|
||||
--chrome-nav-bar-separator-color: rgba(10, 31, 51, 0.35);
|
||||
}
|
||||
|
@ -100,8 +96,8 @@
|
|||
text-shadow: none !important;
|
||||
}
|
||||
|
||||
:root[devtoolstheme="dark"] .findbar-closebutton,
|
||||
:root[devtoolstheme="dark"] #sidebar-header > .close-icon,
|
||||
.findbar-closebutton:-moz-lwtheme-brighttext,
|
||||
#sidebar-header > .close-icon:-moz-lwtheme-brighttext,
|
||||
/* Tab styling - make sure to use an inverted icon for the selected tab
|
||||
(brighttext only covers the unselected tabs) */
|
||||
.tab-close-button[selected=true] {
|
||||
|
@ -109,8 +105,8 @@
|
|||
}
|
||||
|
||||
@media (min-resolution: 1.1dppx) {
|
||||
:root[devtoolstheme="dark"] .findbar-closebutton,
|
||||
:root[devtoolstheme="dark"] #sidebar-header > .close-icon,
|
||||
.findbar-closebutton:-moz-lwtheme-brighttext,
|
||||
#sidebar-header > .close-icon:-moz-lwtheme-brighttext,
|
||||
.tab-close-button[selected=true] {
|
||||
list-style-image: url("chrome://global/skin/icons/close-inverted@2x.png");
|
||||
}
|
||||
|
@ -279,34 +275,33 @@
|
|||
}
|
||||
|
||||
/* Force white caption buttons for the dark theme on Windows 10 */
|
||||
:root[devtoolstheme="dark"] #titlebar-min {
|
||||
#titlebar-min:-moz-lwtheme-brighttext {
|
||||
list-style-image: url(chrome://browser/skin/caption-buttons.svg#minimize-white);
|
||||
}
|
||||
:root[devtoolstheme="dark"] #titlebar-max {
|
||||
#titlebar-max:-moz-lwtheme-brighttext {
|
||||
list-style-image: url(chrome://browser/skin/caption-buttons.svg#maximize-white);
|
||||
}
|
||||
#main-window[devtoolstheme="dark"][sizemode="maximized"] #titlebar-max {
|
||||
#main-window[sizemode="maximized"] #titlebar-max:-moz-lwtheme-brighttext {
|
||||
list-style-image: url(chrome://browser/skin/caption-buttons.svg#restore-white);
|
||||
}
|
||||
:root[devtoolstheme="dark"] #titlebar-close {
|
||||
#titlebar-close:-moz-lwtheme-brighttext {
|
||||
list-style-image: url(chrome://browser/skin/caption-buttons.svg#close-white);
|
||||
}
|
||||
|
||||
/* ... and normal ones for the light theme on Windows 10 */
|
||||
:root[devtoolstheme="light"] #titlebar-min {
|
||||
#titlebar-min:-moz-lwtheme-darktext {
|
||||
list-style-image: url(chrome://browser/skin/caption-buttons.svg#minimize);
|
||||
}
|
||||
:root[devtoolstheme="light"] #titlebar-max {
|
||||
#titlebar-max:-moz-lwtheme-darktext {
|
||||
list-style-image: url(chrome://browser/skin/caption-buttons.svg#maximize);
|
||||
}
|
||||
#main-window[devtoolstheme="light"][sizemode="maximized"] #titlebar-max {
|
||||
#main-window[sizemode="maximized"] #titlebar-max:-moz-lwtheme-darktext {
|
||||
list-style-image: url(chrome://browser/skin/caption-buttons.svg#restore);
|
||||
}
|
||||
:root[devtoolstheme="light"] #titlebar-close {
|
||||
#titlebar-close:-moz-lwtheme-darktext {
|
||||
list-style-image: url(chrome://browser/skin/caption-buttons.svg#close);
|
||||
}
|
||||
|
||||
:root[devtoolstheme="light"] #titlebar-close:hover {
|
||||
#titlebar-close:-moz-lwtheme-darktext:hover {
|
||||
list-style-image: url(chrome://browser/skin/caption-buttons.svg#close-white);
|
||||
}
|
||||
}
|
|
@ -10,7 +10,7 @@ browser.jar:
|
|||
skin/classic/browser/aboutSyncTabs.css
|
||||
* skin/classic/browser/syncedtabs/sidebar.css (syncedtabs/sidebar.css)
|
||||
* skin/classic/browser/browser.css
|
||||
* skin/classic/browser/devedition.css
|
||||
* skin/classic/browser/compacttheme.css
|
||||
* skin/classic/browser/browser-lightweightTheme.css
|
||||
skin/classic/browser/caption-buttons.svg
|
||||
skin/classic/browser/click-to-play-warning-stripes.png
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#if MOZ_APP_STATIC_INI
|
||||
#ifdef MOZ_BUILD_APP_IS_BROWSER
|
||||
; This file is not used. If you modify it and want the application to use
|
||||
; your modifications, move it under the browser/ subdirectory and start with
|
||||
|
@ -8,7 +7,6 @@
|
|||
; your modifications, start with the "-app /path/to/application.ini"
|
||||
; argument.
|
||||
#endif
|
||||
#endif
|
||||
#if 0
|
||||
; This Source Code Form is subject to the terms of the Mozilla Public
|
||||
; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
|
|
|
@ -53,6 +53,7 @@ SEARCH_PATHS = [
|
|||
'python/slugid',
|
||||
'python/py',
|
||||
'python/pytest',
|
||||
'python/pytoml',
|
||||
'python/redo',
|
||||
'python/voluptuous',
|
||||
'build',
|
||||
|
|
|
@ -1,455 +0,0 @@
|
|||
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
# You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
import datetime
|
||||
import mozcrash
|
||||
import threading
|
||||
import os
|
||||
import posixpath
|
||||
import Queue
|
||||
import re
|
||||
import shutil
|
||||
import signal
|
||||
import tempfile
|
||||
import time
|
||||
import traceback
|
||||
import zipfile
|
||||
|
||||
from automation import Automation
|
||||
from mozlog import get_default_logger
|
||||
from mozprocess import ProcessHandlerMixin
|
||||
|
||||
|
||||
class StdOutProc(ProcessHandlerMixin):
|
||||
"""Process handler for b2g which puts all output in a Queue.
|
||||
"""
|
||||
|
||||
def __init__(self, cmd, queue, **kwargs):
|
||||
self.queue = queue
|
||||
kwargs.setdefault('processOutputLine', []).append(self.handle_output)
|
||||
ProcessHandlerMixin.__init__(self, cmd, **kwargs)
|
||||
|
||||
def handle_output(self, line):
|
||||
self.queue.put_nowait(line)
|
||||
|
||||
|
||||
class B2GRemoteAutomation(Automation):
|
||||
_devicemanager = None
|
||||
|
||||
def __init__(self, deviceManager, appName='', remoteLog=None,
|
||||
marionette=None):
|
||||
self._devicemanager = deviceManager
|
||||
self._appName = appName
|
||||
self._remoteProfile = None
|
||||
self._remoteLog = remoteLog
|
||||
self.marionette = marionette
|
||||
self._is_emulator = False
|
||||
self.test_script = None
|
||||
self.test_script_args = None
|
||||
|
||||
# Default our product to b2g
|
||||
self._product = "b2g"
|
||||
self.lastTestSeen = "b2gautomation.py"
|
||||
# Default log finish to mochitest standard
|
||||
self.logFinish = 'INFO SimpleTest FINISHED'
|
||||
Automation.__init__(self)
|
||||
|
||||
def setEmulator(self, is_emulator):
|
||||
self._is_emulator = is_emulator
|
||||
|
||||
def setDeviceManager(self, deviceManager):
|
||||
self._devicemanager = deviceManager
|
||||
|
||||
def setAppName(self, appName):
|
||||
self._appName = appName
|
||||
|
||||
def setRemoteProfile(self, remoteProfile):
|
||||
self._remoteProfile = remoteProfile
|
||||
|
||||
def setProduct(self, product):
|
||||
self._product = product
|
||||
|
||||
def setRemoteLog(self, logfile):
|
||||
self._remoteLog = logfile
|
||||
|
||||
def getExtensionIDFromRDF(self, rdfSource):
|
||||
"""
|
||||
Retrieves the extension id from an install.rdf file (or string).
|
||||
"""
|
||||
from xml.dom.minidom import parse, parseString, Node
|
||||
|
||||
if isinstance(rdfSource, file):
|
||||
document = parse(rdfSource)
|
||||
else:
|
||||
document = parseString(rdfSource)
|
||||
|
||||
# Find the <em:id> element. There can be multiple <em:id> tags
|
||||
# within <em:targetApplication> tags, so we have to check this way.
|
||||
for rdfChild in document.documentElement.childNodes:
|
||||
if rdfChild.nodeType == Node.ELEMENT_NODE and rdfChild.tagName == "Description":
|
||||
for descChild in rdfChild.childNodes:
|
||||
if descChild.nodeType == Node.ELEMENT_NODE and descChild.tagName == "em:id":
|
||||
return descChild.childNodes[0].data
|
||||
return None
|
||||
|
||||
def installExtension(self, extensionSource, profileDir, extensionID=None):
|
||||
# Bug 827504 - installing special-powers extension separately causes problems in B2G
|
||||
if extensionID != "special-powers@mozilla.org":
|
||||
if not os.path.isdir(profileDir):
|
||||
self.log.info("INFO | automation.py | Cannot install extension, invalid profileDir at: %s", profileDir)
|
||||
return
|
||||
|
||||
installRDFFilename = "install.rdf"
|
||||
|
||||
extensionsRootDir = os.path.join(profileDir, "extensions", "staged")
|
||||
if not os.path.isdir(extensionsRootDir):
|
||||
os.makedirs(extensionsRootDir)
|
||||
|
||||
if os.path.isfile(extensionSource):
|
||||
reader = zipfile.ZipFile(extensionSource, "r")
|
||||
|
||||
for filename in reader.namelist():
|
||||
# Sanity check the zip file.
|
||||
if os.path.isabs(filename):
|
||||
self.log.info("INFO | automation.py | Cannot install extension, bad files in xpi")
|
||||
return
|
||||
|
||||
# We may need to dig the extensionID out of the zip file...
|
||||
if extensionID is None and filename == installRDFFilename:
|
||||
extensionID = self.getExtensionIDFromRDF(reader.read(filename))
|
||||
|
||||
# We must know the extensionID now.
|
||||
if extensionID is None:
|
||||
self.log.info("INFO | automation.py | Cannot install extension, missing extensionID")
|
||||
return
|
||||
|
||||
# Make the extension directory.
|
||||
extensionDir = os.path.join(extensionsRootDir, extensionID)
|
||||
os.mkdir(extensionDir)
|
||||
|
||||
# Extract all files.
|
||||
reader.extractall(extensionDir)
|
||||
|
||||
elif os.path.isdir(extensionSource):
|
||||
if extensionID is None:
|
||||
filename = os.path.join(extensionSource, installRDFFilename)
|
||||
if os.path.isfile(filename):
|
||||
with open(filename, "r") as installRDF:
|
||||
extensionID = self.getExtensionIDFromRDF(installRDF)
|
||||
|
||||
if extensionID is None:
|
||||
self.log.info("INFO | automation.py | Cannot install extension, missing extensionID")
|
||||
return
|
||||
|
||||
# Copy extension tree into its own directory.
|
||||
# "destination directory must not already exist".
|
||||
shutil.copytree(extensionSource, os.path.join(extensionsRootDir, extensionID))
|
||||
|
||||
else:
|
||||
self.log.info("INFO | automation.py | Cannot install extension, invalid extensionSource at: %s", extensionSource)
|
||||
|
||||
# Set up what we need for the remote environment
|
||||
def environment(self, env=None, xrePath=None, crashreporter=True, debugger=False):
|
||||
# Because we are running remote, we don't want to mimic the local env
|
||||
# so no copying of os.environ
|
||||
if env is None:
|
||||
env = {}
|
||||
|
||||
if crashreporter:
|
||||
env['MOZ_CRASHREPORTER'] = '1'
|
||||
env['MOZ_CRASHREPORTER_NO_REPORT'] = '1'
|
||||
|
||||
# We always hide the results table in B2G; it's much slower if we don't.
|
||||
env['MOZ_HIDE_RESULTS_TABLE'] = '1'
|
||||
return env
|
||||
|
||||
def waitForNet(self):
|
||||
active = False
|
||||
time_out = 0
|
||||
while not active and time_out < 40:
|
||||
data = self._devicemanager._runCmd(['shell', '/system/bin/netcfg']).stdout.readlines()
|
||||
data.pop(0)
|
||||
for line in data:
|
||||
if (re.search(r'UP\s+(?:[0-9]{1,3}\.){3}[0-9]{1,3}', line)):
|
||||
active = True
|
||||
break
|
||||
time_out += 1
|
||||
time.sleep(1)
|
||||
return active
|
||||
|
||||
def checkForCrashes(self, directory, symbolsPath):
|
||||
crashed = False
|
||||
remote_dump_dir = self._remoteProfile + '/minidumps'
|
||||
print "checking for crashes in '%s'" % remote_dump_dir
|
||||
if self._devicemanager.dirExists(remote_dump_dir):
|
||||
local_dump_dir = tempfile.mkdtemp()
|
||||
self._devicemanager.getDirectory(remote_dump_dir, local_dump_dir)
|
||||
try:
|
||||
logger = get_default_logger()
|
||||
if logger is not None:
|
||||
crashed = mozcrash.log_crashes(logger, local_dump_dir, symbolsPath, test=self.lastTestSeen)
|
||||
else:
|
||||
crashed = mozcrash.check_for_crashes(local_dump_dir, symbolsPath, test_name=self.lastTestSeen)
|
||||
except:
|
||||
traceback.print_exc()
|
||||
finally:
|
||||
shutil.rmtree(local_dump_dir)
|
||||
self._devicemanager.removeDir(remote_dump_dir)
|
||||
return crashed
|
||||
|
||||
def buildCommandLine(self, app, debuggerInfo, profileDir, testURL, extraArgs):
|
||||
# if remote profile is specified, use that instead
|
||||
if (self._remoteProfile):
|
||||
profileDir = self._remoteProfile
|
||||
|
||||
cmd, args = Automation.buildCommandLine(self, app, debuggerInfo, profileDir, testURL, extraArgs)
|
||||
|
||||
return app, args
|
||||
|
||||
def waitForFinish(self, proc, utilityPath, timeout, maxTime, startTime,
|
||||
debuggerInfo, symbolsPath, outputHandler=None):
|
||||
""" Wait for tests to finish (as evidenced by a signature string
|
||||
in logcat), or for a given amount of time to elapse with no
|
||||
output.
|
||||
"""
|
||||
timeout = timeout or 120
|
||||
while True:
|
||||
lines = proc.getStdoutLines(timeout)
|
||||
if lines:
|
||||
currentlog = '\n'.join(lines)
|
||||
|
||||
if outputHandler:
|
||||
for line in lines:
|
||||
outputHandler(line)
|
||||
else:
|
||||
print(currentlog)
|
||||
|
||||
# Match the test filepath from the last TEST-START line found in the new
|
||||
# log content. These lines are in the form:
|
||||
# ... INFO TEST-START | /filepath/we/wish/to/capture.html\n
|
||||
testStartFilenames = re.findall(r"TEST-START \| ([^\s]*)", currentlog)
|
||||
if testStartFilenames:
|
||||
self.lastTestSeen = testStartFilenames[-1]
|
||||
if (outputHandler and outputHandler.suite_finished) or (
|
||||
hasattr(self, 'logFinish') and self.logFinish in currentlog):
|
||||
return 0
|
||||
else:
|
||||
self.log.info("TEST-UNEXPECTED-FAIL | %s | application timed "
|
||||
"out after %d seconds with no output",
|
||||
self.lastTestSeen, int(timeout))
|
||||
self._devicemanager.killProcess('/system/b2g/b2g', sig=signal.SIGABRT)
|
||||
|
||||
timeout = 10 # seconds
|
||||
starttime = datetime.datetime.now()
|
||||
while datetime.datetime.now() - starttime < datetime.timedelta(seconds=timeout):
|
||||
if not self._devicemanager.processExist('/system/b2g/b2g'):
|
||||
break
|
||||
time.sleep(1)
|
||||
else:
|
||||
print "timed out after %d seconds waiting for b2g process to exit" % timeout
|
||||
return 1
|
||||
|
||||
self.checkForCrashes(None, symbolsPath)
|
||||
return 1
|
||||
|
||||
def getDeviceStatus(self, serial=None):
|
||||
# Get the current status of the device. If we know the device
|
||||
# serial number, we look for that, otherwise we use the (presumably
|
||||
# only) device shown in 'adb devices'.
|
||||
serial = serial or self._devicemanager._deviceSerial
|
||||
status = 'unknown'
|
||||
|
||||
for line in self._devicemanager._runCmd(['devices']).stdout.readlines():
|
||||
result = re.match('(.*?)\t(.*)', line)
|
||||
if result:
|
||||
thisSerial = result.group(1)
|
||||
if not serial or thisSerial == serial:
|
||||
serial = thisSerial
|
||||
status = result.group(2)
|
||||
|
||||
return (serial, status)
|
||||
|
||||
def restartB2G(self):
|
||||
# TODO hangs in subprocess.Popen without this delay
|
||||
time.sleep(5)
|
||||
self._devicemanager._checkCmd(['shell', 'stop', 'b2g'])
|
||||
# Wait for a bit to make sure B2G has completely shut down.
|
||||
time.sleep(10)
|
||||
self._devicemanager._checkCmd(['shell', 'start', 'b2g'])
|
||||
if self._is_emulator:
|
||||
self.marionette.emulator.wait_for_port(self.marionette.port)
|
||||
|
||||
def rebootDevice(self):
|
||||
# find device's current status and serial number
|
||||
serial, status = self.getDeviceStatus()
|
||||
|
||||
# reboot!
|
||||
self._devicemanager._runCmd(['shell', '/system/bin/reboot'])
|
||||
|
||||
# The above command can return while adb still thinks the device is
|
||||
# connected, so wait a little bit for it to disconnect from adb.
|
||||
time.sleep(10)
|
||||
|
||||
# wait for device to come back to previous status
|
||||
print 'waiting for device to come back online after reboot'
|
||||
start = time.time()
|
||||
rserial, rstatus = self.getDeviceStatus(serial)
|
||||
while rstatus != 'device':
|
||||
if time.time() - start > 120:
|
||||
# device hasn't come back online in 2 minutes, something's wrong
|
||||
raise Exception("Device %s (status: %s) not back online after reboot" % (serial, rstatus))
|
||||
time.sleep(5)
|
||||
rserial, rstatus = self.getDeviceStatus(serial)
|
||||
print 'device:', serial, 'status:', rstatus
|
||||
|
||||
def Process(self, cmd, stdout=None, stderr=None, env=None, cwd=None):
|
||||
# On a desktop or fennec run, the Process method invokes a gecko
|
||||
# process in which to the tests. For B2G, we simply
|
||||
# reboot the device (which was configured with a test profile
|
||||
# already), wait for B2G to start up, and then navigate to the
|
||||
# test url using Marionette. There doesn't seem to be any way
|
||||
# to pass env variables into the B2G process, but this doesn't
|
||||
# seem to matter.
|
||||
|
||||
# reboot device so it starts up with the mochitest profile
|
||||
# XXX: We could potentially use 'stop b2g' + 'start b2g' to achieve
|
||||
# a similar effect; will see which is more stable while attempting
|
||||
# to bring up the continuous integration.
|
||||
if not self._is_emulator:
|
||||
self.rebootDevice()
|
||||
time.sleep(5)
|
||||
#wait for wlan to come up
|
||||
if not self.waitForNet():
|
||||
raise Exception("network did not come up, please configure the network" +
|
||||
" prior to running before running the automation framework")
|
||||
|
||||
# stop b2g
|
||||
self._devicemanager._runCmd(['shell', 'stop', 'b2g'])
|
||||
time.sleep(5)
|
||||
|
||||
# For some reason user.js in the profile doesn't get picked up.
|
||||
# Manually copy it over to prefs.js. See bug 1009730 for more details.
|
||||
self._devicemanager.moveTree(posixpath.join(self._remoteProfile, 'user.js'),
|
||||
posixpath.join(self._remoteProfile, 'prefs.js'))
|
||||
|
||||
# relaunch b2g inside b2g instance
|
||||
instance = self.B2GInstance(self._devicemanager, env=env)
|
||||
|
||||
time.sleep(5)
|
||||
|
||||
# Set up port forwarding again for Marionette, since any that
|
||||
# existed previously got wiped out by the reboot.
|
||||
if not self._is_emulator:
|
||||
self._devicemanager._checkCmd(['forward',
|
||||
'tcp:%s' % self.marionette.port,
|
||||
'tcp:%s' % self.marionette.port])
|
||||
|
||||
if self._is_emulator:
|
||||
self.marionette.emulator.wait_for_port(self.marionette.port)
|
||||
else:
|
||||
time.sleep(5)
|
||||
|
||||
# start a marionette session
|
||||
session = self.marionette.start_session()
|
||||
if 'b2g' not in session:
|
||||
raise Exception("bad session value %s returned by start_session" % session)
|
||||
|
||||
with self.marionette.using_context(self.marionette.CONTEXT_CHROME):
|
||||
self.marionette.execute_script("""
|
||||
let SECURITY_PREF = "security.turn_off_all_security_so_that_viruses_can_take_over_this_computer";
|
||||
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||
Services.prefs.setBoolPref(SECURITY_PREF, true);
|
||||
|
||||
if (!testUtils.hasOwnProperty("specialPowersObserver")) {
|
||||
let loader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"]
|
||||
.getService(Components.interfaces.mozIJSSubScriptLoader);
|
||||
loader.loadSubScript("chrome://specialpowers/content/SpecialPowersObserver.jsm",
|
||||
testUtils);
|
||||
testUtils.specialPowersObserver = new testUtils.SpecialPowersObserver();
|
||||
testUtils.specialPowersObserver.init();
|
||||
}
|
||||
""")
|
||||
|
||||
# run the script that starts the tests
|
||||
if self.test_script:
|
||||
if os.path.isfile(self.test_script):
|
||||
script = open(self.test_script, 'r')
|
||||
self.marionette.execute_script(script.read(), script_args=self.test_script_args)
|
||||
script.close()
|
||||
elif isinstance(self.test_script, basestring):
|
||||
self.marionette.execute_script(self.test_script, script_args=self.test_script_args)
|
||||
else:
|
||||
# assumes the tests are started on startup automatically
|
||||
pass
|
||||
|
||||
return instance
|
||||
|
||||
# be careful here as this inner class doesn't have access to outer class members
|
||||
class B2GInstance(object):
|
||||
"""Represents a B2G instance running on a device, and exposes
|
||||
some process-like methods/properties that are expected by the
|
||||
automation.
|
||||
"""
|
||||
|
||||
def __init__(self, dm, env=None):
|
||||
self.dm = dm
|
||||
self.env = env or {}
|
||||
self.stdout_proc = None
|
||||
self.queue = Queue.Queue()
|
||||
|
||||
# Launch b2g in a separate thread, and dump all output lines
|
||||
# into a queue. The lines in this queue are
|
||||
# retrieved and returned by accessing the stdout property of
|
||||
# this class.
|
||||
cmd = [self.dm._adbPath]
|
||||
if self.dm._deviceSerial:
|
||||
cmd.extend(['-s', self.dm._deviceSerial])
|
||||
cmd.append('shell')
|
||||
for k, v in self.env.iteritems():
|
||||
cmd.append("%s=%s" % (k, v))
|
||||
cmd.append('/system/bin/b2g.sh')
|
||||
proc = threading.Thread(target=self._save_stdout_proc, args=(cmd, self.queue))
|
||||
proc.daemon = True
|
||||
proc.start()
|
||||
|
||||
def _save_stdout_proc(self, cmd, queue):
|
||||
self.stdout_proc = StdOutProc(cmd, queue)
|
||||
self.stdout_proc.run()
|
||||
if hasattr(self.stdout_proc, 'processOutput'):
|
||||
self.stdout_proc.processOutput()
|
||||
self.stdout_proc.wait()
|
||||
self.stdout_proc = None
|
||||
|
||||
@property
|
||||
def pid(self):
|
||||
# a dummy value to make the automation happy
|
||||
return 0
|
||||
|
||||
def getStdoutLines(self, timeout):
|
||||
# Return any lines in the queue used by the
|
||||
# b2g process handler.
|
||||
lines = []
|
||||
# get all of the lines that are currently available
|
||||
while True:
|
||||
try:
|
||||
lines.append(self.queue.get_nowait())
|
||||
except Queue.Empty:
|
||||
break
|
||||
|
||||
# wait 'timeout' for any additional lines
|
||||
if not lines:
|
||||
try:
|
||||
lines.append(self.queue.get(True, timeout))
|
||||
except Queue.Empty:
|
||||
pass
|
||||
return lines
|
||||
|
||||
def wait(self, timeout=None):
|
||||
# this should never happen
|
||||
raise Exception("'wait' called on B2GInstance")
|
||||
|
||||
def kill(self):
|
||||
# this should never happen
|
||||
raise Exception("'kill' called on B2GInstance")
|
||||
|
|
@ -64,8 +64,7 @@ if CONFIG['MOZ_APP_BASENAME']:
|
|||
if CONFIG['MOZ_APP_PROFILE']:
|
||||
appini_defines['MOZ_APP_PROFILE'] = CONFIG['MOZ_APP_PROFILE']
|
||||
|
||||
for var in ('MOZ_CRASHREPORTER', 'MOZ_PROFILE_MIGRATOR',
|
||||
'MOZ_APP_STATIC_INI'):
|
||||
for var in ('MOZ_CRASHREPORTER', 'MOZ_PROFILE_MIGRATOR'):
|
||||
if CONFIG[var]:
|
||||
appini_defines[var] = True
|
||||
|
||||
|
@ -80,11 +79,10 @@ if CONFIG['MOZ_APP_BASENAME']:
|
|||
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android' and CONFIG['MOZ_UPDATER']:
|
||||
FINAL_TARGET_PP_FILES += ['update-settings.ini']
|
||||
|
||||
if CONFIG['MOZ_APP_STATIC_INI']:
|
||||
GENERATED_FILES += ['application.ini.h']
|
||||
appini = GENERATED_FILES['application.ini.h']
|
||||
appini.script = 'appini_header.py'
|
||||
appini.inputs = ['!application.ini']
|
||||
GENERATED_FILES += ['application.ini.h']
|
||||
appini = GENERATED_FILES['application.ini.h']
|
||||
appini.script = 'appini_header.py'
|
||||
appini.inputs = ['!application.ini']
|
||||
|
||||
# NOTE: Keep .gdbinit in the topsrcdir for people who run gdb from the topsrcdir.
|
||||
OBJDIR_FILES += ['/.gdbinit']
|
||||
|
|
|
@ -12,3 +12,6 @@ DIRS += [
|
|||
BROWSER_CHROME_MANIFESTS += [
|
||||
'test/browser.ini'
|
||||
]
|
||||
|
||||
with Files('**'):
|
||||
BUG_COMPONENT = ('Firefox', 'Developer Tools: about:debugging')
|
||||
|
|
|
@ -14,3 +14,6 @@ DIRS += [
|
|||
DevToolsModules(
|
||||
'utils.js',
|
||||
)
|
||||
|
||||
with Files('**'):
|
||||
BUG_COMPONENT = ('Firefox', 'Developer Tools: Animation Inspector')
|
||||
|
|
|
@ -8,3 +8,6 @@ DevToolsModules(
|
|||
)
|
||||
|
||||
BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
|
||||
|
||||
with Files('**'):
|
||||
BUG_COMPONENT = ('Firefox', 'Developer Tools: Canvas Debugger')
|
||||
|
|
|
@ -18,3 +18,6 @@ BROWSER_CHROME_MANIFESTS += [
|
|||
'test/mochitest/browser.ini',
|
||||
'test/mochitest/browser2.ini'
|
||||
]
|
||||
|
||||
with Files('**'):
|
||||
BUG_COMPONENT = ('Firefox', 'Developer Tools: Debugger')
|
||||
|
|
|
@ -12,3 +12,6 @@ DIRS += [
|
|||
DevToolsModules(
|
||||
'dom-panel.js',
|
||||
)
|
||||
|
||||
with Files('**'):
|
||||
BUG_COMPONENT = ('Firefox', 'Developer Tools: DOM')
|
||||
|
|
|
@ -29,6 +29,7 @@ loader.lazyRequireGetter(this, "findCssSelector", "devtools/shared/inspector/css
|
|||
|
||||
loader.lazyImporter(this, "CustomizableUI", "resource:///modules/CustomizableUI.jsm");
|
||||
loader.lazyImporter(this, "AppConstants", "resource://gre/modules/AppConstants.jsm");
|
||||
loader.lazyImporter(this, "LightweightThemeManager", "resource://gre/modules/LightweightThemeManager.jsm");
|
||||
|
||||
const {LocalizationHelper} = require("devtools/shared/l10n");
|
||||
const L10N = new LocalizationHelper("devtools/client/locales/toolbox.properties");
|
||||
|
@ -38,6 +39,9 @@ const TABS_OPEN_AVG_HISTOGRAM = "DEVTOOLS_TABS_OPEN_AVERAGE_LINEAR";
|
|||
const TABS_PINNED_PEAK_HISTOGRAM = "DEVTOOLS_TABS_PINNED_PEAK_LINEAR";
|
||||
const TABS_PINNED_AVG_HISTOGRAM = "DEVTOOLS_TABS_PINNED_AVERAGE_LINEAR";
|
||||
|
||||
const COMPACT_LIGHT_ID = "firefox-compact-light@mozilla.org";
|
||||
const COMPACT_DARK_ID = "firefox-compact-dark@mozilla.org";
|
||||
|
||||
/**
|
||||
* gDevToolsBrowser exposes functions to connect the gDevTools instance with a
|
||||
* Firefox instance.
|
||||
|
@ -129,6 +133,38 @@ var gDevToolsBrowser = exports.gDevToolsBrowser = {
|
|||
toggleMenuItem("menu_devtools_connect", devtoolsRemoteEnabled);
|
||||
},
|
||||
|
||||
/**
|
||||
* This function makes sure that the "devtoolstheme" attribute is set on the browser
|
||||
* window to make it possible to change colors on elements in the browser (like gcli,
|
||||
* or the splitter between the toolbox and web content).
|
||||
*/
|
||||
updateDevtoolsThemeAttribute: function(win) {
|
||||
// Set an attribute on root element of each window to make it possible
|
||||
// to change colors based on the selected devtools theme.
|
||||
let devtoolsTheme = Services.prefs.getCharPref("devtools.theme");
|
||||
if (devtoolsTheme != "dark") {
|
||||
devtoolsTheme = "light";
|
||||
}
|
||||
|
||||
win.document.documentElement.setAttribute("devtoolstheme", devtoolsTheme);
|
||||
|
||||
// If the toolbox color changes and we have the opposite compact theme applied,
|
||||
// change it to match. For example:
|
||||
// 1) toolbox changes to dark, and the light compact theme was applied.
|
||||
// Switch to the dark compact theme.
|
||||
// 2) toolbox changes to light or firebug, and the dark compact theme was applied.
|
||||
// Switch to the light compact theme.
|
||||
// 3) No compact theme was applied. Do nothing.
|
||||
let currentTheme = LightweightThemeManager.currentTheme;
|
||||
let currentThemeID = currentTheme && currentTheme.id;
|
||||
if (currentThemeID == COMPACT_LIGHT_ID && devtoolsTheme == "dark") {
|
||||
LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme(COMPACT_DARK_ID);
|
||||
}
|
||||
if (currentThemeID == COMPACT_DARK_ID && devtoolsTheme == "light") {
|
||||
LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme(COMPACT_LIGHT_ID);
|
||||
}
|
||||
},
|
||||
|
||||
observe: function (subject, topic, prefName) {
|
||||
switch (topic) {
|
||||
case "browser-delayed-startup-finished":
|
||||
|
@ -140,6 +176,11 @@ var gDevToolsBrowser = exports.gDevToolsBrowser = {
|
|||
this.updateCommandAvailability(win);
|
||||
}
|
||||
}
|
||||
if (prefName === "devtools.theme") {
|
||||
for (let win of this._trackedBrowserWindows) {
|
||||
this.updateDevtoolsThemeAttribute(win);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "quit-application":
|
||||
gDevToolsBrowser.destroy({ shuttingDown: true });
|
||||
|
@ -151,6 +192,20 @@ var gDevToolsBrowser = exports.gDevToolsBrowser = {
|
|||
gDevToolsBrowser.destroy({ shuttingDown: false });
|
||||
}
|
||||
break;
|
||||
case "lightweight-theme-changed":
|
||||
let currentTheme = LightweightThemeManager.currentTheme;
|
||||
let currentThemeID = currentTheme && currentTheme.id;
|
||||
let devtoolsTheme = Services.prefs.getCharPref("devtools.theme");
|
||||
|
||||
// If the current lightweight theme changes to one of the compact themes, then
|
||||
// keep the devtools color in sync.
|
||||
if (currentThemeID == COMPACT_LIGHT_ID && devtoolsTheme == "dark") {
|
||||
Services.prefs.setCharPref("devtools.theme", "light");
|
||||
}
|
||||
if (currentThemeID == COMPACT_DARK_ID && devtoolsTheme == "light") {
|
||||
Services.prefs.setCharPref("devtools.theme", "dark");
|
||||
}
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -461,6 +516,7 @@ var gDevToolsBrowser = exports.gDevToolsBrowser = {
|
|||
});
|
||||
|
||||
this.updateCommandAvailability(win);
|
||||
this.updateDevtoolsThemeAttribute(win);
|
||||
this.ensurePrefObserver();
|
||||
win.addEventListener("unload", this);
|
||||
|
||||
|
@ -749,6 +805,7 @@ var gDevToolsBrowser = exports.gDevToolsBrowser = {
|
|||
*/
|
||||
destroy: function ({ shuttingDown }) {
|
||||
Services.prefs.removeObserver("devtools.", gDevToolsBrowser);
|
||||
Services.obs.removeObserver(gDevToolsBrowser, "lightweight-theme-changed", false);
|
||||
Services.obs.removeObserver(gDevToolsBrowser, "browser-delayed-startup-finished");
|
||||
Services.obs.removeObserver(gDevToolsBrowser, "quit-application");
|
||||
Services.obs.removeObserver(gDevToolsBrowser, "sdk:loader:destroy");
|
||||
|
@ -788,6 +845,7 @@ Services.obs.addObserver(gDevToolsBrowser, "quit-application", false);
|
|||
Services.obs.addObserver(gDevToolsBrowser, "browser-delayed-startup-finished", false);
|
||||
// Watch for module loader unload. Fires when the tools are reloaded.
|
||||
Services.obs.addObserver(gDevToolsBrowser, "sdk:loader:destroy", false);
|
||||
Services.obs.addObserver(gDevToolsBrowser, "lightweight-theme-changed", false);
|
||||
|
||||
// Fake end of browser window load event for all already opened windows
|
||||
// that is already fully loaded.
|
||||
|
|
|
@ -35,3 +35,6 @@ DevToolsModules(
|
|||
'toolbox.js',
|
||||
'ToolboxProcess.jsm',
|
||||
)
|
||||
|
||||
with Files('**'):
|
||||
BUG_COMPONENT = ('Firefox', 'Developer Tools: Framework')
|
||||
|
|
|
@ -75,6 +75,7 @@ skip-if = e10s # Bug 1069044 - destroyInspector may hang during shutdown
|
|||
[browser_toolbox_target.js]
|
||||
[browser_toolbox_tabsswitch_shortcuts.js]
|
||||
[browser_toolbox_textbox_context_menu.js]
|
||||
[browser_toolbox_theme.js]
|
||||
[browser_toolbox_theme_registration.js]
|
||||
[browser_toolbox_toggle.js]
|
||||
[browser_toolbox_tool_ready.js]
|
||||
|
|
|
@ -0,0 +1,76 @@
|
|||
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
|
||||
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
const COMPACT_LIGHT_ID = "firefox-compact-light@mozilla.org";
|
||||
const COMPACT_DARK_ID = "firefox-compact-dark@mozilla.org";
|
||||
const PREF_DEVTOOLS_THEME = "devtools.theme";
|
||||
const {LightweightThemeManager} = Components.utils.import("resource://gre/modules/LightweightThemeManager.jsm", {});
|
||||
|
||||
registerCleanupFunction(() => {
|
||||
// Set preferences back to their original values
|
||||
Services.prefs.clearUserPref(PREF_DEVTOOLS_THEME);
|
||||
LightweightThemeManager.currentTheme = null;
|
||||
});
|
||||
|
||||
add_task(function* testDevtoolsTheme() {
|
||||
info("Checking stylesheet and :root attributes based on devtools theme.");
|
||||
Services.prefs.setCharPref(PREF_DEVTOOLS_THEME, "light");
|
||||
is(document.documentElement.getAttribute("devtoolstheme"), "light",
|
||||
"The documentElement has an attribute based on devtools theme.");
|
||||
|
||||
Services.prefs.setCharPref(PREF_DEVTOOLS_THEME, "dark");
|
||||
is(document.documentElement.getAttribute("devtoolstheme"), "dark",
|
||||
"The documentElement has an attribute based on devtools theme.");
|
||||
|
||||
Services.prefs.setCharPref(PREF_DEVTOOLS_THEME, "firebug");
|
||||
is(document.documentElement.getAttribute("devtoolstheme"), "light",
|
||||
"The documentElement has 'light' as a default for the devtoolstheme attribute");
|
||||
});
|
||||
|
||||
add_task(function* testDevtoolsAndCompactThemeSyncing() {
|
||||
if (!AppConstants.INSTALL_COMPACT_THEMES) {
|
||||
ok(true, "No need to run this test since themes aren't installed");
|
||||
return;
|
||||
}
|
||||
|
||||
info("Devtools theme light -> dark when dark compact applied");
|
||||
Services.prefs.setCharPref(PREF_DEVTOOLS_THEME, "light");
|
||||
LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme(COMPACT_DARK_ID);
|
||||
is(Services.prefs.getCharPref(PREF_DEVTOOLS_THEME), "dark");
|
||||
|
||||
info("Devtools theme dark -> light when light compact applied");
|
||||
Services.prefs.setCharPref(PREF_DEVTOOLS_THEME, "dark");
|
||||
LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme(COMPACT_LIGHT_ID);
|
||||
is(Services.prefs.getCharPref(PREF_DEVTOOLS_THEME), "light");
|
||||
|
||||
info("Devtools theme shouldn't change if it wasn't light or dark during lwt change");
|
||||
Services.prefs.setCharPref(PREF_DEVTOOLS_THEME, "firebug");
|
||||
LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme(COMPACT_DARK_ID);
|
||||
is(Services.prefs.getCharPref(PREF_DEVTOOLS_THEME), "firebug");
|
||||
|
||||
info("Compact theme dark -> light when devtools changes dark -> light");
|
||||
LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme(COMPACT_DARK_ID);
|
||||
Services.prefs.setCharPref(PREF_DEVTOOLS_THEME, "dark");
|
||||
Services.prefs.setCharPref(PREF_DEVTOOLS_THEME, "light");
|
||||
is(LightweightThemeManager.currentTheme, LightweightThemeManager.getUsedTheme(COMPACT_LIGHT_ID));
|
||||
|
||||
info("Compact theme dark -> light when devtools changes dark -> firebug");
|
||||
LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme(COMPACT_DARK_ID);
|
||||
Services.prefs.setCharPref(PREF_DEVTOOLS_THEME, "dark");
|
||||
Services.prefs.setCharPref(PREF_DEVTOOLS_THEME, "firebug");
|
||||
is(LightweightThemeManager.currentTheme, LightweightThemeManager.getUsedTheme(COMPACT_LIGHT_ID));
|
||||
|
||||
info("Compact theme light -> dark when devtools changes light -> dark");
|
||||
LightweightThemeManager.currentTheme = LightweightThemeManager.getUsedTheme(COMPACT_LIGHT_ID);
|
||||
Services.prefs.setCharPref(PREF_DEVTOOLS_THEME, "light");
|
||||
Services.prefs.setCharPref(PREF_DEVTOOLS_THEME, "dark");
|
||||
is(LightweightThemeManager.currentTheme, LightweightThemeManager.getUsedTheme(COMPACT_DARK_ID));
|
||||
|
||||
info("Compact theme shouldn't change if it wasn't set during devtools change");
|
||||
LightweightThemeManager.currentTheme = null;
|
||||
Services.prefs.setCharPref(PREF_DEVTOOLS_THEME, "light");
|
||||
Services.prefs.setCharPref(PREF_DEVTOOLS_THEME, "dark");
|
||||
is(LightweightThemeManager.currentTheme, null);
|
||||
});
|
|
@ -21,3 +21,6 @@ DevToolsModules(
|
|||
)
|
||||
|
||||
BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
|
||||
|
||||
with Files('**'):
|
||||
BUG_COMPONENT = ('Firefox', 'Developer Tools: Inspector')
|
||||
|
|
|
@ -21,3 +21,6 @@ DevToolsModules(
|
|||
)
|
||||
|
||||
BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
|
||||
|
||||
with Files('**'):
|
||||
BUG_COMPONENT = ('Firefox', 'Developer Tools: JSON Viewer')
|
||||
|
|
|
@ -52,3 +52,6 @@ DevToolsModules(
|
|||
'definitions.js',
|
||||
'menus.js',
|
||||
)
|
||||
|
||||
with Files('**'):
|
||||
BUG_COMPONENT = ('Firefox', 'Developer Tools')
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
"use strict";
|
||||
|
||||
const {
|
||||
TOGGLE_REQUEST_FILTER_TYPE,
|
||||
ENABLE_REQUEST_FILTER_TYPE_ONLY,
|
||||
TOGGLE_REQUEST_FILTER_TYPE,
|
||||
SET_REQUEST_FILTER_TEXT,
|
||||
} = require("../constants");
|
||||
|
||||
|
@ -40,7 +40,7 @@ function enableRequestFilterTypeOnly(filter) {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set filter text.
|
||||
* Set filter text in toolbar.
|
||||
*
|
||||
* @param {string} text - A filter text is going to be set
|
||||
*/
|
||||
|
@ -52,7 +52,7 @@ function setRequestFilterText(text) {
|
|||
}
|
||||
|
||||
module.exports = {
|
||||
toggleRequestFilterType,
|
||||
enableRequestFilterTypeOnly,
|
||||
toggleRequestFilterType,
|
||||
setRequestFilterText,
|
||||
};
|
||||
|
|
|
@ -8,18 +8,16 @@ const { connect } = require("devtools/client/shared/vendor/react-redux");
|
|||
const SearchBox = require("devtools/client/shared/components/search-box");
|
||||
const { L10N } = require("../l10n");
|
||||
const Actions = require("../actions/index");
|
||||
const { FREETEXT_FILTER_SEARCH_DELAY } = require("../constants");
|
||||
const { FILTER_SEARCH_DELAY } = require("../constants");
|
||||
|
||||
module.exports = connect(
|
||||
(state) => ({
|
||||
delay: FREETEXT_FILTER_SEARCH_DELAY,
|
||||
delay: FILTER_SEARCH_DELAY,
|
||||
keyShortcut: L10N.getStr("netmonitor.toolbar.filterFreetext.key"),
|
||||
placeholder: L10N.getStr("netmonitor.toolbar.filterFreetext.label"),
|
||||
type: "filter",
|
||||
}),
|
||||
(dispatch) => ({
|
||||
onChange: (url) => {
|
||||
dispatch(Actions.setRequestFilterText(url));
|
||||
},
|
||||
onChange: (text) => dispatch(Actions.setRequestFilterText(text)),
|
||||
})
|
||||
)(SearchBox);
|
||||
|
|
|
@ -10,7 +10,7 @@ const {
|
|||
} = require("devtools/client/shared/vendor/react");
|
||||
const ClearButton = createFactory(require("./clear-button"));
|
||||
const FilterButtons = createFactory(require("./filter-buttons"));
|
||||
const SearchBox = createFactory(require("./search-box"));
|
||||
const ToolbarSearchBox = createFactory(require("./search-box"));
|
||||
const SummaryButton = createFactory(require("./summary-button"));
|
||||
const ToggleButton = createFactory(require("./toggle-button"));
|
||||
|
||||
|
@ -28,7 +28,7 @@ function Toolbar() {
|
|||
),
|
||||
span({ className: "devtools-toolbar-group" },
|
||||
SummaryButton(),
|
||||
SearchBox(),
|
||||
ToolbarSearchBox(),
|
||||
ToggleButton()
|
||||
)
|
||||
);
|
||||
|
|
|
@ -3,22 +3,20 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/* eslint-disable mozilla/reject-some-requires */
|
||||
/* globals window, dumpn, $, gNetwork */
|
||||
/* globals window, dumpn, $ */
|
||||
|
||||
"use strict";
|
||||
|
||||
const promise = require("promise");
|
||||
const EventEmitter = require("devtools/shared/event-emitter");
|
||||
const { Heritage } = require("devtools/client/shared/widgets/view-helpers");
|
||||
const { Task } = require("devtools/shared/task");
|
||||
const { ToolSidebar } = require("devtools/client/framework/sidebar");
|
||||
const { VariablesView } = require("resource://devtools/client/shared/widgets/VariablesView.jsm");
|
||||
const { EVENTS } = require("./events");
|
||||
const { L10N } = require("./l10n");
|
||||
const { Filters } = require("./filter-predicates");
|
||||
const { createFactory } = require("devtools/client/shared/vendor/react");
|
||||
const ReactDOM = require("devtools/client/shared/vendor/react-dom");
|
||||
const Provider = createFactory(require("devtools/client/shared/vendor/react-redux").Provider);
|
||||
const CookiesPanel = createFactory(require("./shared/components/cookies-panel"));
|
||||
const HeadersPanel = createFactory(require("./shared/components/headers-panel"));
|
||||
const ParamsPanel = createFactory(require("./shared/components/params-panel"));
|
||||
const PreviewPanel = createFactory(require("./shared/components/preview-panel"));
|
||||
|
@ -26,18 +24,6 @@ const ResponsePanel = createFactory(require("./shared/components/response-panel"
|
|||
const SecurityPanel = createFactory(require("./shared/components/security-panel"));
|
||||
const TimingsPanel = createFactory(require("./shared/components/timings-panel"));
|
||||
|
||||
const GENERIC_VARIABLES_VIEW_SETTINGS = {
|
||||
lazyEmpty: true,
|
||||
// ms
|
||||
lazyEmptyDelay: 10,
|
||||
searchEnabled: true,
|
||||
editableValueTooltip: "",
|
||||
editableNameTooltip: "",
|
||||
preventDisableOnChange: true,
|
||||
preventDescriptorModifiers: true,
|
||||
eval: () => {}
|
||||
};
|
||||
|
||||
/**
|
||||
* Functions handling the requests details view.
|
||||
*/
|
||||
|
@ -70,6 +56,13 @@ DetailsView.prototype = {
|
|||
initialize: function (store) {
|
||||
dumpn("Initializing the DetailsView");
|
||||
|
||||
this._cookiesPanelNode = $("#react-cookies-tabpanel-hook");
|
||||
|
||||
ReactDOM.render(Provider(
|
||||
{ store },
|
||||
CookiesPanel()
|
||||
), this._cookiesPanelNode);
|
||||
|
||||
this._headersPanelNode = $("#react-headers-tabpanel-hook");
|
||||
|
||||
ReactDOM.render(Provider(
|
||||
|
@ -117,16 +110,6 @@ DetailsView.prototype = {
|
|||
disableTelemetry: true,
|
||||
showAllTabsMenu: true
|
||||
});
|
||||
|
||||
this._cookies = new VariablesView($("#all-cookies"),
|
||||
Heritage.extend(GENERIC_VARIABLES_VIEW_SETTINGS, {
|
||||
emptyText: L10N.getStr("cookiesEmptyText"),
|
||||
searchPlaceholder: L10N.getStr("cookiesFilterText")
|
||||
}));
|
||||
|
||||
this._requestCookies = L10N.getStr("requestCookies");
|
||||
this._responseCookies = L10N.getStr("responseCookies");
|
||||
|
||||
$("tabpanels", this.widget).addEventListener("select", this._onTabSelect);
|
||||
},
|
||||
|
||||
|
@ -135,8 +118,9 @@ DetailsView.prototype = {
|
|||
*/
|
||||
destroy: function () {
|
||||
dumpn("Destroying the DetailsView");
|
||||
ReactDOM.unmountComponentAtNode(this._paramsPanelNode);
|
||||
ReactDOM.unmountComponentAtNode(this._cookiesPanelNode);
|
||||
ReactDOM.unmountComponentAtNode(this._headersPanelNode);
|
||||
ReactDOM.unmountComponentAtNode(this._paramsPanelNode);
|
||||
ReactDOM.unmountComponentAtNode(this._previewPanelNode);
|
||||
ReactDOM.unmountComponentAtNode(this._responsePanelNode);
|
||||
ReactDOM.unmountComponentAtNode(this._securityPanelNode);
|
||||
|
@ -177,8 +161,6 @@ DetailsView.prototype = {
|
|||
this.widget.selectedIndex = 0;
|
||||
}
|
||||
|
||||
this._cookies.empty();
|
||||
|
||||
this._dataSrc = { src: data, populated: [] };
|
||||
this._onTabSelect();
|
||||
window.emit(EVENTS.NETWORKDETAILSVIEW_POPULATED);
|
||||
|
@ -211,14 +193,6 @@ DetailsView.prototype = {
|
|||
}
|
||||
|
||||
Task.spawn(function* () {
|
||||
viewState.updating[tab] = true;
|
||||
switch (tab) {
|
||||
// "Cookies"
|
||||
case 1:
|
||||
yield view._setResponseCookies(src.responseCookies);
|
||||
yield view._setRequestCookies(src.requestCookies);
|
||||
break;
|
||||
}
|
||||
viewState.updating[tab] = false;
|
||||
}).then(() => {
|
||||
if (tab == this.widget.selectedIndex) {
|
||||
|
@ -239,78 +213,7 @@ DetailsView.prototype = {
|
|||
}, e => console.error(e));
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the network request cookies shown in this view.
|
||||
*
|
||||
* @param object response
|
||||
* The message received from the server.
|
||||
* @return object
|
||||
* A promise that is resolved when the request cookies are set.
|
||||
*/
|
||||
_setRequestCookies: Task.async(function* (response) {
|
||||
if (response && response.cookies.length) {
|
||||
response.cookies.sort((a, b) => a.name > b.name);
|
||||
yield this._addCookies(this._requestCookies, response);
|
||||
}
|
||||
}),
|
||||
|
||||
/**
|
||||
* Sets the network response cookies shown in this view.
|
||||
*
|
||||
* @param object response
|
||||
* The message received from the server.
|
||||
* @return object
|
||||
* A promise that is resolved when the response cookies are set.
|
||||
*/
|
||||
_setResponseCookies: Task.async(function* (response) {
|
||||
if (response && response.cookies.length) {
|
||||
yield this._addCookies(this._responseCookies, response);
|
||||
}
|
||||
}),
|
||||
|
||||
/**
|
||||
* Populates the cookies container in this view with the specified data.
|
||||
*
|
||||
* @param string name
|
||||
* The type of cookies to populate (request or response).
|
||||
* @param object response
|
||||
* The message received from the server.
|
||||
* @return object
|
||||
* Returns a promise that resolves upon the adding of cookies.
|
||||
*/
|
||||
_addCookies: Task.async(function* (name, response) {
|
||||
let cookiesScope = this._cookies.addScope(name);
|
||||
cookiesScope.expanded = true;
|
||||
|
||||
for (let cookie of response.cookies) {
|
||||
let cookieVar = cookiesScope.addItem(cookie.name, {}, {relaxed: true});
|
||||
let cookieValue = yield gNetwork.getString(cookie.value);
|
||||
cookieVar.setGrip(cookieValue);
|
||||
|
||||
// By default the cookie name and value are shown. If this is the only
|
||||
// information available, then nothing else is to be displayed.
|
||||
let cookieProps = Object.keys(cookie);
|
||||
if (cookieProps.length == 2) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Display any other information other than the cookie name and value
|
||||
// which may be available.
|
||||
let rawObject = Object.create(null);
|
||||
let otherProps = cookieProps.filter(e => e != "name" && e != "value");
|
||||
for (let prop of otherProps) {
|
||||
rawObject[prop] = cookie[prop];
|
||||
}
|
||||
cookieVar.populate(rawObject);
|
||||
cookieVar.twisty = true;
|
||||
cookieVar.expanded = true;
|
||||
}
|
||||
}),
|
||||
|
||||
_dataSrc: null,
|
||||
_cookies: null,
|
||||
_requestCookies: "",
|
||||
_responseCookies: ""
|
||||
};
|
||||
|
||||
exports.DetailsView = DetailsView;
|
||||
|
|
|
@ -36,3 +36,6 @@ DevToolsModules(
|
|||
)
|
||||
|
||||
BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
|
||||
|
||||
with Files('**'):
|
||||
BUG_COMPONENT = ('Firefox', 'Developer Tools: Netmonitor')
|
||||
|
|
|
@ -129,7 +129,8 @@
|
|||
<tabpanel id="cookies-tabpanel"
|
||||
class="tabpanel-content">
|
||||
<vbox flex="1">
|
||||
<vbox id="all-cookies" flex="1"/>
|
||||
<html:div xmlns="http://www.w3.org/1999/xhtml"
|
||||
id="react-cookies-tabpanel-hook"/>
|
||||
</vbox>
|
||||
</tabpanel>
|
||||
<tabpanel id="params-tabpanel"
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
const I = require("devtools/client/shared/vendor/immutable");
|
||||
const {
|
||||
TOGGLE_REQUEST_FILTER_TYPE,
|
||||
ENABLE_REQUEST_FILTER_TYPE_ONLY,
|
||||
TOGGLE_REQUEST_FILTER_TYPE,
|
||||
SET_REQUEST_FILTER_TEXT,
|
||||
} = require("../constants");
|
||||
|
||||
|
@ -67,12 +67,12 @@ function enableRequestFilterTypeOnly(state, action) {
|
|||
|
||||
function filters(state = new Filters(), action) {
|
||||
switch (action.type) {
|
||||
case TOGGLE_REQUEST_FILTER_TYPE:
|
||||
return state.set("requestFilterTypes",
|
||||
toggleRequestFilterType(state.requestFilterTypes, action));
|
||||
case ENABLE_REQUEST_FILTER_TYPE_ONLY:
|
||||
return state.set("requestFilterTypes",
|
||||
enableRequestFilterTypeOnly(state.requestFilterTypes, action));
|
||||
case TOGGLE_REQUEST_FILTER_TYPE:
|
||||
return state.set("requestFilterTypes",
|
||||
toggleRequestFilterType(state.requestFilterTypes, action));
|
||||
case SET_REQUEST_FILTER_TEXT:
|
||||
return state.set("requestFilterText", action.text);
|
||||
default:
|
||||
|
|
|
@ -28,10 +28,10 @@ const {
|
|||
|
||||
const {
|
||||
getActiveFilters,
|
||||
getSortedRequests,
|
||||
getDisplayedRequests,
|
||||
getRequestById,
|
||||
getSelectedRequest,
|
||||
getSortedRequests,
|
||||
} = require("./selectors/index");
|
||||
|
||||
// ms
|
||||
|
@ -224,7 +224,7 @@ RequestsMenuView.prototype = {
|
|||
isXHR,
|
||||
cause,
|
||||
fromCache,
|
||||
fromServiceWorker
|
||||
fromServiceWorker,
|
||||
},
|
||||
true
|
||||
);
|
||||
|
@ -235,13 +235,15 @@ RequestsMenuView.prototype = {
|
|||
updateRequest: Task.async(function* (id, data) {
|
||||
const action = Actions.updateRequest(id, data, true);
|
||||
yield this.store.dispatch(action);
|
||||
|
||||
let {
|
||||
responseContent,
|
||||
responseCookies,
|
||||
responseHeaders,
|
||||
requestCookies,
|
||||
requestHeaders,
|
||||
requestPostData,
|
||||
responseContent,
|
||||
responseHeaders,
|
||||
} = action.data;
|
||||
let request = getRequestById(this.store.getState(), action.id);
|
||||
|
||||
if (requestHeaders && requestHeaders.headers && requestHeaders.headers.length) {
|
||||
let headers = yield fetchHeaders(
|
||||
|
@ -267,26 +269,23 @@ RequestsMenuView.prototype = {
|
|||
}
|
||||
}
|
||||
|
||||
if (responseContent && responseContent.content) {
|
||||
let request = getRequestById(this.store.getState(), action.id);
|
||||
if (request) {
|
||||
let { mimeType } = request;
|
||||
let { text, encoding } = responseContent.content;
|
||||
let response = yield gNetwork.getString(text);
|
||||
let payload = {};
|
||||
if (request && responseContent && responseContent.content) {
|
||||
let { mimeType } = request;
|
||||
let { text, encoding } = responseContent.content;
|
||||
let response = yield gNetwork.getString(text);
|
||||
let payload = {};
|
||||
|
||||
if (mimeType.includes("image/")) {
|
||||
payload.responseContentDataUri = formDataURI(mimeType, encoding, response);
|
||||
}
|
||||
if (mimeType.includes("image/")) {
|
||||
payload.responseContentDataUri = formDataURI(mimeType, encoding, response);
|
||||
}
|
||||
|
||||
responseContent.content.text = response;
|
||||
payload.responseContent = responseContent;
|
||||
responseContent.content.text = response;
|
||||
payload.responseContent = responseContent;
|
||||
|
||||
yield this.store.dispatch(Actions.updateRequest(action.id, payload, true));
|
||||
yield this.store.dispatch(Actions.updateRequest(action.id, payload, true));
|
||||
|
||||
if (mimeType.includes("image/")) {
|
||||
window.emit(EVENTS.RESPONSE_IMAGE_THUMBNAIL_DISPLAYED);
|
||||
}
|
||||
if (mimeType.includes("image/")) {
|
||||
window.emit(EVENTS.RESPONSE_IMAGE_THUMBNAIL_DISPLAYED);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -306,6 +305,51 @@ RequestsMenuView.prototype = {
|
|||
|
||||
yield this.store.dispatch(Actions.updateRequest(action.id, payload, true));
|
||||
}
|
||||
|
||||
// Fetch request and response cookies long value.
|
||||
// Actor does not provide full sized cookie value when the value is too long
|
||||
// To display values correctly, we need fetch them in each request.
|
||||
if (requestCookies) {
|
||||
let reqCookies = [];
|
||||
// request store cookies in requestCookies or requestCookies.cookies
|
||||
let cookies = requestCookies.cookies ?
|
||||
requestCookies.cookies : requestCookies;
|
||||
// make sure cookies is iterable
|
||||
if (typeof cookies[Symbol.iterator] === "function") {
|
||||
for (let cookie of cookies) {
|
||||
reqCookies.push(Object.assign({}, cookie, {
|
||||
value: yield gNetwork.getString(cookie.value),
|
||||
}));
|
||||
}
|
||||
if (reqCookies.length) {
|
||||
yield this.store.dispatch(Actions.updateRequest(
|
||||
action.id,
|
||||
{ requestCookies: reqCookies },
|
||||
true));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (responseCookies) {
|
||||
let resCookies = [];
|
||||
// response store cookies in responseCookies or responseCookies.cookies
|
||||
let cookies = responseCookies.cookies ?
|
||||
responseCookies.cookies : responseCookies;
|
||||
// make sure cookies is iterable
|
||||
if (typeof cookies[Symbol.iterator] === "function") {
|
||||
for (let cookie of cookies) {
|
||||
resCookies.push(Object.assign({}, cookie, {
|
||||
value: yield gNetwork.getString(cookie.value),
|
||||
}));
|
||||
}
|
||||
if (resCookies.length) {
|
||||
yield this.store.dispatch(Actions.updateRequest(
|
||||
action.id,
|
||||
{ responseCookies: resCookies },
|
||||
true));
|
||||
}
|
||||
}
|
||||
}
|
||||
}),
|
||||
|
||||
/**
|
||||
|
|
|
@ -97,6 +97,32 @@ const getSelectedRequest = createSelector(
|
|||
({ selectedId, requests }) => selectedId ? requests.get(selectedId) : null
|
||||
);
|
||||
|
||||
const getSelectedRequestCookies = createSelector(
|
||||
getSelectedRequest,
|
||||
selectedRequest => {
|
||||
// request store cookies in requestCookies or requestCookies.cookies
|
||||
if (selectedRequest && selectedRequest.requestCookies) {
|
||||
return selectedRequest.requestCookies.cookies ?
|
||||
selectedRequest.requestCookies.cookies : selectedRequest.requestCookies;
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
);
|
||||
|
||||
const getSelectedResponseCookies = createSelector(
|
||||
getSelectedRequest,
|
||||
selectedRequest => {
|
||||
// response store cookies in responseCookies or responseCookies.cookies
|
||||
if (selectedRequest && selectedRequest.responseCookies) {
|
||||
return selectedRequest.responseCookies.cookies ?
|
||||
selectedRequest.responseCookies.cookies : selectedRequest.responseCookies;
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
);
|
||||
|
||||
function getRequestById(state, id) {
|
||||
return state.requests.requests.get(id);
|
||||
}
|
||||
|
@ -111,5 +137,7 @@ module.exports = {
|
|||
getDisplayedRequestsSummary,
|
||||
getRequestById,
|
||||
getSelectedRequest,
|
||||
getSelectedRequestCookies,
|
||||
getSelectedResponseCookies,
|
||||
getSortedRequests,
|
||||
};
|
||||
|
|
|
@ -0,0 +1,99 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
"use strict";
|
||||
|
||||
const {
|
||||
createFactory,
|
||||
DOM,
|
||||
PropTypes,
|
||||
} = require("devtools/client/shared/vendor/react");
|
||||
const { connect } = require("devtools/client/shared/vendor/react-redux");
|
||||
const { L10N } = require("../../l10n");
|
||||
const {
|
||||
getSelectedRequestCookies,
|
||||
getSelectedResponseCookies,
|
||||
} = require("../../selectors/index");
|
||||
|
||||
// Component
|
||||
const PropertiesView = createFactory(require("./properties-view"));
|
||||
|
||||
const { div } = DOM;
|
||||
|
||||
const COOKIES_EMPTY_TEXT = L10N.getStr("cookiesEmptyText");
|
||||
const COOKIES_FILTER_TEXT = L10N.getStr("cookiesFilterText");
|
||||
const REQUEST_COOKIES = L10N.getStr("requestCookies");
|
||||
const RESPONSE_COOKIES = L10N.getStr("responseCookies");
|
||||
const SECTION_NAMES = [
|
||||
RESPONSE_COOKIES,
|
||||
REQUEST_COOKIES,
|
||||
];
|
||||
|
||||
/*
|
||||
* Cookies panel component
|
||||
* This tab lists full details of any cookies sent with the request or response
|
||||
*/
|
||||
function CookiesPanel({
|
||||
request,
|
||||
response,
|
||||
}) {
|
||||
if (!response.length && !request.length) {
|
||||
return div({ className: "empty-notice" },
|
||||
COOKIES_EMPTY_TEXT
|
||||
);
|
||||
}
|
||||
|
||||
let object = {};
|
||||
if (response.length) {
|
||||
object[RESPONSE_COOKIES] = getProperties(response);
|
||||
}
|
||||
if (request.length) {
|
||||
object[REQUEST_COOKIES] = getProperties(request);
|
||||
}
|
||||
|
||||
return (
|
||||
PropertiesView({
|
||||
object,
|
||||
filterPlaceHolder: COOKIES_FILTER_TEXT,
|
||||
sectionNames: SECTION_NAMES,
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
CookiesPanel.displayName = "CookiesPanel";
|
||||
|
||||
CookiesPanel.propTypes = {
|
||||
request: PropTypes.array.isRequired,
|
||||
response: PropTypes.array.isRequired,
|
||||
};
|
||||
|
||||
/**
|
||||
* Mapping array to dict for TreeView usage.
|
||||
* Since TreeView only support Object(dict) format.
|
||||
*
|
||||
* @param {Object[]} arr - key-value pair array like cookies or params
|
||||
* @returns {Object}
|
||||
*/
|
||||
function getProperties(arr) {
|
||||
return arr.reduce((map, obj) => {
|
||||
// Generally cookies object contains only name and value properties and can
|
||||
// be rendered as name: value pair.
|
||||
// When there are more properties in cookies object such as extra or path,
|
||||
// We will pass the object to display these extra information
|
||||
if (Object.keys(obj).length > 2) {
|
||||
map[obj.name] = Object.assign({}, obj);
|
||||
delete map[obj.name].name;
|
||||
} else {
|
||||
map[obj.name] = obj.value;
|
||||
}
|
||||
return map;
|
||||
}, {});
|
||||
}
|
||||
|
||||
module.exports = connect(
|
||||
state => ({
|
||||
request: getSelectedRequestCookies(state),
|
||||
response: getSelectedResponseCookies(state),
|
||||
})
|
||||
)(CookiesPanel);
|
|
@ -3,6 +3,7 @@
|
|||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
DevToolsModules(
|
||||
'cookies-panel.js',
|
||||
'editor.js',
|
||||
'headers-panel.js',
|
||||
'params-panel.js',
|
||||
|
|
|
@ -17,3 +17,6 @@ DevToolsModules(
|
|||
|
||||
BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
|
||||
XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
|
||||
|
||||
with Files('**'):
|
||||
BUG_COMPONENT = ('Firefox', 'Developer Tools: Performance Tools (Profiler/Timeline)')
|
||||
|
|
|
@ -26,3 +26,6 @@ DevToolsModules(
|
|||
|
||||
XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
|
||||
BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini']
|
||||
|
||||
with Files('**'):
|
||||
BUG_COMPONENT = ('Firefox', 'Developer Tools: Responsive Design Mode')
|
||||
|
|
|
@ -9,3 +9,6 @@ DevToolsModules(
|
|||
'responsivedesign-child.js',
|
||||
'responsivedesign.jsm',
|
||||
)
|
||||
|
||||
with Files('**'):
|
||||
BUG_COMPONENT = ('Firefox', 'Developer Tools: Responsive Design Mode')
|
||||
|
|
|
@ -11,3 +11,6 @@ DevToolsModules(
|
|||
)
|
||||
|
||||
BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
|
||||
|
||||
with Files('**'):
|
||||
BUG_COMPONENT = ('Firefox', 'Developer Tools: Scratchpad')
|
||||
|
|
|
@ -8,3 +8,6 @@ DevToolsModules(
|
|||
)
|
||||
|
||||
BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
|
||||
|
||||
with Files('**'):
|
||||
BUG_COMPONENT = ('Firefox', 'Developer Tools: WebGL Shader Editor')
|
||||
|
|
|
@ -53,3 +53,9 @@ DevToolsModules(
|
|||
'webgl-utils.js',
|
||||
'zoom-keys.js',
|
||||
)
|
||||
|
||||
with Files('**'):
|
||||
BUG_COMPONENT = ('Firefox', 'Developer Tools')
|
||||
|
||||
with Files('components/**'):
|
||||
BUG_COMPONENT = ('Firefox', 'Developer Tools: Shared Components')
|
||||
|
|
|
@ -16,3 +16,6 @@ DevToolsModules(
|
|||
)
|
||||
|
||||
BROWSER_CHROME_MANIFESTS += ['test/browser.ini']
|
||||
|
||||
with Files('**'):
|
||||
BUG_COMPONENT = ('Firefox', 'Developer Tools: Source Editor')
|
||||
|
|
|
@ -10,3 +10,6 @@ DevToolsModules(
|
|||
'panel.js',
|
||||
'ui.js'
|
||||
)
|
||||
|
||||
with Files('**'):
|
||||
BUG_COMPONENT = ('Firefox', 'Developer Tools: Storage Inspector')
|
||||
|
|
|
@ -13,3 +13,6 @@ DevToolsModules(
|
|||
'StyleEditorUtil.jsm',
|
||||
'StyleSheetEditor.jsm',
|
||||
)
|
||||
|
||||
with Files('**'):
|
||||
BUG_COMPONENT = ('Firefox', 'Developer Tools: Style Editor')
|
||||
|
|
|
@ -1272,6 +1272,7 @@
|
|||
* FIXME: normal html block element cannot fill outer XUL element
|
||||
* This workaround should be removed after netmonitor is migrated to react
|
||||
*/
|
||||
#react-cookies-tabpanel-hook,
|
||||
#react-headers-tabpanel-hook,
|
||||
#react-params-tabpanel-hook,
|
||||
#react-preview-tabpanel-hook,
|
||||
|
@ -1286,6 +1287,7 @@
|
|||
}
|
||||
|
||||
/* For vbox */
|
||||
#react-cookies-tabpanel-hook,
|
||||
#react-headers-tabpanel-hook,
|
||||
#react-params-tabpanel-hook,
|
||||
#react-preview-tabpanel-hook,
|
||||
|
|