XTF needs some JS and CPP testcases



Core Graveyard
14 years ago
4 years ago


(Reporter: aaronr, Assigned: Alex Fritze)


Firefox Tracking Flags

(Not tracked)



(3 attachments, 2 obsolete attachments)



14 years ago
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.

Comment 1

14 years ago
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

Comment 2

14 years ago
Created attachment 162139 [details]
proposed testcases

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?

Comment 3

14 years ago
One missing thing.

WidgetSSNElement::HandleDefault(nsIDOMEvent *aEvent, PRBool *aHandled)
  *aHandled = PR_FALSE;
  return NS_OK;

Comment 4

13 years ago
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
<     if( fieldValue.Length() < iMaxLen )
>     if( fieldValue.Length() < (PRUint32) iMaxLen )
<   nsresult res = aChangeEvent->GetTarget( getter_AddRefs(target) );
>   nsresult rv = aChangeEvent->GetTarget( getter_AddRefs(target) );
>   NS_ENSURE_SUCCESS(rv, rv);

Comment 5

13 years ago
Comment on attachment 162139 [details]
proposed testcases

BTW, remove the Windows CR + LF...

Comment 6

13 years ago
Created attachment 162510 [details]
proposed testcases v2

incorporated the suggested changes
Attachment #162139 - Attachment is obsolete: true

Comment 7

13 years ago
Created attachment 162512 [details] [diff] [review]
makefile changes to account for new testcases

attached patch to be used to properly build new testcases.

Comment 8

13 years ago
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

Comment 9

13 years ago
Created attachment 166477 [details]
proposed testcases v3

fixed problem where BeginAddingChildren function missing from
Attachment #162510 - Attachment is obsolete: true

Comment 10

13 years ago
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?

Comment 12

12 years ago
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.

Comment 14

11 years ago
Created attachment 275475 [details] [diff] [review]
xtf extension

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.


11 years ago
Assignee: allan → xforms

Comment 15

11 years ago
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.
Last Resolved: 4 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.