mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1249400 - add a test for missed hide events in case of accessible stealing, r=yzen
This commit is contained in:
parent
e372eb6efb
commit
738cb3c659
@ -345,10 +345,17 @@ function eventQueue(aEventType)
|
|||||||
var msg = "Test with ID = '" + this.getEventID(checker) +
|
var msg = "Test with ID = '" + this.getEventID(checker) +
|
||||||
"' succeed. ";
|
"' succeed. ";
|
||||||
|
|
||||||
if (checker.unexpected)
|
if (checker.unexpected) {
|
||||||
ok(true, msg + "There's no unexpected " + typeStr + " event.");
|
if (checker.todo) {
|
||||||
else
|
todo(false, "Event " + typeStr + " event is still missing");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ok(true, msg + "There's no unexpected " + typeStr + " event.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
ok(true, msg + "Event " + typeStr + " was handled.");
|
ok(true, msg + "Event " + typeStr + " was handled.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -371,8 +378,13 @@ function eventQueue(aEventType)
|
|||||||
ok(false, msg + "Dupe " + typeStr + " event.");
|
ok(false, msg + "Dupe " + typeStr + " event.");
|
||||||
|
|
||||||
if (checker.unexpected) {
|
if (checker.unexpected) {
|
||||||
if (checker.wasCaught)
|
if (checker.todo) {
|
||||||
|
todo(checker.wasCaught,
|
||||||
|
"Event " + typeStr + " event is still missing");
|
||||||
|
}
|
||||||
|
else if (checker.wasCaught) {
|
||||||
ok(false, msg + "There's unexpected " + typeStr + " event.");
|
ok(false, msg + "There's unexpected " + typeStr + " event.");
|
||||||
|
}
|
||||||
} else if (!checker.wasCaught) {
|
} else if (!checker.wasCaught) {
|
||||||
ok(false, msg + typeStr + " event was missed.");
|
ok(false, msg + typeStr + " event was missed.");
|
||||||
}
|
}
|
||||||
@ -1667,6 +1679,18 @@ function invokerChecker(aEventType, aTargetOrFunc, aTargetFuncArg, aIsAsync)
|
|||||||
this.mTargetFuncArg = aTargetFuncArg;
|
this.mTargetFuncArg = aTargetFuncArg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generic invoker checker for todo events.
|
||||||
|
*/
|
||||||
|
function todo_invokerChecker(aEventType, aTargetOrFunc, aTargetFuncArg)
|
||||||
|
{
|
||||||
|
this.__proto__ = new invokerChecker(aEventType, aTargetOrFunc,
|
||||||
|
aTargetFuncArg, true);
|
||||||
|
|
||||||
|
this.unexpected = true;
|
||||||
|
this.todo = true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generic invoker checker for unexpected events.
|
* Generic invoker checker for unexpected events.
|
||||||
*/
|
*/
|
||||||
|
@ -358,6 +358,25 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function showHiddenParentOfVisibleChild()
|
||||||
|
{
|
||||||
|
this.eventSeq = [
|
||||||
|
new todo_invokerChecker(EVENT_HIDE, getNode("c4_child")),
|
||||||
|
new invokerChecker(EVENT_SHOW, getNode("c4_middle")),
|
||||||
|
new invokerChecker(EVENT_REORDER, getNode("c4"))
|
||||||
|
];
|
||||||
|
|
||||||
|
this.invoke = function showHiddenParentOfVisibleChild_invoke()
|
||||||
|
{
|
||||||
|
getNode("c4_middle").style.visibility = 'visible';
|
||||||
|
}
|
||||||
|
|
||||||
|
this.getID = function showHiddenParentOfVisibleChild_getID()
|
||||||
|
{
|
||||||
|
return "show hidden parent of visible child";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Target getters.
|
* Target getters.
|
||||||
*/
|
*/
|
||||||
@ -484,6 +503,7 @@
|
|||||||
gQueue.push(new test2("testContainer", "testNestedContainer"));
|
gQueue.push(new test2("testContainer", "testNestedContainer"));
|
||||||
gQueue.push(new test3("testContainer"));
|
gQueue.push(new test3("testContainer"));
|
||||||
gQueue.push(new insertReferredElm("testContainer3"));
|
gQueue.push(new insertReferredElm("testContainer3"));
|
||||||
|
gQueue.push(new showHiddenParentOfVisibleChild());
|
||||||
|
|
||||||
gQueue.invoke(); // Will call SimpleTest.finish();
|
gQueue.invoke(); // Will call SimpleTest.finish();
|
||||||
}
|
}
|
||||||
@ -544,5 +564,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="testContainer2"></div>
|
<div id="testContainer2"></div>
|
||||||
<div id="testContainer3"></div>
|
<div id="testContainer3"></div>
|
||||||
|
|
||||||
|
<div id="c4">
|
||||||
|
<div style="visibility:hidden" id="c4_middle">
|
||||||
|
<div style="visibility:visible" id="c4_child"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user