|
1
|
/*------------------------------------------------------------------------------
|
|
2
|
test-11180-g-teardown-mouse.p (mouse/keyboard path)
|
|
3
|
|
|
4
|
DRAFT probe for #11180 review finding 2 - the mouse/keyboard twin of
|
|
5
|
test-11180-g-teardown-apply.p. Same window-teardown-without-APPLY topology,
|
|
6
|
but the focus transfer is driven by a physical CLICK rather than APPLY 'ENTRY',
|
|
7
|
so it exercises FocusManager.handleFocusChange (the mouse/keyboard path) rather
|
|
8
|
than ThinClient.processProgressEvent's SE_ENTRY branch.
|
|
9
|
|
|
10
|
This probe is NOT head-less: the mouse path only runs under a real GUI driver
|
|
11
|
(web or Swing), exactly like test-11180-e-mouse-dest-browse-leave.p. Run it in
|
|
12
|
the GUI, perform the single click described below, then compare the event log
|
|
13
|
to a native-OpenEdge run.
|
|
14
|
|
|
15
|
Steps to drive (GUI):
|
|
16
|
1. Focus starts in fO (secondary window W2).
|
|
17
|
2. CLICK fT in the default window's frame frmT.
|
|
18
|
3. fO's frame LEAVE (fired by the click-driven focus change) DELETEs window
|
|
19
|
W2 with NO APPLY - a bare-refocus fallback, not a nested steal.
|
|
20
|
|
|
21
|
OPEN QUESTION (unmeasured by any existing probe): after the click, does
|
|
22
|
OpenEdge honour the click into fT (fT : ENTRY, focus fT) or does it treat the
|
|
23
|
window-teardown fallback as a steal (keep the fallback focus, drop the click)?
|
|
24
|
|
|
25
|
Expected (native OpenEdge): <to be recorded from the OE run>
|
|
26
|
FWD 11180b (post-review): FocusManager.handleFocusChange returns true on the
|
|
27
|
teardown fallback -> the clicked fT gets neither
|
|
28
|
ENTRY nor focus (candidate finding 2).
|
|
29
|
|
|
30
|
Log to test-11180-g-mouse.log; leave the window open for inspection (WAIT-FOR).
|
|
31
|
------------------------------------------------------------------------------*/
|
|
32
|
|
|
33
|
DEFINE VARIABLE seq AS INTEGER NO-UNDO.
|
|
34
|
|
|
35
|
DEFINE VARIABLE hWin2 AS HANDLE NO-UNDO.
|
|
36
|
DEFINE VARIABLE hFrmO AS HANDLE NO-UNDO.
|
|
37
|
DEFINE VARIABLE hFO AS HANDLE NO-UNDO.
|
|
38
|
|
|
39
|
DEFINE VARIABLE fT AS CHARACTER NO-UNDO FORMAT "x(8)" INITIAL "ttt".
|
|
40
|
|
|
41
|
DEFINE FRAME frmT fT WITH TITLE "FRAME-T (click target, default window)"
|
|
42
|
AT ROW 3 COLUMN 2 SIZE 44 BY 4.
|
|
43
|
|
|
44
|
PROCEDURE logit:
|
|
45
|
DEFINE INPUT PARAMETER m AS CHARACTER NO-UNDO.
|
|
46
|
seq = seq + 1.
|
|
47
|
OUTPUT TO "test-11180-g-mouse.log" APPEND.
|
|
48
|
PUT UNFORMATTED STRING(seq, "99") " " m SKIP.
|
|
49
|
OUTPUT CLOSE.
|
|
50
|
END PROCEDURE.
|
|
51
|
|
|
52
|
/* fO's frame LEAVE (driven by the click): tear down window W2, NO APPLY */
|
|
53
|
PROCEDURE oLeave:
|
|
54
|
RUN logit("frmO LEAVE (begin - delete secondary WINDOW W2, NO APPLY)").
|
|
55
|
IF VALID-HANDLE(hWin2) THEN DELETE WIDGET hWin2.
|
|
56
|
RUN logit("frmO LEAVE (end - no APPLY performed)").
|
|
57
|
END PROCEDURE.
|
|
58
|
|
|
59
|
ON ENTRY OF FRAME frmT
|
|
60
|
RUN logit("frmT ENTRY <== target FRAME ENTRY (click honoured?)").
|
|
61
|
ON ENTRY OF fT IN FRAME frmT
|
|
62
|
RUN logit("fT ENTRY <== clicked target ENTRY (dropped by candidate bug?)").
|
|
63
|
ON LEAVE OF fT IN FRAME frmT
|
|
64
|
RUN logit("fT LEAVE").
|
|
65
|
|
|
66
|
/* ---- main ---- */
|
|
67
|
OUTPUT TO "test-11180-g-mouse.log".
|
|
68
|
PUT UNFORMATTED "=== test-11180-g-teardown-mouse start ===" SKIP.
|
|
69
|
OUTPUT CLOSE.
|
|
70
|
|
|
71
|
ENABLE fT WITH FRAME frmT.
|
|
72
|
VIEW FRAME frmT.
|
|
73
|
|
|
74
|
CREATE WINDOW hWin2
|
|
75
|
ASSIGN TITLE = "WINDOW-2 (torn down in its own LEAVE)"
|
|
76
|
WIDTH = 40 HEIGHT = 6 VISIBLE = FALSE.
|
|
77
|
CREATE FRAME hFrmO
|
|
78
|
ASSIGN TITLE = "FRAME-O (source, in window 2)"
|
|
79
|
PARENT = hWin2
|
|
80
|
ROW = 2 COLUMN = 2 WIDTH = 34 HEIGHT = 4
|
|
81
|
BOX = TRUE VISIBLE = FALSE.
|
|
82
|
CREATE FILL-IN hFO
|
|
83
|
ASSIGN FRAME = hFrmO
|
|
84
|
NAME = "fO" FORMAT = "x(8)" SCREEN-VALUE = "ooo"
|
|
85
|
X = 4 Y = 4 WIDTH = 20
|
|
86
|
SENSITIVE = TRUE VISIBLE = TRUE.
|
|
87
|
ON "LEAVE":U OF hFrmO PERSISTENT RUN oLeave.
|
|
88
|
|
|
89
|
hWin2:VISIBLE = TRUE.
|
|
90
|
hFrmO:VISIBLE = TRUE.
|
|
91
|
|
|
92
|
CURRENT-WINDOW = hWin2.
|
|
93
|
|
|
94
|
RUN logit("--- APPLY ENTRY to fO (park focus in secondary window W2) ---").
|
|
95
|
APPLY "ENTRY" TO hFO.
|
|
96
|
RUN logit("--- now CLICK fT in the default window (drives the mouse path) ---").
|
|
97
|
PAUSE 0.
|
|
98
|
/* Keep the session alive so the tester can click fT; the LEAVE fires from the
|
|
99
|
click, not from an APPLY. Close the window to end. */
|
|
100
|
WAIT-FOR CLOSE OF THIS-PROCEDURE.
|
|
101
|
|
|
102
|
RUN logit("--- done; FOCUS is now: "
|
|
103
|
+ (IF VALID-HANDLE(FOCUS) THEN STRING(FOCUS:TYPE) + "/" + FOCUS:NAME
|
|
104
|
ELSE "<none/invalid>") + " ---").
|
|
105
|
RUN logit("--- OPEN QUESTION: OE = is the click honoured (fT ENTRY) or dropped? ---").
|