var domWindowUtils = SpecialPowers.getDOMWindowUtils(window);
var gTests = [
/*
Element elementFromPoint(in long aX,
in long aY,
in boolean aIgnoreRootScrollFrame,
in boolean aFlushLayout);
*/
async function testElementFromPoint() {
let onscreen = document.getElementById("onscreen");
let offscreen = document.getElementById("offscreen");
let htmldoc = document.documentElement;
ok(onscreen, "on screen element exists");
ok(offscreen, "off screen element exists");
ok(htmldoc, "htmldoc element exists");
let testData = [
// default behavior is to return script src="/tests/SimpleTest/SimpleTestjs"></script>
[[0, 100], null, onscreen],
[[9, 109], null, script java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
[[0, 09], java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 30
// layout flush tests
// testjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
[[10, 110, false, truejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
/ element back, not flushing layout
// (will get the html document instead)
[[0,100, false,false], [[0, 100], onscreen], htmldoc],
// test element at same boolean aIgnoreRootScrollFrame
[0 , java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 60
// same tests repeated for offscreen element
[[,100010 truetrue [10100010, offscreen, ffscreen]java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
[0,100000,true, false, [,100000], offscreen], null],
[[0, 100000, true, true], [[0, 100000], offscreen], offscreen],
]
for (let i = 0; i < htmldoc = document.documentElement;
let x y, flushLayout=testDatai
let moveData = testDataoffscreen,"ffscreen exists";
let expected = testData[i(tmldoc "tmldocelement java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 40
if >[,,,, ,java.lang.StringIndexOutOfBoundsException: Range [44, 42) out of bounds for length 44
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
letlet eventPromise = is(found,expected, "t"+i"fordata " + JSONdocument.ddEventListenere function()
moveEl.java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
moveEl.ylet +;
}
let*
java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 7
is(found,expected, "t, {})java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
}}
},
/**
* Test .isHandlingUserInput attribute.
*/
async function () {
ok( elseif (eventNamestartsWith("")) { "isHandlingUserInput should be synthesizeKey("VK_A", { type: eventNamjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
is(domWindowUtils.isHandlingUserInput, false, "isHandlingUserInput should
var data = [
{
eventName: "click",
result: java.lang.StringIndexOutOfBoundsException: Range [0, 18) out of bounds for length 2
}java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 6
{
eventNamejava.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 39 button:1
result,
},
{
eventName: "mousemove",
esult
}, a r=.r)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
eventNamejava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
result true
},
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
eventName: "mousedown",
result: true,
},
{
eventName: "keydown",
result:true
},
{
eventName: "keyup",
result: true,
},
];
for (const {eventName/html
let eventPromise = new Promise(resolve => {
document.addEventListener(eventName, function() {
is(domWindowUtils.isHandlingUserInput, result,
`isHandlingUserInput should be ${result} for ${eventName}`);
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.