tests: externalResize: also test concession expiry
This commit is contained in:
@@ -25,9 +25,18 @@ tests.register("External resize", 1, () => {
|
||||
workspaceMock.createWindow(client);
|
||||
Assert.equalRects(client.frameGeometry, getTiledFrame(100), { message: "We should tile the window, respecting its desired width" });
|
||||
|
||||
client.frameGeometry = getClientDesiredFrame(110);
|
||||
Assert.equalRects(client.frameGeometry, getTiledFrame(110), { message: "We should re-arrange the window, respecting its new desired width" });
|
||||
function testExternalResizing() {
|
||||
client.frameGeometry = getClientDesiredFrame(110);
|
||||
Assert.equalRects(client.frameGeometry, getTiledFrame(110), { message: "We should re-arrange the window, respecting its new desired width" });
|
||||
|
||||
client.frameGeometry = getClientDesiredFrame(120);
|
||||
Assert.equalRects(client.frameGeometry, getClientDesiredFrame(120), { message: "We should give up and let the client have its desired frame" });
|
||||
client.frameGeometry = getClientDesiredFrame(120);
|
||||
Assert.equalRects(client.frameGeometry, getClientDesiredFrame(120), { message: "We should give up and let the client have its desired frame" });
|
||||
}
|
||||
|
||||
testExternalResizing();
|
||||
|
||||
setTimeout(() => {
|
||||
// the concession has expired, let's test again
|
||||
testExternalResizing();
|
||||
}, 1000);
|
||||
});
|
||||
|
||||
2
src/tests/utils/extern/node.ts
vendored
2
src/tests/utils/extern/node.ts
vendored
@@ -1,3 +1,5 @@
|
||||
declare const process: {
|
||||
exit(code?: number): void,
|
||||
};
|
||||
|
||||
declare const setTimeout: (callback: () => void, timeout: number) => void;
|
||||
|
||||
Reference in New Issue
Block a user