Govern task context and advance execution pointer
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled

This commit is contained in:
mes123456
2026-08-20 06:02:43 -04:00
parent 380cbed4ff
commit 10640aeb3c
984 changed files with 543475 additions and 327 deletions

View File

@@ -25,3 +25,13 @@ test("M14-04F commits pen stroke once and ignores late up/cancel", () => {
state = modal.commitPenStroke(state, 9);
assert.deepEqual([state.kind, state.mainCommitCount, state.activePointerIds], ["NONE", 1, []]);
});
test("M14-04F reduces production pointer events and rejects invalid IDs", () => {
let state = modal.createInputModalState();
state = modal.reduceInputModal(state, { type: "pointerdown", pointerType: "touch", pointerId: 2 });
state = modal.reduceInputModal(state, { type: "pointerdown", pointerType: "touch", pointerId: 4 });
assert.equal(state.navigationRevision, 1);
state = modal.reduceInputModal(state, { type: "pointercancel", pointerType: "touch", pointerId: 2 });
assert.deepEqual([state.kind, state.activePointerIds, state.cancelled], ["NONE", [], true]);
assert.throws(() => modal.reduceInputModal(state, { type: "pointerdown", pointerType: "pen", pointerId: -1 }), /POINTER_ID_INVALID/);
});