This commit is contained in:
Wes Kocher 2016-09-06 17:36:13 -07:00
Родитель f71c6f3bf9 8eb4fd2c7b
Коммит 72e0587c82
37 изменённых файлов: 6913 добавлений и 5027 удалений

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

@ -704,8 +704,6 @@
aria-label="&urlbar.webRTCShareMicrophoneNotificationAnchor.label;"/> aria-label="&urlbar.webRTCShareMicrophoneNotificationAnchor.label;"/>
<image data-permission-id="screen" class="blocked-permission-icon screen-icon" role="button" <image data-permission-id="screen" class="blocked-permission-icon screen-icon" role="button"
aria-label="&urlbar.webRTCShareScreenNotificationAnchor.label;"/> aria-label="&urlbar.webRTCShareScreenNotificationAnchor.label;"/>
<image data-permission-id="pointerLock" class="blocked-permission-icon pointerLock-icon" role="button"
aria-label="&urlbar.pointerLockNotificationAnchor.label;"/>
</box> </box>
<box id="notification-popup-box" <box id="notification-popup-box"
hidden="true" hidden="true"
@ -735,8 +733,6 @@
aria-label="&urlbar.webRTCShareMicrophoneNotificationAnchor.label;"/> aria-label="&urlbar.webRTCShareMicrophoneNotificationAnchor.label;"/>
<image id="webRTC-shareScreen-notification-icon" class="notification-anchor-icon screen-icon" role="button" <image id="webRTC-shareScreen-notification-icon" class="notification-anchor-icon screen-icon" role="button"
aria-label="&urlbar.webRTCShareScreenNotificationAnchor.label;"/> aria-label="&urlbar.webRTCShareScreenNotificationAnchor.label;"/>
<image id="pointerLock-notification-icon" class="notification-anchor-icon pointerLock-icon" role="button"
aria-label="&urlbar.pointerLockNotificationAnchor.label;"/>
<image id="servicesInstall-notification-icon" class="notification-anchor-icon service-icon" role="button" <image id="servicesInstall-notification-icon" class="notification-anchor-icon service-icon" role="button"
aria-label="&urlbar.servicesNotificationAnchor.label;"/> aria-label="&urlbar.servicesNotificationAnchor.label;"/>
<image id="translate-notification-icon" class="notification-anchor-icon translation-icon" role="button" <image id="translate-notification-icon" class="notification-anchor-icon translation-icon" role="button"

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

@ -44,12 +44,6 @@
</popupnotificationcontent> </popupnotificationcontent>
</popupnotification> </popupnotification>
<popupnotification id="pointerLock-notification" hidden="true">
<popupnotificationcontent orient="vertical" align="start">
<label id="pointerLock-cancel">&pointerLock.notification.message;</label>
</popupnotificationcontent>
</popupnotification>
<popupnotification id="password-notification" hidden="true"> <popupnotification id="password-notification" hidden="true">
<popupnotificationcontent orient="vertical"> <popupnotificationcontent orient="vertical">
<textbox id="password-notification-username"/> <textbox id="password-notification-username"/>

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

@ -222,7 +222,6 @@ These should match what Safari and other Apple applications use on OS X Lion. --
<!ENTITY urlbar.webRTCShareMicrophoneNotificationAnchor.label "Manage sharing your microphone with the site"> <!ENTITY urlbar.webRTCShareMicrophoneNotificationAnchor.label "Manage sharing your microphone with the site">
<!ENTITY urlbar.webRTCShareScreenNotificationAnchor.label "Manage sharing your windows or screen with the site"> <!ENTITY urlbar.webRTCShareScreenNotificationAnchor.label "Manage sharing your windows or screen with the site">
<!ENTITY urlbar.pointerLockNotificationAnchor.label "Change whether the site can hide the pointer">
<!ENTITY urlbar.servicesNotificationAnchor.label "View the service install message"> <!ENTITY urlbar.servicesNotificationAnchor.label "View the service install message">
<!ENTITY urlbar.translateNotificationAnchor.label "Translate this page"> <!ENTITY urlbar.translateNotificationAnchor.label "Translate this page">
<!ENTITY urlbar.translatedNotificationAnchor.label "Manage page translation"> <!ENTITY urlbar.translatedNotificationAnchor.label "Manage page translation">
@ -830,8 +829,6 @@ you can use these alternative items. Otherwise, their values should be empty. -
<!ENTITY trackingContentBlocked.block.accesskey "E"> <!ENTITY trackingContentBlocked.block.accesskey "E">
<!ENTITY trackingContentBlocked.disabled.message "Tracking protection is disabled"> <!ENTITY trackingContentBlocked.disabled.message "Tracking protection is disabled">
<!ENTITY pointerLock.notification.message "Press ESC at any time to show it again.">
<!ENTITY pluginNotification.showAll.label "Show All"> <!ENTITY pluginNotification.showAll.label "Show All">
<!ENTITY pluginNotification.showAll.accesskey "S"> <!ENTITY pluginNotification.showAll.accesskey "S">

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

@ -52,14 +52,12 @@
.login-icon, .login-icon,
.microphone-icon, .microphone-icon,
.plugin-icon, .plugin-icon,
.pointerLock-icon,
.popup-icon, .popup-icon,
.screen-icon, .screen-icon,
.desktop-notification-icon, .desktop-notification-icon,
.popup-notification-icon[popupid="geolocation"], .popup-notification-icon[popupid="geolocation"],
.popup-notification-icon[popupid="indexedDB-permissions-prompt"], .popup-notification-icon[popupid="indexedDB-permissions-prompt"],
.popup-notification-icon[popupid="password"], .popup-notification-icon[popupid="password"],
.popup-notification-icon[popupid="pointerLock"],
.popup-notification-icon[popupid="webRTC-shareDevices"], .popup-notification-icon[popupid="webRTC-shareDevices"],
.popup-notification-icon[popupid="webRTC-shareMicrophone"], .popup-notification-icon[popupid="webRTC-shareMicrophone"],
.popup-notification-icon[popupid="webRTC-shareScreen"], .popup-notification-icon[popupid="webRTC-shareScreen"],
@ -166,15 +164,6 @@
list-style-image: url(chrome://browser/skin/notification-icons.svg#screen-blocked); list-style-image: url(chrome://browser/skin/notification-icons.svg#screen-blocked);
} }
.popup-notification-icon[popupid="pointerLock"],
.pointerLock-icon {
list-style-image: url(chrome://browser/skin/notification-icons.svg#pointerLock);
}
.pointerLock-icon.blocked-permission-icon {
list-style-image: url(chrome://browser/skin/notification-icons.svg#pointerLock-blocked);
}
/* This icon has a block sign in it, so we don't need a blocked version. */ /* This icon has a block sign in it, so we don't need a blocked version. */
.popup-icon { .popup-icon {
list-style-image: url("chrome://browser/skin/notification-icons.svg#popup"); list-style-image: url("chrome://browser/skin/notification-icons.svg#popup");

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

@ -34,7 +34,6 @@
<path id="microphone-icon" d="m 8,14 0,4 a 8,8 0 0 0 6,7.7 l 0,2.3 -2,0 a 2,2 0 0 0 -2,2 l 12,0 a 2,2 0 0 0 -2,-2 l -2,0 0,-2.3 a 8,8 0 0 0 6,-7.7 l 0,-4 -2,0 0,4 a 6,6 0 0 1 -12,0 l 0,-4 z m 4,4 a 4,4 0 0 0 8,0 l 0,-12 a 4,4 0 0 0 -8,0 z" /> <path id="microphone-icon" d="m 8,14 0,4 a 8,8 0 0 0 6,7.7 l 0,2.3 -2,0 a 2,2 0 0 0 -2,2 l 12,0 a 2,2 0 0 0 -2,-2 l -2,0 0,-2.3 a 8,8 0 0 0 6,-7.7 l 0,-4 -2,0 0,4 a 6,6 0 0 1 -12,0 l 0,-4 z m 4,4 a 4,4 0 0 0 8,0 l 0,-12 a 4,4 0 0 0 -8,0 z" />
<path id="microphone-detailed-icon" d="m 8,18 a 8,8 0 0 0 6,7.7 l 0,2.3 -1,0 a 3,2 0 0 0 -3,2 l 12,0 a 3,2 0 0 0 -3,-2 l -1,0 0,-2.3 a 8,8 0 0 0 6,-7.7 l 0,-4 a 1,1 0 0 0 -2,0 l 0,4 a 6,6 0 0 1 -12,0 l 0,-4 a 1,1 0 0 0 -2,0 z m 4,0 a 4,4 0 0 0 8,0 l 0,-12 a 4,4 0 0 0 -8,0 z" /> <path id="microphone-detailed-icon" d="m 8,18 a 8,8 0 0 0 6,7.7 l 0,2.3 -1,0 a 3,2 0 0 0 -3,2 l 12,0 a 3,2 0 0 0 -3,-2 l -1,0 0,-2.3 a 8,8 0 0 0 6,-7.7 l 0,-4 a 1,1 0 0 0 -2,0 l 0,4 a 6,6 0 0 1 -12,0 l 0,-4 a 1,1 0 0 0 -2,0 z m 4,0 a 4,4 0 0 0 8,0 l 0,-12 a 4,4 0 0 0 -8,0 z" />
<path id="plugin-icon" d="m 2,26 a 2,2 0 0 0 2,2 l 24,0 a 2,2 0 0 0 2,-2 l 0,-16 a 2,2 0 0 0 -2,-2 l -24,0 a 2,2 0 0 0 -2,2 z m 2,-20 10,0 0,-2 a 2,2 0 0 0 -2,-2 l -6,0 a 2,2 0 0 0 -2,2 z m 14,0 10,0 0,-2 a 2,2 0 0 0 -2,-2 l -6,0 a 2,2 0 0 0 -2,2 z" /> <path id="plugin-icon" d="m 2,26 a 2,2 0 0 0 2,2 l 24,0 a 2,2 0 0 0 2,-2 l 0,-16 a 2,2 0 0 0 -2,-2 l -24,0 a 2,2 0 0 0 -2,2 z m 2,-20 10,0 0,-2 a 2,2 0 0 0 -2,-2 l -6,0 a 2,2 0 0 0 -2,2 z m 14,0 10,0 0,-2 a 2,2 0 0 0 -2,-2 l -6,0 a 2,2 0 0 0 -2,2 z" />
<path id="pointerLock-icon" d="m 8,24 6,-5 5,10 4,-2 -5,-10 7,-1 -17,-14 z" />
<path id="popup-icon" d="m 2,24 a 4,4 0 0 0 4,4 l 8,0 a 10,10 0 0 1 -2,-4 l -4,0 a 2,2 0 0 1 -2,-2 l 0,-12 18,0 0,2 a 10,10 0 0 1 4,2 l 0,-8 a 4,4 0 0 0 -4,-4 l -18,0 a 4,4 0 0 0 -4,4 z m 12,-2.1 a 8,8 0 1 1 0,0.2 m 10.7,-4.3 a 5,5 0 0 0 -6.9,6.9 z m -5.4,8.4 a 5,5 0 0 0 6.9,-6.9 z" /> <path id="popup-icon" d="m 2,24 a 4,4 0 0 0 4,4 l 8,0 a 10,10 0 0 1 -2,-4 l -4,0 a 2,2 0 0 1 -2,-2 l 0,-12 18,0 0,2 a 10,10 0 0 1 4,2 l 0,-8 a 4,4 0 0 0 -4,-4 l -18,0 a 4,4 0 0 0 -4,4 z m 12,-2.1 a 8,8 0 1 1 0,0.2 m 10.7,-4.3 a 5,5 0 0 0 -6.9,6.9 z m -5.4,8.4 a 5,5 0 0 0 6.9,-6.9 z" />
<path id="screen-icon" d="m 2,18 a 2,2 0 0 0 2,2 l 2,0 0,-6 a 4,4 0 0 1 4,-4 l 14,0 0,-6 a 2,2 0 0 0 -2,-2 l -18,0 a 2,2 0 0 0 -2,2 z m 6,10 a 2,2 0 0 0 2,2 l 18,0 a 2,2 0 0 0 2,-2 l 0,-14 a 2,2 0 0 0 -2,-2 l -18,0 a 2,2 0 0 0 -2,2 z" /> <path id="screen-icon" d="m 2,18 a 2,2 0 0 0 2,2 l 2,0 0,-6 a 4,4 0 0 1 4,-4 l 14,0 0,-6 a 2,2 0 0 0 -2,-2 l -18,0 a 2,2 0 0 0 -2,2 z m 6,10 a 2,2 0 0 0 2,2 l 18,0 a 2,2 0 0 0 2,-2 l 0,-14 a 2,2 0 0 0 -2,-2 l -18,0 a 2,2 0 0 0 -2,2 z" />
@ -64,8 +63,6 @@
<use id="microphone-detailed" xlink:href="#microphone-detailed-icon" /> <use id="microphone-detailed" xlink:href="#microphone-detailed-icon" />
<use id="plugin" xlink:href="#plugin-icon" /> <use id="plugin" xlink:href="#plugin-icon" />
<use id="plugin-blocked" class="blocked" xlink:href="#plugin-icon" /> <use id="plugin-blocked" class="blocked" xlink:href="#plugin-icon" />
<use id="pointerLock" xlink:href="#pointerLock-icon" />
<use id="pointerLock-blocked" class="blocked" xlink:href="#pointerLock-icon" />
<use id="popup" xlink:href="#popup-icon" /> <use id="popup" xlink:href="#popup-icon" />
<use id="screen" xlink:href="#screen-icon" /> <use id="screen" xlink:href="#screen-icon" />
<use id="screen-blocked" class="blocked" xlink:href="#screen-icon" /> <use id="screen-blocked" class="blocked" xlink:href="#screen-icon" />

До

Ширина:  |  Высота:  |  Размер: 6.1 KiB

После

Ширина:  |  Высота:  |  Размер: 5.8 KiB

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

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

@ -30,7 +30,10 @@ module.exports = function(name, props) { // eslint-disable-line
if (!svg[name]) { if (!svg[name]) {
throw new Error("Unknown SVG: " + name); throw new Error("Unknown SVG: " + name);
} }
let className = props ? `${name} ${props.className}` : name; let className = name;
if (props && props.className) {
className = `${name} ${props.className}`;
}
if (name === "subSettings") { if (name === "subSettings") {
className = ""; className = "";
} }

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

@ -18,15 +18,52 @@ DebuggerPanel.prototype = {
} }
return targetPromise.then(() => { return targetPromise.then(() => {
const dbg = this.panelWin.Debugger; this.panelWin.Debugger.bootstrap({
dbg.setThreadClient(this.toolbox.threadClient); threadClient: this.toolbox.threadClient,
dbg.setTabTarget(this.toolbox.target); tabTarget: this.toolbox.target
dbg.initPage(dbg.getActions()); });
dbg.renderApp();
return this; return this;
}); });
}, },
_store: function() {
return this.panelWin.Debugger.store;
},
_getState: function() {
return this._store().getState();
},
_actions: function() {
return this.panelWin.Debugger.actions;
},
_selectors: function() {
return this.panelWin.Debugger.selectors;
},
getFrames: function() {
let frames = this._selectors().getFrames(this._getState());
// frames is an empty array when the debugger is not paused
if (!frames.toJS) {
return {
frames: [],
selected: -1
}
}
frames = frames.toJS();
const selectedFrame = this._selectors().getSelectedFrame(this._getState());
const selected = frames.findIndex(frame => frame.id == selectedFrame.id);
frames.forEach(frame => {
frame.actor = frame.id;
});
return { frames, selected };
},
destroy: function() { destroy: function() {
} }
}; };

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

