Closed Bug 264068 Opened 20 years ago Closed 11 years ago

XTF needs some JS and CPP testcases

Categories

(Core Graveyard :: XTF, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: aaronr, Assigned: alex)

Details

Attachments

(3 files, 2 obsolete files)

XTF needs some testcases to show developers how to use the technology.  Best to
have testcases that do the same thing, but written in JS AND CPP.
I've got a JS and CPP testcase to contribute.  Building it against the trunk
right now to make sure it works outside of the xforms branch
Attached file proposed testcases (obsolete) —
here are some testcases that could be included in the tree if they look ok to
you.  However, there is a crash if you run the .js testcase and click on the
SSN textfields instead of tabbing to them.  Is this something wrong with my
testcase or a bug that needs to be filed?
One missing thing.

NS_IMETHODIMP
WidgetSSNElement::HandleDefault(nsIDOMEvent *aEvent, PRBool *aHandled)
{
  *aHandled = PR_FALSE;
  return NS_OK;
}
Comment on attachment 162139 [details]
proposed testcases

Ahem, using the same CID as  the XForms lib. might not be a good idea :)

And two small changes, to remove the warnings:
diff ../../tests.orig/ssncpp/WidgetSSNElement.cpp ./WidgetSSNElement.cpp
518c518
<     if( fieldValue.Length() < iMaxLen )
---
>     if( fieldValue.Length() < (PRUint32) iMaxLen )
578c578,579
<   nsresult res = aChangeEvent->GetTarget( getter_AddRefs(target) );
---
>   nsresult rv = aChangeEvent->GetTarget( getter_AddRefs(target) );
>   NS_ENSURE_SUCCESS(rv, rv);
Comment on attachment 162139 [details]
proposed testcases

BTW, remove the Windows CR + LF...
Attached file proposed testcases v2 (obsolete) —
incorporated the suggested changes
Attachment #162139 - Attachment is obsolete: true
attached patch to be used to properly build new testcases.
The ssncpp.xpt file is not installed neither generated, libssncpp.so is
installed ok on the components directory, so the CPP version does not works out
of the box. the JS vesion work ok
Attached file proposed testcases v3
fixed problem where BeginAddingChildren function missing from
WidgetSSNElement.cpp
Attachment #162510 - Attachment is obsolete: true
attachment #166477 [details] solves the problem I was experiencing
Product: Browser → Seamonkey
This is interesting (and very helpful!).  I've been meaning to write an article
on XTF anyway... would anyone object if I provided a SVG-based testcase as I
wrote it?
This should be put on the wiki I think.
Assignee: alex → allan
Component: General → XTF
Product: Mozilla Application Suite → Core
Hardware: PC → All
I actually have just submitted a xpcshell testcase for bug 378247.  (When aaronr first put the testcases up, we didn't have the xpcshell-simple test harness.)  Maybe we can start to work on this bug a bit more.
Attached patch xtf extensionSplinter Review
This is similar to the testcases in v3 but written to go in a sample directory since it doesn't really fit into unit testcase harness.  It is an XTF extension that uses XBL to do the UI, similar to how XForms does it.  Building the directory will build a .xpi that can be installed.
Assignee: allan → xforms
I am working on script that launch Firefox and automatically shut down the instance after some activity. For example, I can run a script which will:

- launch with one extension installed
- quit that instance
- launch with another extension installed
- quit that instance

Let me know if this might have some relevance to what you are trying to test here.
Assignee: xforms → alex
QA Contact: general → xtf
XTF has been removed from the tree.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
[xtfisdead] for filtering purposes.
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: