зеркало из https://github.com/mozilla/gecko-dev.git
Bug 402798, bookmarks missing from menu, r=mano,a=beltzner
This commit is contained in:
Родитель
2498f1f69a
Коммит
3979f697e6
|
@ -60,6 +60,11 @@ _BROWSER_FILES = browser_bug321000.js \
|
|||
browser_getshortcutoruri.js \
|
||||
$(NULL)
|
||||
|
||||
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
|
||||
_BROWSER_FILES += browser_customize.js \
|
||||
$(NULL)
|
||||
endif
|
||||
|
||||
# disable tests on linux for now..
|
||||
ifneq ($(OS_ARCH),Linux)
|
||||
_BROWSER_FILES += \
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
function test()
|
||||
{
|
||||
waitForExplicitFinish();
|
||||
var panel = document.getElementById("customizeToolbarSheetPopup");
|
||||
panel.addEventListener("popupshown", testCustomizePopupShown, false);
|
||||
document.getElementById("cmd_CustomizeToolbars").doCommand();
|
||||
}
|
||||
|
||||
function testCustomizePopupShown()
|
||||
{
|
||||
var panel = document.getElementById("customizeToolbarSheetPopup");
|
||||
panel.removeEventListener("popupshown", testCustomizePopupShown, false);
|
||||
panel.addEventListener("popuphidden", testCustomizePopupHidden, false);
|
||||
|
||||
var frame = document.getElementById("customizeToolbarSheetIFrame").contentDocument;
|
||||
frame.addEventListener("load", testCustomizeFrameLoaded, true);
|
||||
}
|
||||
|
||||
function testCustomizeFrameLoaded()
|
||||
{
|
||||
var frame = document.getElementById("customizeToolbarSheetIFrame");
|
||||
frame.removeEventListener("load", testCustomizeFrameLoaded, true);
|
||||
|
||||
var menu = document.getElementById("bookmarksMenuPopup");
|
||||
ok("getResult" in menu, "menu has binding");
|
||||
|
||||
var framedoc = document.getElementById("customizeToolbarSheetIFrame").contentDocument;
|
||||
var b = framedoc.getElementById("donebutton");
|
||||
|
||||
framedoc.getElementById("donebutton").doCommand();
|
||||
}
|
||||
|
||||
function testCustomizePopupHidden()
|
||||
{
|
||||
var panel = document.getElementById("customizeToolbarSheetPopup");
|
||||
panel.removeEventListener("popuphidden", testCustomizePopupHidden, false);
|
||||
finish();
|
||||
}
|
|
@ -193,6 +193,12 @@ function wrapToolbarItems()
|
|||
if (isCustomizableToolbar(toolbar)) {
|
||||
for (var k = 0; k < toolbar.childNodes.length; ++k) {
|
||||
var item = toolbar.childNodes[k];
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
if (item.firstChild && item.firstChild.localName == "menubar")
|
||||
continue;
|
||||
#endif
|
||||
|
||||
if (isToolbarItem(item)) {
|
||||
var nextSibling = item.nextSibling;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче