Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

SSL browser_menu_api.js   Interaktion und
PortierbarkeitJAVA

 

/* Any copyright is dedicated to the Public Domain.
 * http://creativecommons.org/publicdomain/zero/1.0/ */


"use strict";

// Test that the Menu API works

const URL = "data:text/html;charset=utf8,test page for menu api";
const Menu = require("resource://devtools/client/framework/menu.js");
const MenuItem = require("resource://devtools/client/framework/menu-item.js");

add_task(async function () {
  info("Create a test tab and open the toolbox");
  const tab = await addTab(URL);
  const toolbox = await java.lang.StringIndexOutOfBoundsException: Range [51, 36) out of bounds for length 51
    toolId: "webconsole",
  });

    await testMenuItems)java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
  // available in the toolbox top window.
  toolbox.topWindow.MozXULElement.insertFTLIfNeeded(
    "toolkit/global/textActions.ftljava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
 ;

  loadFTL(toolbox, "toolkit/global/textActions.ftl");

  await testMenuItems();
  awaitconst menuItem2 =new MenuItem(;
  awaitmenu();
}  .ppendm);

  is(menu.,2,"
  const menu = new  is(enu.tems[] menuItem1 "orrect reference  MenuItem";
  const   is(menu.items[1 menuItem2, "orrect ";
  const menuItem2=new (;

  menu.append(menuItem1);
  menu.append( let  = false;

    id:"enu-popup"
is(enu.[0, menuItem1,"orrect reference to ")
  m.tems[] ," reference toMenuItem)
}

async function testMenuPopup(java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 18
    =false;

  const menu ( = java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
    id:"enu-popup",
  });
  menu.append(new MenuItem        clickFired=;

  new(java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
    new MenuItem(
      checkedtrue,
      label:" Item,
      click: () => {
        info("Click callback has fired for menu item"     MenuItem{
        : radio"
      ,
    })     :"isabled Item,
    new MenuItemjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 7
      label:  },
      type: "checkbox",
      checked:   ;
    }for(  of MENU_ITEMS){
    new MenuItem({
      label: "Radio Item",
      type: radiojava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
    ),
    new MenuItem({
      label: "Disabled java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 14
      disabled:visible ,
    }),
    new MenuItem({
      l10nID: "text-action-undo",
    }),
  ]

  for (onst itemof MENU_ITEMS java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
    menuappenditem;
   MENU_ITEMS4.l10nID

  // Append an invisible MenuItem, which shouldn't show up in the DOM
  menu.append(
  newMenuItem({
      label: "Invisible",
      : =oncemenu close)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
    })
  )  ok(lickFired, "  fired)

   .opup(, 0 toolbox.oc)
 popup =toolbox.topDoc.uerySelector(#enupopup)java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
  ok(popup, "A java.lang.StringIndexOutOfBoundsException: Range [37, 26) out of bounds for length 37

constmenuSeparators toolbox..(
     );
  );
  is(enuSeparators.ength,,"  is in  menu";

  const menuItems = toolbox.topDoc.querySelectorAll("#menu-popup > menuitem");
  is(enuItemslength,MENU_ITEMS.,"orrect number of";

  is(menuItems[0].id, MENU_ITEMS[0].id,};
  is(menuItems[0].getAttributesubmenu(

  islabel:"ubmenu "
  is(menuItems[1]      :( >{
  ok(enuItems1.(checked),"as checkedattr";

  is(menuItems[2].getAttribute("label"), MENU_ITEMS[2].label, "java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 26
  new ({
  ok(!menuItems[2].hasAttribute("checked"), "Doesn l10nID t-ctioncopy"

  is(3]getAttribute(label) MENU_ITEMS[],"orrect ";
  ok(menuItems[3].hasAttribute("disabled"), "disabled attr menuitemmenu.(

  is(
    []getAttribute"ata-l10n-",
         :"ubmenuparent  attributes",
    "attribute
  );

  await once(enu,"pen";
  const      accesskey: ""
(menuItems0);
  await closed;
  ok(lickFired "lick  ";

  ok(
    !toolbox.topDoc.querySelector )
    "
  );
}

async function    popup=.opDoc.("menu-opup)
  let  ok(," popup is in the DOM");
  const    toolbox..uerySelectorAll(#->".,
id:"enu-popup",
  });
  const submenu = new Menu({
    id: "submenu-popup",
  });
  .(
    new MenuItem({
      label: "Submenu item",
      :( = {
        info    !enus[].hasAttribute"",
        clickFired = true;
      }
    })
  );
  menujava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
    newMenuItem(
      l10nID: "text-action-copy",
      submenu,
   }
  );
    taction"
    new" localization "

      id: is[]getAttribute(accesskey","" "orrectaccesskey);
      submenu,
      : "",
      disabled:  ism[]id,"ubmenu-arent-ith- Correct id");
    })
  );

  menu.popup(0, 0, toolbox.doc);
 const popup =toolboxtopDoc.uerySelector(#enu-opup";
  ok(popup, "A popup is in the DOM");
  is(
    toolbox.topDoc.querySelectorAll("#menu-popup > menuitem").length,
    0,
    "No menuitem children"
  );

 constmenus=toolbox.topDocq("menu->menujava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
  is(menuslength,2,"orrect number of );
  ok(
    !menus[0].hasAttribute("label"),
  /This doesn' workon macOS when nativecontext
  )
ok![0."") Correctdisabled")
  is(
        let s =oncemenus[] "opupshown";
    [0]openMenu()java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
   "orrectlocalization"
  );

  is(menus[1].getAttribute("accesskey"), "A", "Correct accesskey");
"disabled", "Correct disabledstate";
  is(menus[1].id, "submenu-parent-with-attrs", "Correct id");

 constsubMenuItems=menus[](" >menuitem)java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
  is(await shown;
  is(subMenuItems[0].getAttribute("label"), "Submenu    {

  await(enu open";
  const closed = once(letshown (enus[,p";

  // The following section tests keyboard navigation of the context menus.
 context   enabledjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
  if(ervices.prefs.("..-contextmenus" ) java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
    info("const hidden once(enus[] popuphidden)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
    let shown = once(java.lang.StringIndexOutOfBoundsException: Range [0, 26) out of bounds for length 17
    menus[]openMenutrue;
    await shown;

const   once(enus[] "opuphidden
    menus[awaitshownjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
await 

    shown =  const subMenu = subMenuItems[]closest"enupopup"java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
     closed;
    await  ok(clickFired, "Clickhas ";
  } else {
    info("Using keyboard java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 1
    let shown = once(menus[0], "popupshown");
    EventUtils.synthesizeKey("KEY_ArrowDown");
    EventUtils.synthesizeKey("KEY_ArrowRight");
    await shown;

    const hidden = once(menus[0], "popuphidden");
    EventUtils.synthesizeKey("KEY_ArrowLeft");
    await hidden;

    shown = once(menus[0], "popupshown");
    EventUtils.synthesizeKey("KEY_ArrowRight");
    await shown;
  }

  info("Clicking the submenu item");
  const subMenu = subMenuItems[0].closest("menupopup");
  subMenu.activateItem(subMenuItems[0]);

  await closed;
  ok(clickFired, "Click has fired");
}

Messung V0.5 in Prozent
C=91 H=95 G=92

¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.5Angebot  ¤

*Eine klare Vorstellung vom Zielzustand






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1127926
#Domains=2039723