@ -46,7 +46,7 @@ var Debugger =
/***/ 0: /***/ 0:
/***/ function(module, exports, __webpack_require__) { /***/ function(module, exports, __webpack_require__) {
var prettyFast = __webpack_require__(515); var prettyFast = __webpack_require__(544);
self.onmessage = function (msg) { self.onmessage = function (msg) {
var _prettyPrint = prettyPrint(msg.data); var _prettyPrint = prettyPrint(msg.data);
@ -100,7 +100,7 @@ var Debugger =
/***/ }, /***/ },
/***/ 515: /***/ 544:
/***/ function(module, exports, __webpack_require__) { /***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/* -*- indent-tabs-mode: nil; js-indent-level: 2; fill-column: 80 -*- */ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/* -*- indent-tabs-mode: nil; js-indent-level: 2; fill-column: 80 -*- */
@ -122,8 +122,8 @@ var Debugger =
}(this, function () { }(this, function () {
"use strict"; "use strict";
var acorn = this.acorn || __webpack_require__(516); var acorn = this.acorn || __webpack_require__(545);
var sourceMap = this.sourceMap || __webpack_require__(517); var sourceMap = this.sourceMap || __webpack_require__(546);
var SourceNode = sourceMap.SourceNode; var SourceNode = sourceMap.SourceNode;
// If any of these tokens are seen before a "[" token, we know that "[" token // If any of these tokens are seen before a "[" token, we know that "[" token
@ -982,7 +982,7 @@ var Debugger =
/***/ }, /***/ },
/***/ 516: /***/ 545:
/***/ function(module, exports, __webpack_require__) { /***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// Acorn is a tiny, fast JavaScript parser written in JavaScript. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;// Acorn is a tiny, fast JavaScript parser written in JavaScript.
@ -3642,7 +3642,7 @@ var Debugger =
/***/ }, /***/ },
/***/ 517: /***/ 546:
/***/ function(module, exports, __webpack_require__) { /***/ function(module, exports, __webpack_require__) {
/* /*
@ -3650,14 +3650,14 @@ var Debugger =
* Licensed under the New BSD license. See LICENSE.txt or: * Licensed under the New BSD license. See LICENSE.txt or:
* http://opensource.org/licenses/BSD-3-Clause * http://opensource.org/licenses/BSD-3-Clause
*/ */
exports.SourceMapGenerator = __webpack_require__(518).SourceMapGenerator; exports.SourceMapGenerator = __webpack_require__(547).SourceMapGenerator;
exports.SourceMapConsumer = __webpack_require__(524).SourceMapConsumer; exports.SourceMapConsumer = __webpack_require__(553).SourceMapConsumer;
exports.SourceNode = __webpack_require__(526).SourceNode; exports.SourceNode = __webpack_require__(555).SourceNode;
/***/ }, /***/ },
/***/ 518: /***/ 547:
/***/ function(module, exports, __webpack_require__) { /***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */ var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -3671,10 +3671,10 @@ var Debugger =
} }
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) { !(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) {
var base64VLQ = __webpack_require__(519); var base64VLQ = __webpack_require__(548);
var util = __webpack_require__(521); var util = __webpack_require__(550);
var ArraySet = __webpack_require__(522).ArraySet; var ArraySet = __webpack_require__(551).ArraySet;
var MappingList = __webpack_require__(523).MappingList; var MappingList = __webpack_require__(552).MappingList;
/** /**
* An instance of the SourceMapGenerator represents a source map which is * An instance of the SourceMapGenerator represents a source map which is
@ -4064,7 +4064,7 @@ var Debugger =
/***/ }, /***/ },
/***/ 519: /***/ 548:
/***/ function(module, exports, __webpack_require__) { /***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */ var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -4108,7 +4108,7 @@ var Debugger =
} }
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) { !(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) {
var base64 = __webpack_require__(520); var base64 = __webpack_require__(549);
// A single base 64 digit can contain 6 bits of data. For the base 64 variable // A single base 64 digit can contain 6 bits of data. For the base 64 variable
// length quantities we use in the source map spec, the first bit is the sign, // length quantities we use in the source map spec, the first bit is the sign,
@ -4213,7 +4213,7 @@ var Debugger =
/***/ }, /***/ },
/***/ 520: /***/ 549:
/***/ function(module, exports, __webpack_require__) { /***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */ var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -4262,7 +4262,7 @@ var Debugger =
/***/ }, /***/ },
/***/ 521: /***/ 550:
/***/ function(module, exports, __webpack_require__) { /***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */ var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -4588,7 +4588,7 @@ var Debugger =
/***/ }, /***/ },
/***/ 522: /***/ 551:
/***/ function(module, exports, __webpack_require__) { /***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */ var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -4602,7 +4602,7 @@ var Debugger =
} }
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) { !(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) {
var util = __webpack_require__(521); var util = __webpack_require__(550);
/** /**
* A data structure which is a combination of an array and a set. Adding a new * A data structure which is a combination of an array and a set. Adding a new
@ -4692,7 +4692,7 @@ var Debugger =
/***/ }, /***/ },
/***/ 523: /***/ 552:
/***/ function(module, exports, __webpack_require__) { /***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */ var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -4706,7 +4706,7 @@ var Debugger =
} }
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) { !(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) {
var util = __webpack_require__(521); var util = __webpack_require__(550);
/** /**
* Determine whether mappingB is after mappingA with respect to generated * Determine whether mappingB is after mappingA with respect to generated
@ -4785,7 +4785,7 @@ var Debugger =
/***/ }, /***/ },
/***/ 524: /***/ 553:
/***/ function(module, exports, __webpack_require__) { /***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */ var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -4799,10 +4799,10 @@ var Debugger =
} }
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) { !(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) {
var util = __webpack_require__(521); var util = __webpack_require__(550);
var binarySearch = __webpack_require__(525); var binarySearch = __webpack_require__(554);
var ArraySet = __webpack_require__(522).ArraySet; var ArraySet = __webpack_require__(551).ArraySet;
var base64VLQ = __webpack_require__(519); var base64VLQ = __webpack_require__(548);
/** /**
* A SourceMapConsumer instance represents a parsed source map which we can * A SourceMapConsumer instance represents a parsed source map which we can
@ -5367,7 +5367,7 @@ var Debugger =
/***/ }, /***/ },
/***/ 525: /***/ 554:
/***/ function(module, exports, __webpack_require__) { /***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */ var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -5454,7 +5454,7 @@ var Debugger =
/***/ }, /***/ },
/***/ 526: /***/ 555:
/***/ function(module, exports, __webpack_require__) { /***/ function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */ var __WEBPACK_AMD_DEFINE_RESULT__;/* -*- Mode: js; js-indent-level: 2; -*- */
@ -5468,8 +5468,8 @@ var Debugger =
} }
!(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) { !(__WEBPACK_AMD_DEFINE_RESULT__ = function (require, exports, module) {
var SourceMapGenerator = __webpack_require__(518).SourceMapGenerator; var SourceMapGenerator = __webpack_require__(547).SourceMapGenerator;
var util = __webpack_require__(521); var util = __webpack_require__(550);
// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other
// operating systems these days (capturing the result). // operating systems these days (capturing the result).

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

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

@ -93,6 +93,19 @@ DebuggerPanel.prototype = {
// DebuggerPanel API // DebuggerPanel API
getFrames() {
let framesController = this.panelWin.DebuggerController.StackFrames;
let thread = framesController.activeThread;
if (thread && thread.paused) {
return {
frames: thread.cachedFrames,
selected: framesController.currentFrameDepth,
};
}
return null;
},
addBreakpoint: function (location) { addBreakpoint: function (location) {
const { actions } = this.panelWin; const { actions } = this.panelWin;
const { dispatch } = this._controller; const { dispatch } = this._controller;

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

@ -192,12 +192,17 @@ KeyShortcuts.prototype = {
if (shortcut.alt != event.altKey) { if (shortcut.alt != event.altKey) {
return false; return false;
} }
// Shift is a special modifier, it may implicitely be required if the if (shortcut.shift != event.shiftKey) {
// expected key is a special character accessible via shift. // Shift is a special modifier, it may implicitely be required if the expected key
if (shortcut.shift != event.shiftKey && event.key && // is a special character accessible via shift.
event.key.match(/[a-zA-Z]/)) { let isAlphabetical = event.key && event.key.match(/[a-zA-Z]/);
// OSX: distinguish cmd+[key] from cmd+shift+[key] shortcuts (Bug 1300458)
let cmdShortcut = shortcut.meta && !shortcut.alt && !shortcut.ctrl;
if (isAlphabetical || cmdShortcut) {
return false; return false;
} }
}
if (shortcut.keyCode) { if (shortcut.keyCode) {
return event.keyCode == shortcut.keyCode; return event.keyCode == shortcut.keyCode;
} else if (event.key in ElectronKeysMapping) { } else if (event.key in ElectronKeysMapping) {

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

@ -1,12 +1,15 @@
/* Any copyright is dedicated to the Public Domain. /* Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/ */ http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
var isOSX = Services.appinfo.OS === "Darwin"; var isOSX = Services.appinfo.OS === "Darwin";
add_task(function* () { add_task(function* () {
let shortcuts = new KeyShortcuts({ let shortcuts = new KeyShortcuts({
window window
}); });
yield testSimple(shortcuts); yield testSimple(shortcuts);
yield testNonLetterCharacter(shortcuts); yield testNonLetterCharacter(shortcuts);
yield testPlusCharacter(shortcuts); yield testPlusCharacter(shortcuts);
@ -20,6 +23,7 @@ add_task(function* () {
yield testCommandOrControlModifier(shortcuts); yield testCommandOrControlModifier(shortcuts);
yield testCtrlModifier(shortcuts); yield testCtrlModifier(shortcuts);
yield testInvalidShortcutString(shortcuts); yield testInvalidShortcutString(shortcuts);
yield testCmdShiftShortcut(shortcuts);
shortcuts.destroy(); shortcuts.destroy();
yield testTarget(); yield testTarget();
@ -42,7 +46,7 @@ function once(shortcuts, key, listener) {
}); });
} }
function testSimple(shortcuts) { function* testSimple(shortcuts) {
info("Test simple key shortcuts"); info("Test simple key shortcuts");
let onKey = once(shortcuts, "0", (key, event) => { let onKey = once(shortcuts, "0", (key, event) => {
@ -56,7 +60,7 @@ function testSimple(shortcuts) {
yield onKey; yield onKey;
} }
function testNonLetterCharacter(shortcuts) { function* testNonLetterCharacter(shortcuts) {
info("Test non-naive character key shortcuts"); info("Test non-naive character key shortcuts");
let onKey = once(shortcuts, "[", (key, event) => { let onKey = once(shortcuts, "[", (key, event) => {
@ -67,7 +71,7 @@ function testNonLetterCharacter(shortcuts) {
yield onKey; yield onKey;
} }
function testFunctionKey(shortcuts) { function* testFunctionKey(shortcuts) {
info("Test function key shortcuts"); info("Test function key shortcuts");
let onKey = once(shortcuts, "F12", (key, event) => { let onKey = once(shortcuts, "F12", (key, event) => {
@ -81,7 +85,7 @@ function testFunctionKey(shortcuts) {
// Plus is special. It's keycode is the one for "=". That's because it requires // Plus is special. It's keycode is the one for "=". That's because it requires
// shift to be pressed and is behind "=" key. So it should be considered as a // shift to be pressed and is behind "=" key. So it should be considered as a
// character key // character key
function testPlusCharacter(shortcuts) { function* testPlusCharacter(shortcuts) {
info("Test 'Plus' key shortcuts"); info("Test 'Plus' key shortcuts");
let onKey = once(shortcuts, "Plus", (key, event) => { let onKey = once(shortcuts, "Plus", (key, event) => {
@ -93,7 +97,7 @@ function testPlusCharacter(shortcuts) {
} }
// Test they listeners are not mixed up between shortcuts // Test they listeners are not mixed up between shortcuts
function testMixup(shortcuts) { function* testMixup(shortcuts) {
info("Test possible listener mixup"); info("Test possible listener mixup");
let hitFirst = false, hitSecond = false; let hitFirst = false, hitSecond = false;
@ -128,7 +132,7 @@ function testMixup(shortcuts) {
// On azerty keyboard, digits are only available by pressing Shift/Capslock, // On azerty keyboard, digits are only available by pressing Shift/Capslock,
// but we accept them even if we omit doing that. // but we accept them even if we omit doing that.
function testLooseDigits(shortcuts) { function* testLooseDigits(shortcuts) {
info("Test Loose digits"); info("Test Loose digits");
let onKey = once(shortcuts, "0", (key, event) => { let onKey = once(shortcuts, "0", (key, event) => {
is(event.key, "à"); is(event.key, "à");
@ -161,7 +165,7 @@ function testLooseDigits(shortcuts) {
} }
// Test that shortcuts is notified only when the modifiers match exactly // Test that shortcuts is notified only when the modifiers match exactly
function testExactModifiers(shortcuts) { function* testExactModifiers(shortcuts) {
info("Test exact modifiers match"); info("Test exact modifiers match");
let hit = false; let hit = false;
@ -209,7 +213,7 @@ function testExactModifiers(shortcuts) {
// even if the key didn't explicitely requested Shift modifier. // even if the key didn't explicitely requested Shift modifier.
// For example, `%` on french keyboards is only accessible via Shift. // For example, `%` on french keyboards is only accessible via Shift.
// Same thing for `@` on US keybords. // Same thing for `@` on US keybords.
function testLooseShiftModifier(shortcuts) { function* testLooseShiftModifier(shortcuts) {
info("Test Loose shift modifier"); info("Test Loose shift modifier");
let onKey = once(shortcuts, "%", (key, event) => { let onKey = once(shortcuts, "%", (key, event) => {
is(event.key, "%"); is(event.key, "%");
@ -239,7 +243,7 @@ function testLooseShiftModifier(shortcuts) {
} }
// But Shift modifier is strict on all letter characters (a to Z) // But Shift modifier is strict on all letter characters (a to Z)
function testStrictLetterShiftModifier(shortcuts) { function* testStrictLetterShiftModifier(shortcuts) {
info("Test strict shift modifier on letters"); info("Test strict shift modifier on letters");
let hitFirst = false; let hitFirst = false;
let onKey = once(shortcuts, "a", (key, event) => { let onKey = once(shortcuts, "a", (key, event) => {
@ -271,7 +275,7 @@ function testStrictLetterShiftModifier(shortcuts) {
yield onKey; yield onKey;
} }
function testAltModifier(shortcuts) { function* testAltModifier(shortcuts) {
info("Test Alt modifier"); info("Test Alt modifier");
let onKey = once(shortcuts, "Alt+F1", (key, event) => { let onKey = once(shortcuts, "Alt+F1", (key, event) => {
is(event.keyCode, window.KeyboardEvent.DOM_VK_F1); is(event.keyCode, window.KeyboardEvent.DOM_VK_F1);
@ -287,7 +291,7 @@ function testAltModifier(shortcuts) {
yield onKey; yield onKey;
} }
function testCommandOrControlModifier(shortcuts) { function* testCommandOrControlModifier(shortcuts) {
info("Test CommandOrControl modifier"); info("Test CommandOrControl modifier");
let onKey = once(shortcuts, "CommandOrControl+F1", (key, event) => { let onKey = once(shortcuts, "CommandOrControl+F1", (key, event) => {
is(event.keyCode, window.KeyboardEvent.DOM_VK_F1); is(event.keyCode, window.KeyboardEvent.DOM_VK_F1);
@ -328,7 +332,7 @@ function testCommandOrControlModifier(shortcuts) {
yield onKeyAlias; yield onKeyAlias;
} }
function testCtrlModifier(shortcuts) { function* testCtrlModifier(shortcuts) {
info("Test Ctrl modifier"); info("Test Ctrl modifier");
let onKey = once(shortcuts, "Ctrl+F1", (key, event) => { let onKey = once(shortcuts, "Ctrl+F1", (key, event) => {
is(event.keyCode, window.KeyboardEvent.DOM_VK_F1); is(event.keyCode, window.KeyboardEvent.DOM_VK_F1);
@ -352,7 +356,41 @@ function testCtrlModifier(shortcuts) {
yield onKeyAlias; yield onKeyAlias;
} }
function testTarget() { function* testCmdShiftShortcut(shortcuts) {
if (!isOSX) {
// This test is OSX only (Bug 1300458).
return;
}
let onCmdKey = once(shortcuts, "CmdOrCtrl+[", (key, event) => {
is(event.key, "[");
ok(!event.altKey);
ok(!event.ctrlKey);
ok(event.metaKey);
ok(!event.shiftKey);
});
let onCmdShiftKey = once(shortcuts, "CmdOrCtrl+Shift+[", (key, event) => {
is(event.key, "[");
ok(!event.altKey);
ok(!event.ctrlKey);
ok(event.metaKey);
ok(event.shiftKey);
});
EventUtils.synthesizeKey(
"[",
{ metaKey: true, shiftKey: true },
window);
EventUtils.synthesizeKey(
"[",
{ metaKey: true },
window);
yield onCmdKey;
yield onCmdShiftKey;
}
function* testTarget() {
info("Test KeyShortcuts with target argument"); info("Test KeyShortcuts with target argument");
let target = document.createElementNS("http://www.w3.org/1999/xhtml", let target = document.createElementNS("http://www.w3.org/1999/xhtml",

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

@ -521,18 +521,12 @@ WebConsole.prototype = {
return null; return null;
} }
let panel = toolbox.getPanel("jsdebugger"); let panel = toolbox.getPanel("jsdebugger");
if (!panel) { if (!panel) {
return null; return null;
} }
let framesController = panel.panelWin.DebuggerController.StackFrames;
let thread = framesController.activeThread; return panel.getFrames();
if (thread && thread.paused) {
return {
frames: thread.cachedFrames,
selected: framesController.currentFrameDepth,
};
}
return null;
}, },
/** /**

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

@ -122,10 +122,6 @@ struct CustomElementDefinition
// The lifecycle callbacks to call for this custom element. // The lifecycle callbacks to call for this custom element.
nsAutoPtr<mozilla::dom::LifecycleCallbacks> mCallbacks; nsAutoPtr<mozilla::dom::LifecycleCallbacks> mCallbacks;
// Whether we're currently calling the created callback for a custom element
// of this type.
bool mElementIsBeingCreated;
// A construction stack. // A construction stack.
// TODO: Bug 1287348 - Implement construction stack for upgrading an element // TODO: Bug 1287348 - Implement construction stack for upgrading an element

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

@ -14,6 +14,7 @@ flags:
- nexus-5l-eng - nexus-5l-eng
- aries-eng - aries-eng
- android-api-15 - android-api-15
- android-api-15-l10n
- android-api-15-gradle - android-api-15-gradle
- android-api-15-frontend - android-api-15-frontend
- android-partner-sample1 - android-partner-sample1

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

@ -9,6 +9,8 @@ builds:
android-api-15: android-api-15:
platforms: platforms:
- Android - Android
extra-builds: # see RIDEALONG_BUILDS in `mach taskgraph`
- android-api-15-l10n
types: types:
opt: opt:
task: tasks/builds/android_api_15.yml task: tasks/builds/android_api_15.yml

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

@ -121,6 +121,21 @@ builds:
types: types:
opt: opt:
task: tasks/builds/opt_macosx64_st-an.yml task: tasks/builds/opt_macosx64_st-an.yml
android-api-15-l10n:
platforms:
- Android
types:
opt:
task: tasks/builds/android_l10n_api_15.yml
when:
file_patterns:
- mobile/android/locales/all-locales
- python/compare-locales/**
- testing/mozharness/configs/single_locale/**
- testing/mozharness/mozharness/mozilla/l10n/locales.py
- testing/mozharness/scripts/desktop_l10n.py
- toolkit/locales/**
- toolkit/mozapps/installer/**
aries-eng: aries-eng:
platforms: platforms:
- b2g - b2g

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

@ -0,0 +1,19 @@
$inherits:
from: 'tasks/builds/android_l10n_base.yml'
variables:
build_name: 'android-l10n'
platform: 'android-api-15'
task:
metadata:
name: '[TC] Android API 15 Single Locale Repack'
description: 'Android API 15 Single Locale Repack'
workerType: 'android-api-15'
extra:
treeherder:
groupSymbol: tc
groupName: Submitted by taskcluster
tier: 2
symbol: L10n

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

@ -0,0 +1,52 @@
$inherits:
from: 'tasks/l10n.yml'
variables:
platform: 'android-api-15'
build_name: 'android-l10n'
build_product: 'mobile'
build_type: 'opt'
docker-image: desktop-build
task:
scopes:
- 'docker-worker:cache:tooltool-cache'
- 'docker-worker:relengapi-proxy:tooltool.download.public'
- 'docker-worker:relengapi-proxy:tooltool.download.internal'
- 'docker-worker:cache:level-{{level}}-{{project}}-l10n-{{build_name}}-workspace'
payload:
image:
type: 'task-image'
path: 'public/image.tar'
taskId:
task-reference: "<docker-image>"
cache:
tooltool-cache: '/home/worker/tooltool-cache'
level-{{level}}-{{project}}-l10n-{{build_name}}-workspace: '/home/worker/workspace'
features:
relengAPIProxy: true
env:
MOZHARNESS_SCRIPT: 'mozharness/scripts/mobile_l10n.py'
MOZHARNESS_CONFIG: 'single_locale/{{project}}_{{platform}}.py single_locale/tc_{{platform}}.py'
MOZHARNESS_ACTIONS: 'clone-locales list-locales setup repack upload-repacks summary'
MOZHARNESS_OPTIONS: 'total-chunks=1 this-chunk=1'
JOB_SCRIPT: 'taskcluster/scripts/builder/build-l10n.sh'
MH_BRANCH: {{project}}
MH_BUILD_POOL: taskcluster
# image paths
TOOLTOOL_CACHE: '/home/worker/tooltool-cache'
NEED_XVFB: true
maxRunTime: 18000
command: ["/bin/bash", "bin/build.sh"]
extra:
treeherderEnv:
- production
- staging
treeherder:
machine:
# see https://github.com/mozilla/treeherder/blob/master/ui/js/values.js
platform: {{platform}}

0
taskcluster/scripts/builder/build-l10n.sh Normal file → Executable file
Просмотреть файл

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

@ -137,7 +137,11 @@ class TestTryOptionSyntax(unittest.TestCase):
def test_p_expands_ridealongs(self): def test_p_expands_ridealongs(self):
"-p linux,linux64 includes the RIDEALONG_BUILDS" "-p linux,linux64 includes the RIDEALONG_BUILDS"
tos = TryOptionSyntax('try: -p linux,linux64', empty_graph) tos = TryOptionSyntax('try: -p linux,linux64', empty_graph)
ridealongs = list(itertools.chain.from_iterable(RIDEALONG_BUILDS.itervalues())) ridealongs = list(task
for task in itertools.chain.from_iterable(
RIDEALONG_BUILDS.itervalues()
)
if 'android' not in task) # Don't include android-l10n
self.assertEqual(sorted(tos.platforms), sorted(['linux', 'linux64'] + ridealongs)) self.assertEqual(sorted(tos.platforms), sorted(['linux', 'linux64'] + ridealongs))
def test_u_none(self): def test_u_none(self):

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

@ -126,6 +126,9 @@ UNITTEST_PLATFORM_PRETTY_NAMES = {
# least build-ish things. Sort of. Anyway, these other things are implemented # least build-ish things. Sort of. Anyway, these other things are implemented
# as different "platforms". # as different "platforms".
RIDEALONG_BUILDS = { RIDEALONG_BUILDS = {
'android-api-15': [
'android-api-15-l10n',
],
'linux': [ 'linux': [
'linux-l10n', 'linux-l10n',
], ],

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

@ -10,6 +10,7 @@ import mozfile
from marionette import MarionetteTestCase from marionette import MarionetteTestCase
from marionette_driver import Wait from marionette_driver import Wait
from marionette_driver.errors import NoSuchWindowException
from firefox_puppeteer.api.prefs import Preferences from firefox_puppeteer.api.prefs import Preferences
from firefox_puppeteer.api.software_update import SoftwareUpdate from firefox_puppeteer.api.software_update import SoftwareUpdate
@ -318,8 +319,10 @@ class UpdateTestCase(FirefoxTestCase):
self.restart() self.restart()
def download_and_apply_forced_update(self): def download_and_apply_forced_update(self):
# The update wizard dialog opens automatically after the restart # The update wizard dialog opens automatically after the restart but with a short delay
dialog = self.windows.switch_to(lambda win: type(win) is UpdateWizardDialog) dialog = Wait(self.marionette, ignored_exceptions=[NoSuchWindowException]).until(
lambda _: self.windows.switch_to(lambda win: type(win) is UpdateWizardDialog)
)
# In case of a broken complete update the about window has to be used # In case of a broken complete update the about window has to be used
if self.updates[self.current_update_index]['patch']['is_complete']: if self.updates[self.current_update_index]['patch']['is_complete']:

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

@ -6,6 +6,8 @@ EN_US_BINARY_URL = "http://archive.mozilla.org/pub/mobile/nightly/latest-%s-andr
HG_SHARE_BASE_DIR = "/builds/hg-shared" HG_SHARE_BASE_DIR = "/builds/hg-shared"
config = { config = {
# XXX For Try
"update_gecko_source_to_enUS": False,
"branch": BRANCH, "branch": BRANCH,
"log_name": "single_locale", "log_name": "single_locale",
"objdir": OBJDIR, "objdir": OBJDIR,

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

@ -0,0 +1,18 @@
import os
config = {
"locales_file": "src/mobile/android/locales/all-locales",
"tools_repo": "https://hg.mozilla.org/build/tools",
"mozconfig": "src/mobile/android/config/mozconfigs/android-api-15/l10n-nightly",
"tooltool_config": {
"manifest": "mobile/android/config/tooltool-manifests/android/releng.manifest",
"output_dir": "%(abs_work_dir)s/src",
},
"tooltool_servers": ['http://relengapi/tooltool/'],
"upload_env": {
'UPLOAD_HOST': 'localhost',
'UPLOAD_PATH': '/home/worker/artifacts/',
},
"mozilla_dir": "src/",
}

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

@ -0,0 +1,97 @@
BRANCH = "try"
MOZILLA_DIR = BRANCH
EN_US_BINARY_URL = "http://archive.mozilla.org/pub/" \
"mobile/nightly/latest-mozilla-central-android-api-15/en-US"
config = {
"branch": "try",
"log_name": "single_locale",
"objdir": "obj-l10n",
"is_automation": True,
"buildbot_json_path": "buildprops.json",
"force_clobber": True,
"clobberer_url": "https://api.pub.build.mozilla.org/clobberer/lastclobber",
"locales_file": "%s/mobile/android/locales/all-locales" % MOZILLA_DIR,
"locales_dir": "mobile/android/locales",
"ignore_locales": ["en-US"],
"nightly_build": False,
'balrog_credentials_file': 'oauth.txt',
"tools_repo": "https://hg.mozilla.org/build/tools",
"tooltool_config": {
"manifest": "mobile/android/config/tooltool-manifests/android/releng.manifest",
"output_dir": "%(abs_work_dir)s/" + MOZILLA_DIR,
},
"exes": {
'tooltool.py': '/builds/tooltool.py',
},
"update_gecko_source_to_enUS": False,
"repos": [{
"vcs": "hg",
"repo": "https://hg.mozilla.org/build/tools",
"branch": "default",
"dest": "tools",
}, {
"vcs": "hg",
"repo": "https://hg.mozilla.org/try",
"revision": "%(revision)s",
"dest": "try",
"clone_upstream_url": "https://hg.mozilla.org/mozilla-central",
"clone_by_revision": True,
"clone_with_purge": True,
}],
"hg_l10n_base": "https://hg.mozilla.org/l10n-central",
"hg_l10n_tag": "default",
'vcs_share_base': "/builds/hg-shared",
"l10n_dir": "l10n-central",
"repack_env": {
# so ugly, bug 951238
"LD_LIBRARY_PATH": "/lib:/tools/gcc-4.7.2-0moz1/lib:/tools/gcc-4.7.2-0moz1/lib64",
"MOZ_OBJDIR": "obj-l10n",
"EN_US_BINARY_URL": EN_US_BINARY_URL,
"LOCALE_MERGEDIR": "%(abs_merge_dir)s/",
"MOZ_UPDATE_CHANNEL": "try", # XXX Invalid
},
"upload_branch": "%s-android-api-15" % BRANCH,
"ssh_key_dir": "~/.ssh",
"merge_locales": True,
"mozilla_dir": MOZILLA_DIR,
"mozconfig": "%s/mobile/android/config/mozconfigs/android-api-15/l10n-nightly" % MOZILLA_DIR,
"signature_verification_script": "tools/release/signing/verify-android-signature.sh",
"stage_product": "mobile",
"platform": "android", # XXX Validate
"build_type": "api-15-opt", # XXX Validate
# Balrog
"build_target": "Android_arm-eabi-gcc3",
# Mock
"mock_target": "mozilla-centos6-x86_64-android",
"mock_packages": ['autoconf213', 'python', 'zip', 'mozilla-python27-mercurial', 'git', 'ccache',
'glibc-static', 'libstdc++-static', 'perl-Test-Simple', 'perl-Config-General',
'gtk2-devel', 'libnotify-devel', 'yasm',
'alsa-lib-devel', 'libcurl-devel',
'wireless-tools-devel', 'libX11-devel',
'libXt-devel', 'mesa-libGL-devel',
'gnome-vfs2-devel', 'GConf2-devel', 'wget',
'mpfr', # required for system compiler
'xorg-x11-font*', # fonts required for PGO
'imake', # required for makedepend!?!
'gcc45_0moz3', 'gcc454_0moz1', 'gcc472_0moz1', 'gcc473_0moz1', 'yasm', 'ccache', # <-- from releng repo
'valgrind', 'dbus-x11',
'pulseaudio-libs-devel',
'gstreamer-devel', 'gstreamer-plugins-base-devel',
'freetype-2.3.11-6.el6_1.8.x86_64',
'freetype-devel-2.3.11-6.el6_1.8.x86_64',
'java-1.7.0-openjdk-devel',
'openssh-clients',
'zlib-devel-1.2.3-27.el6.i686',
],
"mock_files": [
("/home/cltbld/.ssh", "/home/mock_mozilla/.ssh"),
('/home/cltbld/.hgrc', '/builds/.hgrc'),
('/builds/relengapi.tok', '/builds/relengapi.tok'),
('/tools/tooltool.py', '/builds/tooltool.py'),
('/usr/local/lib/hgext', '/usr/local/lib/hgext'),
],
}

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

@ -106,6 +106,19 @@ class MobileSingleLocale(MockMixin, LocalesMixin, ReleaseMixin,
"type": "int", "type": "int",
"help": "Specify the total number of chunks of locales" "help": "Specify the total number of chunks of locales"
} }
], [
["--disable-mock"],
{"dest": "disable_mock",
"action": "store_true",
"help": "do not run under mock despite what gecko-config says",
}
], [
['--revision', ],
{"action": "store",
"dest": "revision",
"type": "string",
"help": "Override the gecko revision to use (otherwise use buildbot supplied"
" value, or en-US revision) "}
]] ]]
def __init__(self, require_config_file=True): def __init__(self, require_config_file=True):
@ -113,9 +126,11 @@ class MobileSingleLocale(MockMixin, LocalesMixin, ReleaseMixin,
'all_actions': [ 'all_actions': [
"clobber", "clobber",
"pull", "pull",
"clone-locales",
"list-locales", "list-locales",
"setup", "setup",
"repack", "repack",
"validate-repacks-signed",
"upload-repacks", "upload-repacks",
"create-virtualenv", "create-virtualenv",
"taskcluster-upload", "taskcluster-upload",
@ -356,6 +371,8 @@ class MobileSingleLocale(MockMixin, LocalesMixin, ReleaseMixin,
repos = c['repos'] repos = c['repos']
self.vcs_checkout_repos(repos, parent_dir=dirs['abs_work_dir'], self.vcs_checkout_repos(repos, parent_dir=dirs['abs_work_dir'],
tag_override=c.get('tag_override')) tag_override=c.get('tag_override'))
def clone_locales(self):
self.pull_locale_source() self.pull_locale_source()
# list_locales() is defined in LocalesMixin. # list_locales() is defined in LocalesMixin.
@ -396,7 +413,6 @@ class MobileSingleLocale(MockMixin, LocalesMixin, ReleaseMixin,
mozconfig_path) mozconfig_path)
# TODO stop using cat # TODO stop using cat
cat = self.query_exe("cat") cat = self.query_exe("cat")
hg = self.query_exe("hg")
make = self.query_exe("make") make = self.query_exe("make")
self.run_command_m([cat, mozconfig_path]) self.run_command_m([cat, mozconfig_path])
env = self.query_repack_env() env = self.query_repack_env()
@ -416,9 +432,14 @@ class MobileSingleLocale(MockMixin, LocalesMixin, ReleaseMixin,
env=env, env=env,
error_list=MakefileErrorList, error_list=MakefileErrorList,
halt_on_failure=True) halt_on_failure=True)
# on try we want the source we already have, otherwise update to the
# same as the en-US binary
if self.config.get("update_gecko_source_to_enUS", True):
revision = self.query_revision() revision = self.query_revision()
if not revision: if not revision:
self.fatal("Can't determine revision!") self.fatal("Can't determine revision!")
hg = self.query_exe("hg")
# TODO do this through VCSMixin instead of hardcoding hg # TODO do this through VCSMixin instead of hardcoding hg
self.run_command_m([hg, "update", "-r", revision], self.run_command_m([hg, "update", "-r", revision],
cwd=dirs["abs_mozilla_dir"], cwd=dirs["abs_mozilla_dir"],
@ -432,13 +453,10 @@ class MobileSingleLocale(MockMixin, LocalesMixin, ReleaseMixin,
def repack(self): def repack(self):
# TODO per-locale logs and reporting. # TODO per-locale logs and reporting.
c = self.config
dirs = self.query_abs_dirs() dirs = self.query_abs_dirs()
locales = self.query_locales() locales = self.query_locales()
make = self.query_exe("make") make = self.query_exe("make")
repack_env = self.query_repack_env() repack_env = self.query_repack_env()
base_package_name = self.query_base_package_name()
base_package_dir = os.path.join(dirs['abs_objdir'], 'dist')
success_count = total_count = 0 success_count = total_count = 0
for locale in locales: for locale in locales:
total_count += 1 total_count += 1
@ -455,6 +473,20 @@ class MobileSingleLocale(MockMixin, LocalesMixin, ReleaseMixin,
halt_on_failure=False): halt_on_failure=False):
self.add_failure(locale, message="%s failed in make installers-%s!" % (locale, locale)) self.add_failure(locale, message="%s failed in make installers-%s!" % (locale, locale))
continue continue
success_count += 1
self.summarize_success_count(success_count, total_count,
message="Repacked %d of %d binaries successfully.")
def validate_repacks_signed(self):
c = self.config
dirs = self.query_abs_dirs()
locales = self.query_locales()
base_package_name = self.query_base_package_name()
base_package_dir = os.path.join(dirs['abs_objdir'], 'dist')
repack_env = self.query_repack_env()
success_count = total_count = 0
for locale in locales:
total_count += 1
signed_path = os.path.join(base_package_dir, signed_path = os.path.join(base_package_dir,
base_package_name % {'locale': locale}) base_package_name % {'locale': locale})
# We need to wrap what this function does with mock, since # We need to wrap what this function does with mock, since
@ -473,7 +505,7 @@ class MobileSingleLocale(MockMixin, LocalesMixin, ReleaseMixin,
continue continue
success_count += 1 success_count += 1
self.summarize_success_count(success_count, total_count, self.summarize_success_count(success_count, total_count,
message="Repacked %d of %d binaries successfully.") message="Validated signatures on %d of %d binaries successfully.")
def taskcluster_upload(self): def taskcluster_upload(self):
auth = os.path.join(os.getcwd(), self.config['taskcluster_credentials_file']) auth = os.path.join(os.getcwd(), self.config['taskcluster_credentials_file'])
@ -579,20 +611,14 @@ class MobileSingleLocale(MockMixin, LocalesMixin, ReleaseMixin,
continue continue
package_name = base_package_name % {'locale': locale} package_name = base_package_name % {'locale': locale}
r = re.compile("(http.*%s)" % package_name) r = re.compile("(http.*%s)" % package_name)
success = False
for line in output.splitlines(): for line in output.splitlines():
m = r.match(line) m = r.match(line)
if m: if m:
self.upload_urls[locale] = m.groups()[0] self.upload_urls[locale] = m.groups()[0]
self.info("Found upload url %s" % self.upload_urls[locale]) self.info("Found upload url %s" % self.upload_urls[locale])
success = True
if not success:
self.add_failure(locale, message="Failed to detect %s url in make upload!" % (locale))
print output
continue
success_count += 1 success_count += 1
self.summarize_success_count(success_count, total_count, self.summarize_success_count(success_count, total_count,
message="Uploaded %d of %d binaries successfully.") message="Make Upload for %d of %d locales successful.")
def checkout_tools(self): def checkout_tools(self):
dirs = self.query_abs_dirs() dirs = self.query_abs_dirs()
@ -641,6 +667,16 @@ class MobileSingleLocale(MockMixin, LocalesMixin, ReleaseMixin,
dirs = self.query_abs_dirs() dirs = self.query_abs_dirs()
locales = self.query_locales() locales = self.query_locales()
balrogReady = True
for locale in locales:
apk_url = self.query_upload_url(locale)
if not apk_url:
self.add_failure(locale, message="Failed to detect %s url in make upload!" % (locale))
balrogReady = False
continue
if not balrogReady:
return self.fatal(message="Not all repacks successful, abort without submitting to balrog")
for locale in locales: for locale in locales:
apkfile = self.query_apkfile_path(locale) apkfile = self.query_apkfile_path(locale)
apk_url = self.query_upload_url(locale) apk_url = self.query_upload_url(locale)

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

@ -5436,6 +5436,13 @@
"kind": "count", "kind": "count",
"description": "a testing histogram; not meant to be touched" "description": "a testing histogram; not meant to be touched"
}, },
"TELEMETRY_TEST_COUNT2": {
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "count",
"bug_numbers": [1288745],
"description": "a testing histogram; not meant to be touched"
},
"TELEMETRY_TEST_COUNT_INIT_NO_RECORD": { "TELEMETRY_TEST_COUNT_INIT_NO_RECORD": {
"expires_in_version": "never", "expires_in_version": "never",
"kind": "count", "kind": "count",
@ -5511,6 +5518,33 @@
"releaseChannelCollection": "opt-out", "releaseChannelCollection": "opt-out",
"description": "a testing histogram; not meant to be touched" "description": "a testing histogram; not meant to be touched"
}, },
"TELEMETRY_TEST_EXPONENTIAL": {
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "exponential",
"low": 1,
"high": 2147483646,
"n_buckets": 10,
"bug_numbers": [1288745],
"description": "a testing histogram; not meant to be touched"
},
"TELEMETRY_TEST_LINEAR": {
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version": "never",
"kind": "linear",
"low": 1,
"high": 2147483646,
"n_buckets": 10,
"bug_numbers": [1288745],
"description": "a testing histogram; not meant to be touched"
},
"TELEMETRY_TEST_BOOLEAN": {
"alert_emails": ["telemetry-client-dev@mozilla.com"],
"expires_in_version" : "never",
"kind": "boolean",
"bug_numbers": [1288745],
"description": "a testing histogram; not meant to be touched"
},
"STARTUP_CRASH_DETECTED": { "STARTUP_CRASH_DETECTED": {
"expires_in_version": "never", "expires_in_version": "never",
"kind": "flag", "kind": "flag",

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

@ -1030,16 +1030,6 @@ TelemetryImpl::InitMemoryReporter() {
RegisterWeakMemoryReporter(this); RegisterWeakMemoryReporter(this);
} }
NS_IMETHODIMP
TelemetryImpl::NewHistogram(const nsACString &name, const nsACString &expiration, uint32_t histogramType,
uint32_t min, uint32_t max, uint32_t bucketCount, JSContext *cx,
uint8_t optArgCount, JS::MutableHandle<JS::Value> ret)
{
return TelemetryHistogram::NewHistogram(name, expiration, histogramType,
min, max, bucketCount,
cx, optArgCount, ret);
}
NS_IMETHODIMP NS_IMETHODIMP
TelemetryImpl::NewKeyedHistogram(const nsACString &name, const nsACString &expiration, uint32_t histogramType, TelemetryImpl::NewKeyedHistogram(const nsACString &name, const nsACString &expiration, uint32_t histogramType,
uint32_t min, uint32_t max, uint32_t bucketCount, JSContext *cx, uint32_t min, uint32_t max, uint32_t bucketCount, JSContext *cx,

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

@ -2012,35 +2012,6 @@ TelemetryHistogram::GetHistogramName(mozilla::Telemetry::ID id)
return h.id(); return h.id();
} }
nsresult
TelemetryHistogram::NewHistogram(const nsACString &name,
const nsACString &expiration,
uint32_t histogramType,
uint32_t min, uint32_t max,
uint32_t bucketCount, JSContext *cx,
uint8_t optArgCount,
JS::MutableHandle<JS::Value> ret)
{
Histogram *h = nullptr;
{
StaticMutexAutoLock locker(gTelemetryHistogramMutex);
if (!internal_IsValidHistogramName(name)) {
return NS_ERROR_INVALID_ARG;
}
nsresult rv = internal_HistogramGet(PromiseFlatCString(name).get(),
PromiseFlatCString(expiration).get(),
histogramType, min, max, bucketCount,
optArgCount == 3, &h);
if (NS_FAILED(rv))
return rv;
h->ClearFlags(Histogram::kUmaTargetedHistogramFlag);
}
// Runs without protection from |gTelemetryHistogramMutex|
return internal_WrapAndReturnHistogram(h, cx, ret);
}
nsresult nsresult
TelemetryHistogram::NewKeyedHistogram(const nsACString &name, TelemetryHistogram::NewKeyedHistogram(const nsACString &name,
const nsACString &expiration, const nsACString &expiration,

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

@ -56,12 +56,6 @@ GetKeyedHistogramById(const nsACString &name, JSContext *cx,
const char* const char*
GetHistogramName(mozilla::Telemetry::ID id); GetHistogramName(mozilla::Telemetry::ID id);
nsresult
NewHistogram(const nsACString &name, const nsACString &expiration,
uint32_t histogramType, uint32_t min, uint32_t max,
uint32_t bucketCount, JSContext *cx,
uint8_t optArgCount, JS::MutableHandle<JS::Value> ret);
nsresult nsresult
NewKeyedHistogram(const nsACString &name, const nsACString &expiration, NewKeyedHistogram(const nsACString &name, const nsACString &expiration,
uint32_t histogramType, uint32_t min, uint32_t max, uint32_t histogramType, uint32_t min, uint32_t max,

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

@ -180,42 +180,29 @@ interface nsITelemetry : nsISupports
[retval, array, size_is(count)] out string histograms); [retval, array, size_is(count)] out string histograms);
/** /**
* Create and return a histogram. Parameters: * Create a histogram using the current state of an existing histogram. The
* existing histogram must be registered in TelemetryHistograms.h.
* *
* @param name Unique histogram name * @param name Unique histogram name
* @param expiration Expiration version * @param existing_name Existing histogram name
* @param type - HISTOGRAM_EXPONENTIAL, HISTOGRAM_LINEAR or HISTOGRAM_BOOLEAN
* @param min - Minimal bucket size
* @param max - Maximum bucket size
* @param bucket_count - number of buckets in the histogram.
* The returned object has the following functions: * The returned object has the following functions:
* add(int) - Adds an int value to the appropriate bucket * add(int) - Adds an int value to the appropriate bucket
* snapshot() - Returns a snapshot of the histogram with the same data fields as in histogramSnapshots() * snapshot() - Returns a snapshot of the histogram with the same data fields as in histogramSnapshots()
* clear() - Zeros out the histogram's buckets and sum * clear() - Zeros out the histogram's buckets and sum
* dataset() - identifies what dataset this is in: DATASET_RELEASE_CHANNEL_OPTOUT or ...OPTIN * dataset() - identifies what dataset this is in: DATASET_RELEASE_CHANNEL_OPTOUT or ...OPTIN
*/ */
[implicit_jscontext, optional_argc]
jsval newHistogram(in ACString name, in ACString expiration,
in unsigned long histogram_type,
[optional] in uint32_t min,
[optional] in uint32_t max,
[optional] in uint32_t bucket_count);
/**
* Create a histogram using the current state of an existing histogram. The
* existing histogram must be registered in TelemetryHistograms.h.
*
* @param name Unique histogram name
* @param existing_name Existing histogram name
* The returned object has the same functions as a histogram returned from newHistogram.
*/
[implicit_jscontext] [implicit_jscontext]
jsval histogramFrom(in ACString name, in ACString existing_name); jsval histogramFrom(in ACString name, in ACString existing_name);
/** /**
* Same as newHistogram above, but for histograms registered in TelemetryHistograms.h. * Create and return a histogram registered in TelemetryHistograms.h.
* *
* @param id - unique identifier from TelemetryHistograms.h * @param id - unique identifier from TelemetryHistograms.h
* The returned object has the following functions:
* add(int) - Adds an int value to the appropriate bucket
* snapshot() - Returns a snapshot of the histogram with the same data fields as in histogramSnapshots()
* clear() - Zeros out the histogram's buckets and sum
* dataset() - identifies what dataset this is in: DATASET_RELEASE_CHANNEL_OPTOUT or ...OPTIN
*/ */
[implicit_jscontext] [implicit_jscontext]
jsval getHistogramById(in ACString id); jsval getHistogramById(in ACString id);
@ -326,8 +313,6 @@ interface nsITelemetry : nsISupports
* @param addon_id - Unique ID of the addon * @param addon_id - Unique ID of the addon
* @param name - Registered histogram name * @param name - Registered histogram name
* *
* The returned object has the same functions as a histogram returned
* from newHistogram.
*/ */
[implicit_jscontext] [implicit_jscontext]
jsval getAddonHistogram(in ACString addon_id, in ACString name); jsval getAddonHistogram(in ACString addon_id, in ACString name);

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

@ -39,7 +39,6 @@ const APP_VERSION = "1";
const APP_ID = "xpcshell@tests.mozilla.org"; const APP_ID = "xpcshell@tests.mozilla.org";
const APP_NAME = "XPCShell"; const APP_NAME = "XPCShell";
const IGNORE_HISTOGRAM = "test::ignore_me";
const IGNORE_HISTOGRAM_TO_CLONE = "MEMORY_HEAP_ALLOCATED"; const IGNORE_HISTOGRAM_TO_CLONE = "MEMORY_HEAP_ALLOCATED";
const IGNORE_CLONED_HISTOGRAM = "test::ignore_me_also"; const IGNORE_CLONED_HISTOGRAM = "test::ignore_me_also";
const ADDON_NAME = "Telemetry test addon"; const ADDON_NAME = "Telemetry test addon";
@ -109,7 +108,7 @@ function fakeIdleNotification(topic) {
} }
function setupTestData() { function setupTestData() {
Telemetry.newHistogram(IGNORE_HISTOGRAM, "never", Telemetry.HISTOGRAM_BOOLEAN);
Telemetry.histogramFrom(IGNORE_CLONED_HISTOGRAM, IGNORE_HISTOGRAM_TO_CLONE); Telemetry.histogramFrom(IGNORE_CLONED_HISTOGRAM, IGNORE_HISTOGRAM_TO_CLONE);
Services.startup.interrupted = true; Services.startup.interrupted = true;
Telemetry.registerAddonHistogram(ADDON_NAME, ADDON_HISTOGRAM, Telemetry.registerAddonHistogram(ADDON_NAME, ADDON_HISTOGRAM,
@ -315,7 +314,7 @@ function checkPayload(payload, reason, successfulPings, savedPings) {
Assert.ok(histogramName in payload.histograms, histogramName + " must be available."); Assert.ok(histogramName in payload.histograms, histogramName + " must be available.");
} }
} }
Assert.ok(!(IGNORE_HISTOGRAM in payload.histograms));
Assert.ok(!(IGNORE_CLONED_HISTOGRAM in payload.histograms)); Assert.ok(!(IGNORE_CLONED_HISTOGRAM in payload.histograms));
// Flag histograms should automagically spring to life. // Flag histograms should automagically spring to life.
@ -484,12 +483,11 @@ add_task(function* asyncSetup() {
// Ensures that expired histograms are not part of the payload. // Ensures that expired histograms are not part of the payload.
add_task(function* test_expiredHistogram() { add_task(function* test_expiredHistogram() {
let histogram_id = "FOOBAR";
let dummy = Telemetry.newHistogram(histogram_id, "30", Telemetry.HISTOGRAM_EXPONENTIAL, 1, 2, 3); let dummy = Telemetry.getHistogramById("TELEMETRY_TEST_EXPIRED");
dummy.add(1); dummy.add(1);
do_check_eq(TelemetrySession.getPayload()["histograms"][histogram_id], undefined);
do_check_eq(TelemetrySession.getPayload()["histograms"]["TELEMETRY_TEST_EXPIRED"], undefined); do_check_eq(TelemetrySession.getPayload()["histograms"]["TELEMETRY_TEST_EXPIRED"], undefined);
}); });

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

@ -5,8 +5,6 @@ var tmpScope = {};
Cu.import("resource://gre/modules/TelemetryStopwatch.jsm", tmpScope); Cu.import("resource://gre/modules/TelemetryStopwatch.jsm", tmpScope);
var TelemetryStopwatch = tmpScope.TelemetryStopwatch; var TelemetryStopwatch = tmpScope.TelemetryStopwatch;
// We can't create a histogram here since the ones created with
// newHistogram are not seen by getHistogramById that the module uses.
const HIST_NAME = "TELEMETRY_PING"; const HIST_NAME = "TELEMETRY_PING";
const HIST_NAME2 = "RANGE_CHECKSUM_ERRORS"; const HIST_NAME2 = "RANGE_CHECKSUM_ERRORS";
const KEYED_HIST = { id: "TELEMETRY_INVALID_PING_TYPE_SUBMITTED", key: "TEST" }; const KEYED_HIST = { id: "TELEMETRY_INVALID_PING_TYPE_SUBMITTED", key: "TEST" };

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

@ -57,7 +57,7 @@ function compareHistograms(h1, h2) {
} }
function check_histogram(histogram_type, name, min, max, bucket_count) { function check_histogram(histogram_type, name, min, max, bucket_count) {
var h = Telemetry.newHistogram(name, "never", histogram_type, min, max, bucket_count); var h = Telemetry.getHistogramById(name);
var r = h.snapshot().ranges; var r = h.snapshot().ranges;
var sum = 0; var sum = 0;
for (let i=0;i<r.length;i++) { for (let i=0;i<r.length;i++) {
@ -124,13 +124,12 @@ function* test_instantiate() {
add_task(function* test_parameterChecks() { add_task(function* test_parameterChecks() {
let kinds = [Telemetry.HISTOGRAM_EXPONENTIAL, Telemetry.HISTOGRAM_LINEAR] let kinds = [Telemetry.HISTOGRAM_EXPONENTIAL, Telemetry.HISTOGRAM_LINEAR]
for (let histogram_type of kinds) { let testNames = ["TELEMETRY_TEST_EXPONENTIAL", "TELEMETRY_TEST_LINEAR"]
for (let i = 0; i < kinds.length; i++) {
let histogram_type = kinds[i];
let test_type = testNames[i];
let [min, max, bucket_count] = [1, INT_MAX - 1, 10] let [min, max, bucket_count] = [1, INT_MAX - 1, 10]
check_histogram(histogram_type, "test::"+histogram_type, min, max, bucket_count); check_histogram(histogram_type, test_type, min, max, bucket_count);
const nh = Telemetry.newHistogram;
expect_fail(() => nh("test::min", "never", histogram_type, 0, max, bucket_count));
expect_fail(() => nh("test::bucket_count", "never", histogram_type, min, max, 1));
} }
}); });
@ -142,7 +141,7 @@ add_task(function* test_noSerialization() {
}); });
add_task(function* test_boolean_histogram() { add_task(function* test_boolean_histogram() {
var h = Telemetry.newHistogram("test::boolean histogram", "never", Telemetry.HISTOGRAM_BOOLEAN); var h = Telemetry.getHistogramById("TELEMETRY_TEST_BOOLEAN");
var r = h.snapshot().ranges; var r = h.snapshot().ranges;
// boolean histograms ignore numeric parameters // boolean histograms ignore numeric parameters
do_check_eq(uneval(r), uneval([0, 1, 2])) do_check_eq(uneval(r), uneval([0, 1, 2]))
@ -163,7 +162,7 @@ add_task(function* test_boolean_histogram() {
}); });
add_task(function* test_flag_histogram() { add_task(function* test_flag_histogram() {
var h = Telemetry.newHistogram("test::flag histogram", "never", Telemetry.HISTOGRAM_FLAG); var h = Telemetry.getHistogramById("TELEMETRY_TEST_FLAG");
var r = h.snapshot().ranges; var r = h.snapshot().ranges;
// Flag histograms ignore numeric parameters. // Flag histograms ignore numeric parameters.
do_check_eq(uneval(r), uneval([0, 1, 2])); do_check_eq(uneval(r), uneval([0, 1, 2]));
@ -188,7 +187,7 @@ add_task(function* test_flag_histogram() {
}); });
add_task(function* test_count_histogram() { add_task(function* test_count_histogram() {
let h = Telemetry.newHistogram("test::count histogram", "never", Telemetry.HISTOGRAM_COUNT, 1, 2, 3); let h = Telemetry.getHistogramById("TELEMETRY_TEST_COUNT2");
let s = h.snapshot(); let s = h.snapshot();
do_check_eq(uneval(s.ranges), uneval([0, 1, 2])); do_check_eq(uneval(s.ranges), uneval([0, 1, 2]));
do_check_eq(uneval(s.counts), uneval([0, 0, 0])); do_check_eq(uneval(s.counts), uneval([0, 0, 0]));
@ -289,7 +288,7 @@ add_task(function* test_getWebrtc() {
// Check that telemetry doesn't record in private mode // Check that telemetry doesn't record in private mode
add_task(function* test_privateMode() { add_task(function* test_privateMode() {
var h = Telemetry.newHistogram("test::private_mode_boolean", "never", Telemetry.HISTOGRAM_BOOLEAN); var h = Telemetry.getHistogramById("TELEMETRY_TEST_BOOLEAN");
var orig = h.snapshot(); var orig = h.snapshot();
Telemetry.canRecordExtended = false; Telemetry.canRecordExtended = false;
h.add(1); h.add(1);
@ -325,7 +324,7 @@ add_task(function* test_histogramRecording() {
"Histograms should be equal after recording."); "Histograms should be equal after recording.");
// Runtime created histograms should not be recorded. // Runtime created histograms should not be recorded.
h = Telemetry.newHistogram("test::runtime_created_boolean", "never", Telemetry.HISTOGRAM_BOOLEAN); h = Telemetry.getHistogramById("TELEMETRY_TEST_BOOLEAN");
orig = h.snapshot(); orig = h.snapshot();
h.add(1); h.add(1);
Assert.equal(orig.sum, h.snapshot().sum, Assert.equal(orig.sum, h.snapshot().sum,
@ -442,10 +441,9 @@ add_task(function* test_addons() {
}); });
add_task(function* test_expired_histogram() { add_task(function* test_expired_histogram() {
var histogram_id = "FOOBAR";
var test_expired_id = "TELEMETRY_TEST_EXPIRED"; var test_expired_id = "TELEMETRY_TEST_EXPIRED";
var clone_id = "ExpiredClone"; var clone_id = "ExpiredClone";
var dummy = Telemetry.newHistogram(histogram_id, "28.0a1", Telemetry.HISTOGRAM_EXPONENTIAL, 1, 2, 3); var dummy = Telemetry.getHistogramById(test_expired_id);
var dummy_clone = Telemetry.histogramFrom(clone_id, test_expired_id); var dummy_clone = Telemetry.histogramFrom(clone_id, test_expired_id);
var rh = Telemetry.registeredHistograms(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, []); var rh = Telemetry.registeredHistograms(Ci.nsITelemetry.DATASET_RELEASE_CHANNEL_OPTIN, []);
Assert.ok(!!rh); Assert.ok(!!rh);
@ -454,7 +452,6 @@ add_task(function* test_expired_histogram() {
dummy_clone.add(1); dummy_clone.add(1);
do_check_eq(Telemetry.histogramSnapshots["__expired__"], undefined); do_check_eq(Telemetry.histogramSnapshots["__expired__"], undefined);
do_check_eq(Telemetry.histogramSnapshots[histogram_id], undefined);
do_check_eq(Telemetry.histogramSnapshots[test_expired_id], undefined); do_check_eq(Telemetry.histogramSnapshots[test_expired_id], undefined);
do_check_eq(Telemetry.histogramSnapshots[clone_id], undefined); do_check_eq(Telemetry.histogramSnapshots[clone_id], undefined);
do_check_eq(rh[test_expired_id], undefined); do_check_eq(rh[test_expired_id], undefined);