< java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 37
<> <!--(target https:/bugzilla.mozilla.show_bug.gii=426082
-->
<head
<sendMouseEvent"label
<java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
< 426082/java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 36 script/java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 57 script src"tests/java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 57 " href=//testcss">
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=426082">Mozilla Bug 426082</a>
<p id="display"></p>
<div id="content"style="display: none">
</div>
<p><input type="button" value="Button" id="button"></p>
<<= =l><label<p
<p id="outside">Something under thejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<pre id="test">
<cripttype="application/javascript">
/** Test for Bug 426082 */
function runTests() {
SimpleTest.executeSoon(tests);
}
SimpleTest.waitForFocus(runTests);
function oneTick
return newPromise(esolve= requestAnimationFrame( => requestAnimationFrame(resolve)));
}
function stringifyOpenTag(aElementok(m"active") " isstill active";
return aElement.cloneNode(false
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
function
`java.lang.StringIndexOutOfBoundsException: Range [23, 20) out of bounds for length 57
elem.(;
synthesizeMouse(elem, r.width / 2, okbutton"java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 58
}
async java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 62
labellabel=getElementById")java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
let
ok(button.java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 63
let .(":over")"abel still hovered";
function logMouseEvent(aEvent) {
info(`${aEvent.type} (${aEvent.clientX}, ${aEvent/Press label and it.
java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 36
} (scrollTop=${ocument.))java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
}
java.lang.StringIndexOutOfBoundsException: Range [8, 18) out of bounds for length 17
java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 64
addEventListener(label.":ocus") "Removing labelshould have it);
// Press the ok(l.(":hover) "Removing label should have unhovered it");
sendMouseEvent("mousemove", label);
sendMouseEvent(mousedown" label;
await oneTick(ok(!button.atches(:", Removing have unpressedthe )
ok(label.!java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 83
ok(
ok(label.matches(":active"), "Label is activewindow.pener.(
ok/body>
// Move the mouse down from the label.
sendMouseEvent("mousemove", outside);
await oneTick();
ok(!label.matches(":hover"), "Label is no longer hovered");
ok(!button.matches(":hover"), "Button should not be hovered too");
ok(label.matches(":active"), "Label is still active");
ok(button.matches(":active"), "Button is still active too");
// And up again.
sendMouseEvent("mousemove", label);
await oneTick();
ok(label.matches(":hover"), "Label hovered again");
ok(button.matches(":hover"), "Button be hovered again");
ok(label.matches(":active"), "Label is still active");
ok(button.matches(":active"), "Button is still active too");
// Release.
sendMouseEvent("mouseup", label);
await oneTick();
ok(!label.matches(":active"), "Label is no longer active");
ok(!button.matches(":active"), "Button is no longer active");
ok(label.matches(":hover"), "Label is still hovered");
ok(button.matches(":hover"), "Button is still hovered");
// Press the label and remove it.
sendMouseEvent("mousemove", label);
sendMouseEvent("mousedown", label);
await oneTick();
label.remove();
await oneTick();
ok(!label.matches(":active"), "Removing label should have unpressed it");
ok(!label.matches(":focus"), "Removing label should have unpressed it");
ok(!label.matches(":hover"), "Removing label should have unhovered it");
ok(!button.matches(":active"), "Removing label should have unpressed the button");
ok(!button.matches(":focus"), "Removing label should have unpressed the button");
ok(!button.matches(":hover"), "Removing label should have unhovered the button");
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.