|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 2150 Details
Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges
This page provides all information on Problem Report 2150.
Report 2150 Actions
Problem Report Number 2150 Submitter's Classification Test Suite problem State Resolved Resolution Rejected (REJ) Problem Resolution ID REJ.X.0617 Raised 1970-01-01 08:00 Updated 2003-03-13 08:00 Published null Product Standard Motif Toolkit Certification Program The Open Brand certification program Test Suite VSM version 4.0.0 Test Identification widgets/XmText 4 Problem Summary PG4M.00013 This is the test case fault. Reference to TSD4M.00011 and PIN4M.00003 for related information. This waiver request is noly for such failure case: 3. PREP: Click KeyKillToBOL outside selection(kill-to-... Problem Text
This is the test case fault.
Reference to TSD4M.00011 and PIN4M.00003 for related information.
This waiver request is noly for such failure case:
3
PREP: Click KeyKillToBOL outside selection(kill-to-BOL)
TEST: Kills insertion cursor to next BOL .
ERROR: Received unexpected callback(s) XmNmotionVerifyCallback of widget XmText
of class xmTextWidgetClass Received 1, Expected 0
The calling sequences to set the expected callbacks for the above
test case are:
1
(*testWidgetClassInfo->proc_TestBehavior)
(testWidgetClassInfo, parentWidgetInfo);
/* ../vsm4/tset/widgets/text.c/test4A */
2
mvsTextBehaviorSet(widget_class_info,parent_info,focus_mode,
args,nargs, i+1);
/* ../vsm4/src/mvslib/instances/iText.c/static void TestBehavior */
3
xisClickKey(KeyKillToBOL);
/* ../vsm4/src/mvslib/behavior/Text.c/Test case 65(tn[2] = 65 )
line # around 888 */
4
(*current_object->proc_InformExpectedActions)
(xisInform.event_code);
/* ../vsm4/src/xislib/primitives/ClickKey.c
line # around 234 */
5
static void SetExpectedActions(event)
/* ../vsm4/src/mvslib/instances/iText.c */
6
..............................................
switch(event) {
...............................................
case EventKeyClick:
...............................................
if ( ((mvsGetLocalResource(mvs_w_info, XmNsensitive) != FALSE) ) &&
((mvsGetLocalResource(mvs_w_info, XmNancestorSensitive) != FALSE) )
&&
( xisIsActiveKey(KeyKillToBOL)) ) {
if ((mvsGetLocalResource(mvs_w_info, XmNeditable) == TRUE)) {
mvsDebugAssert(mvs_w_info,"Text_kill_to_start_of_line 0) ;
mvsExpectSomeCoupledCallbacks(mvs_w_info,XmNmodifyVerifyCallback,
XmCR_MODIFYING_TEXT_VALUE,
XmNvalueChangedCallback, XmCR_VALUE_CHANGED);
}
if ((mvsGetLocalResource(mvs_w_info, XmNeditable) == TRUE) &&
(mvsIsCursorBeforeSelection(mvs_w_info) != TRUE)) {
mvsDebugAssert(mvs_w_info,"Cursor after selection.0 );
mvsExpect1MoreCallback(mvs_w_info,XmNmotionVerifyCallback,
XmCR_MOVING_INSERT_CURSOR);
}
mvsAssertion(mvs_w_info, "Kills insertion cursor to next BOL .");
}
...............................................
/* In No.5 step function SetExpectedActions of file iText.c */
The condition here to set the XmNmotionVerifyCallback expected callback
is not enough to include all the condition that will produce a
XmNmotionVerifyCallback callback.
For this test case, before click KeyKillToBOL, the text on the Text
widget is "Once upon a midnight dreary, while I pondered, weak and weary",
the cursor position is 20 which is after the "t" of word "midnight", the
highlighted text starts at letter "l" in word "while", ends at letter "d" in
word "and", after click KeyKillToBOL, all those words "Once upon a midnight"
will be deleted, the cursor will move to the beginning of this line. I think
we should expect a XmNmotionVerifyCallback callback because the cursor is moved.
One more step further, I think as long as XmNeditable is true and the cursor
is not located at the first position of this line, then we shall set an
expectation of XmNmotionVerifyCallback callback.
Here are the printfs and sleeps I put in some files and rebuild them
to test this case more easier:
1. In ../vsm4/src/mvslib/behavior/Text.c, for test case 65, around
line # 875, here it is:
/*************** TEST CASE #, # ******************/
/* this test generates a motif bug PIR #3587 */
tn[2] = 65 ; tresult = 0 ;
msg_prep("Click KeyKillToBOL outside selection(kill-to-BOL)");
/* msg("NULL OUT failure [(1)8.1] to PIR #3587 ") ; */
XmTextClearSelection(Text_info->widget, xisGetServerTime(0) ) ;
xisSynchronize();
XmTextSetSelection(Text_info->widget, 32, 55, xisGetServerTime(0) ) ;
xisSynchronize();
XmTextSetInsertionPosition(Text_info->widget, 20 ) ;
mvsTextTestSelection(Text_info, SETUP_SLCTN_PNTS, SETUP_SLCTN_PNTS ) ;
mvsClearCallbacks();
puts("******************** before xisClickKey(KeyKillToBOL);");
xisClickKey(KeyKillToBOL);
puts("******************** after xisClickKey(KeyKillToBOL);");
puts("sleep 10");
sleep(10);
tresult += mvsCheckCallbacksAndVisual(Text_info);
tresult += mvsTextTestSelection(Text_info,CHECK_EXPECT_NO_SLCTN,
CHECK_EXPECT_NO_CHNG);
2. In ../vsm4/src/mvslib/instances/iText.c file, around line #1190,
here it is:
if ( ((mvsGetLocalResource(mvs_w_info, XmNsensitive) != FALSE) ) &&
((mvsGetLocalResource(mvs_w_info, XmNancestorSensitive) != FALSE) )
&&
( xisIsActiveKey(KeyKillToBOL)) ) {
if ((mvsGetLocalResource(mvs_w_info, XmNeditable) == TRUE)) {
mvsDebugAssert(mvs_w_info,"Text_kill_to_start_of_line 0) ;
mvsExpectSomeCoupledCallbacks(mvs_w_info,XmNmodifyVerifyCallback
,
XmCR_MODIFYING_TEXT_VALUE,
XmNvalueChangedCallback, XmCR_VALUE_CHAN
GED);
}
if ((mvsGetLocalResource(mvs_w_info, XmNeditable) == TRUE) &&
(mvsIsCursorBeforeSelection(mvs_w_info) != TRUE)) {
mvsDebugAssert(mvs_w_info,"Cursor after selection.0 );
mvsExpect1MoreCallback(mvs_w_info,XmNmotionVerifyCallback,
XmCR_MOVING_INSERT_CURSOR);
}
puts("Set Expected callbacks, sleep 60");
sleep(60);
mvsAssertion(mvs_w_info, "Kills insertion cursor to next BOL .");
}
3. In file ../vsm4/src/mvslib/specific/mvsText.c, in function
int mvsIsCursorBeforeSelection(widget_info), around line #145, here it is:
#endif /* MOTIF_20 */
selection_present = XmTextGetSelectionPosition(widget_info->widget,
&pri_sel_start,&pri_sel_end) ;
insertion_cursor_position =
XmTextGetInsertionPosition(widget_info->widget);
printf("insertion_cursor_position is %d 0, (int)insertion_cursor_position);
#ifdef MOTIF_20
}
#endif /* MOTIF_20 */
NOTE: above 3 file changes are enough to help understanding my
explanation, the following printf(s) is to provide more detailed information.
4. In file ../vsm4/src/mvslib/callbacks/ChkCbacks.c, in function
int mvsCheckCallbacksSimple(), around line # 133, here it is:
if (!coupled) {
if (diff < 0) {
if ( mvsCallbackInfo[i].widget_info->being_destroyed == False) {
printf(" mvsCallbackInfo[i].called_cnt is %d when i is %d 0,
mvsCallbackInfo[i].called_cnt, i);
puts("mvslib: ChkCbacks.c: David 1");
msg_failure("Received unexpected callback(s) XmN%s of widget %s of cla
ss %s Received %d, Expected %d0,
resource_info[mvsCallbackInfo[i].resource_num].name,
XtName(mvsCallbackInfo[i].widget_info->widget),
mvsGetClassName(mvsCallbackInfo[i].widget_info->widget),
mvsCallbackInfo[i].called_cnt,mvsExpectedCallback[i]);
}
NOTE: the "i" value here I got from above is 8, this is the place where
the error message produced to the result journal file.
5. In file ../vsm4/src/mvslib/callbacks/Callbacks.c, in function
void mvsCallbackFunc( w,cd1,cd2 ), around line #138, here it is:
z = (int) cd1;
num = mvsCallbackInfo[z].resource_num;
cinfo = mvsCallbackInfo[z].widget_info->widget_class_info;
cname = cinfo->resource_info[num].name;
printf("**** Callback.c **** mvsCallbackInfo[z].called_cnt++; z is %d 0,z);
printf("resource name is %s 0, cname);
mvsCallbackInfo[z].called_cnt++;
NOTE: the printfs here will print out all 3 callbacks and their names
for our test case #65 in ../vsm4/src/mvslib/behavior/Text.c.
For your information, the place to process the events after we send out
the events is at file ../vsm4/src/xislib/primitives/ClickKey.c, the function
is "void xisClickKey", the functional call in this xisClickKey is:
"xisProcessEvents(NULL,0);". "xisProcessEvents" function is in ../vsm4/src/
xislib/events/ProcesEvents.c, the place to record all the callbacks received
is at "called_dispatch = xisSynchronize();", so you can put such printf in
function xisProcessEvents:
6
xisUseSessionInfo(routine_name);
printf("mvsCallbackInfo[8].called_cnt is %d 0,
mvsCallbackInfo[8].called_cnt);
printf("mvsExpectedCallback[8] is %d 0,
mvsExpectedCallback[8]);
called_dispatch = xisSynchronize();
printf("mvsCallbackInfo[8].called_cnt is %d 0,
mvsCallbackInfo[8].called_cnt);
printf("mvsExpectedCallback[8] is %d 0,
mvsExpectedCallback[8]);
Function xisSynchronize is defined in ../xislib/events/Synchronize.c.
The exactly place to get the callbacks is "XtDispatchEvent(&event);" in this
xisSynchronize function. So you can put such printf around XtDispatchEvent:
7
printf("3. mvsCallbackInfo[8].called_cnt is %d 0,
mvsCallbackInfo[8].called_cnt);
XtDispatchEvent(&event);
printf("4. mvsCallbackInfo[8].called_cnt is %d 0,
mvsCallbackInfo[8].called_cnt);Review Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
We recommend this request be refused.
The test begins with the following line of text where the ^
indicates the cursor position and the -s indicate the selection.
0 1 2 3 4 5 6
01234567890123456789012345678901234567890123456789012345678901
Once upon a midnight dreary, while I pondered, weak and weary,
^ -----------------------
After a KeyKillToBOL event, the kill-to-start-of-line() action is invoked.
The XmText widget, Action Routines, kill-to-start-of-line() action
portion of the spec states
In normal mode, if there is a non-null selection, deletes the
selection; otherwise, kills the characters preceding the
insertion cursor to the next beginning-of-line character and
stores the characters in the cut buffer. In add mode, if there
is a non-null selection, the cursor is not disjoint from the
selection and XmNpendingDelete is set to True, deletes the
selection; otherwise, kills the characters preceding the
insertion cursor to the next beginning-of-line character and
stores the characters in the cut buffer. This may impact the
selection.
As a result, the expected state of the line after the
kill-to-start-of-line() call is as follows,
0 1 2 3 4 5 6
0123456789012345678901234567890123456789012345678901234567890
Once upon a midnight dreary, whi weary
^
Since the cursor does not move, we believe no XmNmotionVerifyCallback
should take place.
The IUT may be killing to the beginning of the line rather than killing
the selection as mandated by the specification.
Please note that the info line preceeding this behavior
TEST: Kills insertion cursor to next BOL .
is misleading. The test is really testing deletion of the non-null
selection. We will change the wording associated with this in the
next release.
Review Type SA Review Start Date null Completed null Status Complete Review Resolution Rejected (REJ) Review Conclusion
This request is refused.
Problem Reporting System Options:
- View Report 2150
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority