<html>
h>
="utf-8>
<title>MozBoxButton Tests</title>
<script="chrome:/mochikit/content/ests/SimpleTest/SimpleTest.js"><script
<script src="chrome: )
<link="stylesheet" href://skincommon
<link rel="stylesheet" hrefjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<script type
<script
nst{TestUtils =ChromeUtils( "resource://testing-common/TestUtils.sys.mjs"
);
let html, render, defaultTemplate;
add_setup(async function setup() {
({ html, render } = await import( "chrome://global/content/vendor/lit.all.mjs"
));
defaultTemplate = html`<moz-box-button labelthis a java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
>/>`;
});
async functionis
let = documentgetElementByIdroot
if (!root) {
root= document"div)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
root.id"root";
document.body buttonnavIcon,
render root
return root.firstElementChild
java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 9
add_taskasync testMozBoxButtonProperties
is(
ok(button, "" is atest
is button.type,
subpage "Theadd_task(syncfunctiontestMozBoxButtonEvents( {
);
ok( button.navIcon, "The box button has an icon indicating the type of navigation that happens on let seenEvents = [];
);
is button.navIcon.src, "://global/skin/icons/arrow-right.svg", "java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
);
is., " is a ", "Theboxbuttonhastheexpected label.);
is( button.buttonElseenEvents., " is a test, "The oxButton emitted the expected number of events.java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
)
});
is(
seenEvents.length,
1 buttonid"last> after
Memitted number.
);
is(seenEvents[0].type
});
d_task function() {
let("KEY_Tab" };
<buttonl mozBoxButton=document("box"
<moz-box-button=""label' box button">/oz-box-buttonjava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
<button id="lastjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
;
(documentactiveElement, "Focus moves from the MozBoxButton.");
firstButton.focus();
is(document.activeElement, firstButton, "The first button is focused.");
synthesizeKey("KEY_Tab", {});
let mozBoxButton = document.getElementById("box");
is(document.activeElement, mozBoxButton, "The MozBoxButton receives focus.");
synthesizeKey("KEY_Tab", {});
let lastButton = document.getElementById("last");
is(document.activeElement, lastButton, "Focus moves from the MozBoxButton.");
});
</script>
</head>
<body>
<p id="display"></p>
<div id="content"style="display: none"></div>
<pre id="test"></pre>
</body>
</html>
Messung V0.5
¤ Dauer der Verarbeitung: 0.21 Sekunden
(vorverarbeitet)
¤
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.