зеркало из https://github.com/mozilla/pjs.git
Bug 628061 - Panorama button should reflect the number of groups before Panorama has launched r=ian
This commit is contained in:
Родитель
8921c7f13e
Коммит
80ef8fb687
|
@ -191,7 +191,7 @@
|
|||
<broadcaster id="isFrameImage"/>
|
||||
<broadcaster id="singleFeedMenuitemState" disabled="true"/>
|
||||
<broadcaster id="multipleFeedsMenuState" hidden="true"/>
|
||||
<broadcaster id="tabviewGroupsNumber" groups="0"/>
|
||||
<broadcaster id="tabviewGroupsNumber" groups="1"/>
|
||||
#ifdef MOZ_SERVICES_SYNC
|
||||
<broadcaster id="sync-setup-state"/>
|
||||
<broadcaster id="sync-syncnow-state"/>
|
||||
|
|
|
@ -105,7 +105,7 @@ let TabView = {
|
|||
data = sessionstore.getWindowValue(window, this.GROUPS_IDENTIFIER);
|
||||
if (data) {
|
||||
let parsedData = JSON.parse(data);
|
||||
this.updateGroupNumberBroadcaster(parsedData.totalNumber || 0);
|
||||
this.updateGroupNumberBroadcaster(parsedData.totalNumber || 1);
|
||||
}
|
||||
} catch (e) { }
|
||||
|
||||
|
|
|
@ -26,11 +26,27 @@ let state = {
|
|||
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
testOne();
|
||||
}
|
||||
|
||||
function testOne() {
|
||||
newWindowWithTabView(
|
||||
function(win) {
|
||||
testTwo();
|
||||
win.close();
|
||||
},
|
||||
function(win) {
|
||||
registerCleanupFunction(function() win.close());
|
||||
is(win.document.getElementById("tabviewGroupsNumber").getAttribute("groups"),
|
||||
"1", "There is one group");
|
||||
});
|
||||
}
|
||||
|
||||
function testTwo() {
|
||||
newWindowWithState(state, function(win) {
|
||||
registerCleanupFunction(function() win.close());
|
||||
|
||||
is(win.document.getElementById("tabviewGroupsNumber").getAttribute("groups"),
|
||||
is(win.document.getElementById("tabviewGroupsNumber").getAttribute("groups"),
|
||||
"2", "There are two groups");
|
||||
waitForFocus(finish);
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче