зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1268349 - tell BrowserUITelemetry that the sync-button is in the menu panel by default. r=Gijs
MozReview-Commit-ID: 991ZT9upYDR --HG-- extra : rebase_source : a2fdd3e4235ae6b3d3733c7e171e71964b639492
This commit is contained in:
Родитель
bf89cf3e57
Коммит
8e13f96940
|
@ -43,6 +43,7 @@ XPCOMUtils.defineLazyGetter(this, "DEFAULT_AREA_PLACEMENTS", function() {
|
|||
"find-button",
|
||||
"preferences-button",
|
||||
"add-ons-button",
|
||||
"sync-button",
|
||||
"developer-button",
|
||||
],
|
||||
"nav-bar": [
|
||||
|
@ -91,7 +92,6 @@ XPCOMUtils.defineLazyGetter(this, "PALETTE_ITEMS", function() {
|
|||
"developer-button",
|
||||
"feed-button",
|
||||
"email-link-button",
|
||||
"sync-button",
|
||||
];
|
||||
|
||||
let panelPlacements = DEFAULT_AREA_PLACEMENTS["PanelUI-contents"];
|
||||
|
|
|
@ -3,6 +3,7 @@ support-files =
|
|||
head.js
|
||||
|
||||
[browser_BrowserUITelemetry_buckets.js]
|
||||
[browser_BrowserUITelemetry_defaults.js]
|
||||
[browser_ProcessHangNotifications.js]
|
||||
skip-if = !e10s
|
||||
[browser_ContentSearch.js]
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
// The purpose of this test is to ensure that by default, BrowserUITelemetry
|
||||
// isn't reporting any UI customizations. This is primarily so changes to
|
||||
// customizableUI (eg, new buttons, button location changes) also have a
|
||||
// corresponding BrowserUITelemetry change.
|
||||
|
||||
function test() {
|
||||
let s = {};
|
||||
Cu.import("resource:///modules/CustomizableUI.jsm", s);
|
||||
Cu.import("resource:///modules/BrowserUITelemetry.jsm", s);
|
||||
|
||||
let { CustomizableUI, BrowserUITelemetry } = s;
|
||||
|
||||
Assert.ok(CustomizableUI.inDefaultState,
|
||||
"No other test should have left CUI in a dirty state.");
|
||||
|
||||
let result = BrowserUITelemetry._getWindowMeasurements(window, 0);
|
||||
|
||||
Assert.deepEqual(result.defaultMoved, []);
|
||||
Assert.deepEqual(result.nondefaultAdded, []);
|
||||
// This one is a bit weird - the "social-share-button" is dynamically added
|
||||
// to the toolbar as the feature is first used - but it's listed as being in
|
||||
// the toolbar by default so it doesn't end up in nondefaultAdded once it
|
||||
// is created. The end result is that it ends up in defaultRemoved before
|
||||
// the feature has been activated.
|
||||
// Bug 1273358 exists to fix this.
|
||||
Assert.deepEqual(result.defaultRemoved, ["social-share-button"]);
|
||||
|
||||
// And mochi insists there's only a single window with a single tab when
|
||||
// starting a test, so check that for good measure.
|
||||
Assert.deepEqual(result.visibleTabs, [1]);
|
||||
}
|
Загрузка…
Ссылка в новой задаче